Обсуждение: memory

Поиск
Список
Период
Сортировка

memory

От
"John Henderson"
Дата:
Thanks Philip and Bruce,
Re shared mem, I have increased the BSDI kernel conf from 1024 to 2048
shared mem pages. This allowed me to increase -B from 448 to 896 (not 884 my
error). These are the high values I can reach without postgres failing to
boot. This suggests my memory pages are around 3K - impossible but
interesting.

I will try to increase sharedmem in the kernel after this msg. What does
postgres use shared mem for? How can I determine how much shared mem is
appropriate for the jobs I want to do?

Just for interest sake, the query
isfiji=> select user_name,sess_time,start, stop into temp0
isfiji-> from sessions where user_name >= 'z'  and date_part('epoch',start)
isfiji-> between '941371199' and '943959600';
SELECT

Works OK. It takes a little longer than a query that just asks to match a
username (user_name='axis') but that is to be expected.

However,
isfiji=> explain select * from sessions where user_name >= '';
NOTICE:  QUERY PLAN:
Index Scan using sessions_user_name_idx on sessions  (cost=9838.32
size=123907 w
idth=138)
EXPLAIN
isfiji=> select * from sessions where user_name >= '';
calloc: Cannot allocate memory

This last query chugs along for a long time consuming more and more memory
until it finally runs out somewhere areound 256M which is where my datasize
is set.

Question: Am I wrong to expect postgreSQL to be able to do this query given
the resources at my disposal. To recap, I have 262M virt ram, 64M ram, the
table is ~74M with ~300K rows and I want to select * from table where
condition which should yield about half of the records.

TIA,
John


Re: [GENERAL] memory

От
Bruce Momjian
Дата:
[Charset iso-8859-1 unsupported, filtering to ASCII...]
> Thanks Philip and Bruce,
> Re shared mem, I have increased the BSDI kernel conf from 1024 to 2048
> shared mem pages. This allowed me to increase -B from 448 to 896 (not 884 my
> error). These are the high values I can reach without postgres failing to
> boot. This suggests my memory pages are around 3K - impossible but
> interesting.

Pages are 4k.

>
> I will try to increase sharedmem in the kernel after this msg. What does
> postgres use shared mem for? How can I determine how much shared mem is
> appropriate for the jobs I want to do?

BSDI has very small shared memory defaults.

--
  Bruce Momjian                        |  http://www.op.net/~candle
  maillist@candle.pha.pa.us            |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026