Long-term virtual memory use of beanstalkd?

371 views
Skip to first unread message

dan

unread,
Jan 24, 2011, 7:21:47 PM1/24/11
to beansta...@googlegroups.com
Running Beanstalk on Ubuntu 10.04. Thanks for your efforts.

Here was top:

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND            
...
30837 beanstal  20   0  955m  26m  232 S    0  3.5  79:26.75 beanstalkd
...

Beanstalk virtual memory size 955m. Yet binlog was only 91m:

$ du -sh /var/lib/beanstalkd/
91M /var/lib/beanstalkd/

I restarted beanstalk, and its memory use dropped greatly .. to 16M!

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND            
...
  4835 beanstal  20   0 16072 2084  652 S    0  0.3   0:05.58 beanstalkd  
...


Does beanstalkd never let go of memory once it grabs it?

I believe beanstalkd had been running for awhile, and queues were at one time pretty large.

It would be handy to not have to restart beanstalkd, as our application relies on it.

Dan

dan

unread,
Jan 24, 2011, 7:24:21 PM1/24/11
to beansta...@googlegroups.com
I should say: beanstalkd version 1.4.3-1

ericworking

unread,
Jan 25, 2011, 4:28:43 PM1/25/11
to beanstalk-talk
I am wondering this as well. I currently have a 15G instance of
beanstalk running that had about 50 million jobs at one time. All
clients have been disconnected from the server. I've emptied out all
the queues so all that remains is default:

Tue Jan 25 13:24:25 -0800 2011
+---------+-------+---------+----------+-------+
| name | ready | delayed | reserved | total |
+---------+-------+---------+----------+-------+
| default | 0 | 0 | 0 | 0 |
+---------+-------+---------+----------+-------+

The process size hasn't changed and remains 15G.

There is also nothing in the binlog:
-r-------- 1 jokes jokes 10485760 2011-01-25 13:11 binlog.6192
-rw------- 1 root root 0 2010-11-02 17:55 lock

Does beanstalk not release memory after it is done? It would be a
useful feature to have since I end up running a separate instance of
beanstalk when I will have tens of millions of jobs that may be left
in beanstalk for weeks at a time. I would not want my normal instance
of beanstalk that does routine tasks to occupy 15G.

Eric

k...@xph.us

unread,
Jan 25, 2011, 5:30:26 PM1/25/11
to beansta...@googlegroups.com
Version 1.4.4 fixed a couple of memory leaks. Can you reproduce this
with the latest release (1.4.6)?

kr

ericworking

unread,
Jan 26, 2011, 9:32:01 PM1/26/11
to beanstalk-talk
As for me, I'm running 1.4.6.

Eric

k...@xph.us

unread,
Jan 28, 2011, 3:20:22 AM1/28/11
to beansta...@googlegroups.com

Dan Frankowski

unread,
Jan 31, 2011, 9:41:39 AM1/31/11
to beansta...@googlegroups.com
Added a way I can replicate it onto the issue.


Reply all
Reply to author
Forward
0 new messages