I'm looking for some direction. I've been running a VPS for a while now, but I keep running into the same problem...
This is only a personal web site. VERY low traffic. Maybe just me, and a few family members a few times a week. Too little traffic, which is the problem.
If I let it sit for a day, Apache gets very sluggish. I assume it is swapping. Once I restart apache, then everything is at a decent speed again.
The reason I am using a VPS instead of a shared host is because I prefer a mail setup that I haven't found on the shared hosts. namely that I want the mail files to be stored in maildir format, and accessible via rsync/ssh
I never found a shared host that did maildirs, so I just ran my own qmail server.
Unfortunately, the price of static IPs in my area is more than dedicated servers.
Sounds like you need to configure httpd.conf; look at things like timeout, number of servers, keepalive, and play around with the configs. There's a lot of guidance using the search fefature. As for the cost of static IPs, you can rent a dedicated server instead of hosting from your home or business and paying your provider a TON for one IP. You'll find some shared/reseller providers who'll be happy to give you jailed ssh, which would allow you to do the rsync stuff. However, running the mail setup you desire would be more appropriate for a vps system or dedicated.
Excuse me if i dont quite understand all of this , but how come a small site is giving u all these problems ? , if u say its just personal, for family , etc, i really dont understand why is it giving u many problems, have u tried a managed vps ? to see if somebody can help u ?
Im currently using knownhost (moved from another provider) and it is the best ! my main site is at hxxp://svcommunity.org , and if u visit it u can see in the right bars the uptime , it is something like 20 days+ and still not one single problem, and these guys are there just waiting in case i have one to contact them ! im telling u these because their support is something like 5-15 minutes from answering my questions..
And i also run 4 more sites in the same vps.. i have a plesk panel so it is using qmail and i think this will help u customizing qmail to do your needs...
Im telling u all these as i dont follow how can u do a customized qmail setup and having problems with httpd which is suppossed to be easy to configure..
Nothing is wrong, I'm all over the logs. No errors or anything. I just think that because it has so little traffic, the Apache processes are moving to the swap while it's inactive.
I think the keepalive options and the rest are for dealing with low bandwidth clients. I'm trying to deal with a low traffic server! Which seems like a rare issue.
I know how to use qmail very well, and I never liked those control panels anyway.
The problem right now is just getting Apache to deal with my low traffic site without swapping.
Im using a Xen host. I think user_beancounters is a Virtuozzo thing. If anything, its an apache thing, but I don't know how to tell apache not to go to swap. Probably the best thing to do it upgrade the ram and remove the swap, but maybe its not the easiest thing to do on a VPS.
that's what I'm suspecting. Because when I first got on this host everything was fine. I didn't change any configuration, then after several months, it's draggin' ***. This has happened with every single host I've been with so far. Anyone know of a Xen host that doesn't oversell?
It's been a while, but I think I remember a feature of Xen being that it can not be oversold because of the way it interacts with the hardware. I think that's what drew me to it in the first place. I can't remember now. If that is the case, I have no idea what the issue is.
Unless something has changed recently, Xen hosts can't oversell on RAM or disk usage. They can on CPU time, but that doesn't sound like it's the problem you're having.
For what it's worth, Dreamhost stores their mail in a maildir format, and the allow SSH and (I think) rsync access to all of the files/data on your account. That said, they seem to be going through a LOT of trouble right now - I started evaluating them a little while ago (the first year of service is dirt cheap with the right coupon) and my experience has ranged from abysmal to good almost daily :-) Others claim that this isn't normal for them though, so who knows...
On your current VPS setup though - have you considered using lighttpd? I had a 32mb Xen VPS ~1 year ago and I was able to run my personal email and web stuff off of it. A little slow at times, but if you have any more RAM available than that then it should be less of an issue.
Finally, if it's possible to do so under Xen, you could try changing your swappiness settings. Do a search and see what you come up with, it's a Linux kernel setting which determines how often stuff should be swapped to disk.
I have never heard of a server being slow because noone uses it...
I agree with rohitj - It sounds like you need to optimize, or you could just ask your host what they think.
Actually it could be that Apache is configured to keep too many instances of itself around in memory. At first, and after a restart, it will only maintain the number set as the minimum but with usage the number will rise and may not fall if your "max idle" setting is too high.
If your VPS doesn't have much RAM then it is conceivable that these extra processes are pushing the setup into using swap space and therefor causing the slow down.
Check the relevant settings in httpd.conf. (or, as others have suggested, try something leaner than Apache like lighthttpd)
I have never heard of a server being slow because noone uses it...
Virtuozzo VPS software does this. I don't know about Xen, but virtuozzo has always used what is called in the newer Linux kernels the 'swapiness' variable to take old inactive processes and proactively swap them out in favor of providing disk cache and buffers.
If Xen is on a newer Linux kernel (2.6+), it may be subject to the same thing. The default swapiness seems to work fine, but the host may have bumped it up thinking it was a good thing. Again, I don't know much about Xen, but it could be Xen does that automatically when it is installed.
Could be an overloaded server, but it doesn't necessarily have to be overloaded to behave this way.
yeah but he may have a point there.. I keep getting apache and cpsrvd hangs too pretty much daily, and I've been wondering if its a timeout issue.. I just don't know what recommended settings for that are. although my host is using VZPP and they have been very helpful in helping me resolve the issue, so far it hasn't been resolved yet, and it happens to me daily, every day a service fails, usually cprsvd but sometimes mysql and apache and I have to restart the server manually then everythings fine again, so I don't know, but my host has been alot better at resolving these issues the hostforweb was.. Cpanel ran so darn slow on hostforweb that I finally had to switch, was then I realized that WHM/cpanel must consume more resources and require more RAM then the 256 guaranteed I was getting with hostforweb.. unfortunately, purchasing higher guaranteed RAM, even 128 more, required me to pay like $20 more a month at least, which I thought was pretty silly to do just to get cpanel to work without taking 20 minutes to load a single page esp since all I have are 2 websites not very busy myself, just family visitors once in awhile mostly, so I wasn't sure what to do on all that, but I have noticed now that I got 384 a HUGE difference in performance when in cpanel/WHM then with 256... if only upgrading guaranteed RAM didn't cost so darn much more
Thanks for all the info. I'll mess with the various Apache configs. See if I can get something that fits my setup more appropriately. I have 128 megs of ram allocated. It should me more than enough for what I want to do, but maybe the default Sarge install is setup for a little more.