High Traffic

The precise reason why I shifted from another server to Linode was that during traffic spikes, my server was not able to take the load.

But at Linode too with 700 MB RAM, my VPS hangs during times of high traffic.

http://www.investingcontrarian.com.

This is just unacceptable and I need to keep the site running at all times.

Please help in restricting the server for high traffic even with 700 MB Ram and 2000 MB swap space.

My IO shows over 100% util during those minutes of traffic spikes.

7 Replies

First thing to do: free -m

Second thing to do: ps auxwww

Third thing to do: Was "2000MB" of swap a typo? If not, reduce that to 256MB. Swap is EXTREMELY slow and if you're actively swapping, you're going to have serious problems.

Odds are good that if switching providers didn't solve the problem, it's probably something to do with your particular architecture. Figuring out what that is will require some information and investigation.

Hi that was not a typo.

2000 MB was the swap. I increased it as once the RAM gets filled up, I need back up memory to pick up the traffic?

What are you running, and do not use 2000mb swap, that kinda swap maybe useful in a desktop environment but for a server you're shooting yourself in the foot, it also explains the high IO if you have such a huge swap.

Try checking out munin http://library.linode.com/server-monito … .10-karmic">http://library.linode.com/server-monitoring/munin/ubuntu-9.10-karmic to see if you can pick up a pattern

if(TL;DR): Sounds like there's something seriously wrong with your site's code. What are you running?

Swap is super slow. It's useful to have a bit of it, to clear out data from RAM that isn't really needed, but you REALLY don't want to be actually using it in place of RAM. Generally, as soon as your server starts swapping out active memory, it's as good as dead; as you've noted, all the time is spent swapping memory so no actual work gets done.

The 720MB Linode should be enough to handle an enormous amounts of traffic; you can handle millions of pageviews per day on a 360MB server if properly tweaked with a decent website.

We're going to need more information about your setup. The most useful of which will be, what is using all your RAM? You can run 'top' and hit "M" (the uppercase is important). That will show you a list of the top consumers of RAM, which will give us a much better idea about what's wrong with your server.

The most common reason for running out of RAM is to have Apache misconfigured; the default Apache configuration itself is more or less misconfigured when you put it under any serious load.

Thanks for the replies,.

Swap reduced.

Things working well now after low memory parameters set.

what low memory parameters did you enable?

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct