Discussion:
Memory exhausted in AllocSetAlloc
(too old to reply)
C. Bensend
2004-09-12 02:41:51 UTC
Permalink
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



---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org
Tom Lane
2004-09-12 05:43:09 UTC
Permalink
Post by C. Bensend
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

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster
C. Bensend
2004-09-12 16:55:39 UTC
Permalink
Post by Tom Lane
Maybe it's exceeding a ulimit setting?
Bingo.
Post by Tom Lane
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



---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to ***@postgresql.org
Loading...