Re: postgresql is slow with larger table even it is in RAM

Поиск
Список
Период
Сортировка
От Bill Moran
Тема Re: postgresql is slow with larger table even it is in RAM
Дата
Msg-id 20080325091046.b5d50a35.wmoran@collaborativefusion.com
обсуждение исходный текст
Ответ на postgresql is slow with larger table even it is in RAM  ("sathiya psql" <sathiya.psql@gmail.com>)
Ответы Re: postgresql is slow with larger table even it is in RAM  ("sathiya psql" <sathiya.psql@gmail.com>)
Список pgsql-performance
In response to "sathiya psql" <sathiya.psql@gmail.com>:

> Dear Friends,
>      I have a table with 32 lakh record in it. Table size is nearly 700 MB,
> and my machine had a 1 GB + 256 MB RAM, i had created the table space in
> RAM, and then created this table in this RAM.
>
>     So now everything is in RAM, if i do a count(*) on this table it returns
> 327600 in 3 seconds, why it is taking 3 seconds ????? because am sure that
> no Disk I/O is happening. ( using vmstat i had confirmed, no disk I/O is
> happening, swap is also not used )
>
> Any Idea on this ???

Yes.  It takes your hardware about 3 seconds to read through 700M of ram.

Keep in mind that you're not just reading RAM.  You're pushing system
requests through the VFS layer of your operating system, which is treating
the RAM like a disk (with cylinder groups and inodes and blocks, etc) so
you have all that processing overhead as well.  What filesystem did you
format the RAM disk with?

Why are you doing this?  If you have enough RAM to store the table, why
not just allocate it to shared buffers?

--
Bill Moran
Collaborative Fusion Inc.
http://people.collaborativefusion.com/~wmoran/

wmoran@collaborativefusion.com
Phone: 412-422-3463x4023

В списке pgsql-performance по дате отправления:

Предыдущее
От: Craig Ringer
Дата:
Сообщение: Re: what is the maximum number of rows in a table in postgresql 8.1
Следующее
От: Ivan Voras
Дата:
Сообщение: Re: what is the maximum number of rows in a table in postgresql 8.1