[CalendarServer-users] memory usage

Glyph glyph at twistedmatrix.com
Fri Jun 8 13:16:01 PDT 2012


On Jun 6, 2012, at 4:04 AM, Marko Bauhardt wrote:

> Hi all.
> 
> We are running a mac server 10.7.4 with caldav 3 in a commercial environment. We have the behavior that from time to time the spawned processes from caldavd (Python /usr/bin/twistd -f /etc/caldavd/caldavd.plist) will use memory up to 3GB. because of that our server is running out of memory and the processes will create very big swap files. and our server will getting slower and slower. 

This should go without saying, but the server is not supposed to do this.  Do you know what causes its memory to grow?  We're working on addressing a similar condition and the more data we can get, the better.  Are you scheduling meetings with large numbers of people?  Do you have a lot of events that repeat very frequently?

Thanks for any information you can give us.

> How we can change the process count? we figured out we can do this via the caldavd.plist file. we want to change the xml tag MultiProcess/ProcessCount. is that right?

Yep, that's the idea.

> The important question is how we can restrict the memory usage for every caldav process?

You can't, really; sorry.  It's a bug that it takes so much memory.

> What does "ProcessType" mean? There are 3 values: master,slave,combined

You probably don't care about this.  You may notice (if you look at 'ps') that there are many caldavd processes.  The master process is the first one that starts up, to take care of certain kinds of bookkeeping.  It then starts a bunch of slave processses to do the real work of processing multiple requests.  "combined" is a configuration, mostly for development, which allows you to run the logic for the master and the slave in the same process, so that only one process starts up.


More information about the calendarserver-users mailing list