We have ~ 300 celeryd processes running under Ubuntu 10.4 64-bit, in standby mode each process takes ~ 19 MB RES, ~ 174 MB VIRT, so it is about 6 GB of standby RAM for all processes. In the active state, the process takes up to 100 MB RES and ~ 300 MB VIRT
Each process uses minidom (xml files - <500kb, simple structure) and urllib.
Quetions - how can we reduce RAM consumption - at least for inactive workers, maybe some celery or python options may help? How to determine which part takes up most of the memory?
UPD:, these are flight search agents, one worker for one agency / date. We have 10 agencies, one user search == 9 dates, so we have 10 * 9 agents for one user search.
Is it possible to start celeryd processes on demand to avoid idle workers (something like MaxSpareServers on apache)?
UPD2: Agent life cycle - send an HTTP request, wait for a response ~ 10-20 seconds, parse xml (takes less than 0.02s), save the result in MySQL
python memory-management profiling django celery
Andrew
source share