Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By spudart on
My server has several domains on it with several installations drupal 4.7 being used. Lately my server has been hitting its privvmpages limit. I'm not sure if Drupal is the culprit or just my steady growth of traffic finally crossed over being too much. (I've grown to about 11,000 page requests a day for a 256mb ram on the server). So I was wondering if by chance anyone out there has experienced any problems with reaching their privvmpages limit on their server with drupal.
Comments
From what I understand
From what I understand privvmpages is the burst ram they give you when it's available. Never guaranteed. If you hit it often then you should consider upgrading your VPS plan.
The other option is to scale back the ram requirements with your database and live with the performance loss.
–joon
Similar Problems and My Solutions
I have a similar setup to yours--a 256mb VPS--and also have had privvmpage issues. I'm running Apache 2 with mod_php and the prefork MLM; yours is probably the same.
Here are some things I did:
- Deleted unused modules (they bloat the Apache processes when looking at the modules page) (alternately, just reload your apache processes after doing admin work to unbloat the processes; reload or force-reloading Apache should do it, or sending SIGHUPs to the individual processes)
- Tuned php's memory_limit to be big enough for my modules but not more (mine's at 12mb now)
- Reduced number of Apache processes
With the above, I haven't hit my privvmpages limit (except when doing too much on the command line during maintenance). However I have some problems with slow scripts and high cpu usage, and with only 4 Apache processes requests get hung up behind slow scripts sometimes.
For cpu issues I realized my backup processes were causing high cpu loads and making the VPS host stop my cpu cycles for a short time. I changed my backup scripts to use "nice" to reduce their priority. That did wonders.
For the slow requests I have a few things to check into including MySQL tuning and eliminating some of my busier aggregator feeds. (My large aggregator lists take the longest to process.)
However, I'm also looking into getting rid of mod_php and using FastCGI for PHP. Then I can use a multithreaded server like Apache's worker MLM or lighttpd. (I'm working on trying the latter.) I have the php-cgi fastcgi server set up, and it seems to be a little better behaved memorywise than Apache's mod_php. I'm not sure if FastCGI will improve my overall memory situation, but it will let me tune the web server and PHP independently; then hopefuly I can give more memory to MySQL which probably desperately needs it. (I haven't run lighttpd/fastcgi "for real" yet, but they are installed and I've been testing them with my drupal sites on an alternate port. I just need to get the lighttpd vhosting set up like I want and make sure all my rewrites, redirects and static pages work like I want, then it's a go. But real life problems like leaky pipes and bathroom remodeling are slowing me down at the moment.)