Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I've Ubuntu 10.04LTS 64-bit running on a openvz container and Cherokee 1.0.8 compiled from source. The virtual memory usage of cherokee-worker is around 430 MB even after disabling I/O cache from Advanced -> I/O Cache -> NOT enabled.

Is this issue particular to openvz? Because many people reported to have successfully reduced virt memory usage by disabling io cache.

htop output: http://imgur.com/z5JEL.jpg (newbies not allowed to post image.)

thanks in advance.

nidheeshdas

share|improve this question

2 Answers 2

At least part of that will be the stack allocation (RLIMIT_STACK), which is allocated for each thread of cherokee... and cherokee makes a lot of threads. This memory isn't actually being used and is still available, so it usually doesn't matter, but with OpenVZ it's counted towards your quota and you do need to keep it down on OpenVZ VPSes. I'm unable to even launch cherokee in its default config on my 256MB VPS because OpenVZ thinks it is using more than the 210MB available, just starting up.

You can either cut down the number of threads cherokee is using under Advanced->Resources in the web config (the setting is "server!thread_number = XX" if you're editing cherokee.conf directly), or you can just change the stack size before running cherokee with 'ulimit -s SIZE_IN_KB' (you can see the default before changing it with 'ulimit -s' -- my VPS defaults to 10240, 10MB per thread). Keep in mind that you need to set the ulimit before running cherokee, and it isn't system wide. So either do it in a shell before launching cherokee from the same shell, or edit your startup script to run 'ulimit -s XX' before starting cherokee.

A great resource for getting things working on (especially low-end) VPSes is LowEndBox. They have a blog post on how to "Reduce Stack Limit for Multi-Thread Apps".

share|improve this answer
    
Few days ago virpus vps lost 19 nodes giving me chance to start afresh. I'll try your suggestion soon. –  nidheeshdas Feb 7 '11 at 5:17

The memory is being used by the php5-fpm processes not by cherokee. Are you runnning a fat php application?

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.