Обсуждение: Memory exhausted in AllocSetAlloc

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

Memory exhausted in AllocSetAlloc

От
"C. Bensend"
Дата:
Hey folks,

   I'm running 7.3.5 on an OpenBSD 3.5-STABLE machine, with 512M of RAM.
I'm running VACUUM ANALYZE every hour, with a VACUUM FULL once per night
before backups.

   I'm trying to speed up the VACCUMs, so I tried bumping up vacuum_mem
in postgresql.conf from the default to 64M.  This resulted in:

ERROR:  Memory exhausted in AllocSetAlloc(somenumber)

(where somenumber was not written down by me, sorry)

   I understand what happened, but not exactly why - this machine is
running with over 300M of RAM unused.  Bumping this value down to 16M
works fine.  But why does it hit a memory exhausted error at 64M?

   Please let me know if this belongs on pgsql-performance - I'm getting
an actual error, so I'm hoping this is the right place.  If not, I'll
join the other and post there.

Thanks much!

Benny


--
Funniest spam subject: "The mighty cucumber lives again!"
                                                  -- Received Aug 31, 2004



Re: Memory exhausted in AllocSetAlloc

От
Tom Lane
Дата:
"C. Bensend" <benny@bennyvision.com> writes:
>    I understand what happened, but not exactly why - this machine is
> running with over 300M of RAM unused.  Bumping this value down to 16M
> works fine.  But why does it hit a memory exhausted error at 64M?

Maybe it's exceeding a ulimit setting?

You might want to watch it with "top" and see what size the process
actually gets to before failing.  I'm not sure how accurate the
vacuum_mem throttle is ...

            regards, tom lane

Re: Memory exhausted in AllocSetAlloc

От
"C. Bensend"
Дата:
> Maybe it's exceeding a ulimit setting?

Bingo.

> You might want to watch it with "top" and see what size the process
> actually gets to before failing.  I'm not sure how accurate the
> vacuum_mem throttle is ...

It failed immediately upon invocation of vacuumdb.

I did find the problem and I feel like an idiot.  For some reason
the PostgreSQL user's login class didn't get changed from the default
on this host.  So, it had all kinds of limits set that were too low.
I changed that and voila!

I'm now running with 64M and my vacuums are much faster.  Thanks so
much!

Benny


--
Funniest spam subject: "The mighty cucumber lives again!"
                                                  -- Received Aug 31, 2004