0

I have a web site - photo gallery. About 400 photos. Site on Gallery 3. mySQL. Hosted on VPS from myhosting.com (CPU 1792 MHz, 2048 MB RAM).

Everything seems to be ok, but there is one big problem. Once traffic reaches ~ 20 people (online) - website start loading really really slow. Actually website can't be loaded about 30-60 sec.

What should I do?

Buy more RAM / CPU on the same VPS? Move to a dedicated server or maybe myhosting.com just sucks?

What do you recommend?

qtrix
  • 1
  • It's hard to find out where the problem is if you don't give us any information about your system. (webserver, CMS/Customscript, OS, load, avg. bandwidth) With these we (I) could start helping you... – zaub3r3r Jan 08 '11 at 09:05

3 Answers3

2

NO idea. Seriously. The problem is that you sayx nothing abou thte bottleneck. A single core 1.8ghz cpu should handle 20 users without problems.

JUST:

  • We dont know how loaded the host is network wise
  • We dont know whether you HAVE a 1.8ghz cpu. It says so, but VPS are shared - could be you just have a 10% time slice overall.

It looks like the VPH is totally overlaoded, and sadly host overloads are not really analyzable from the client. I run some high performance VPS - but on my own hardware, so I always know when the CPU on the host peaks, or the IO falls behind, for example.

I would suggest doing some performance tests, and then poissibly moving to a more reputable host? Linude, for example. It is not VPS per se that are slow, but if I max out a machine, with cheap VPS offerings, then naturally.... well... not every host really has what he sees.

A physical server has plus and negative sides. Plus: you know what you have. Negative: if it fails, you have a problem. Same with updates. It mostly makes sense when you have multiple.

TomTom
  • 50,857
  • 7
  • 52
  • 134
2

Try playing with the prefork values in your Apache configuration (if you're using Apache):

<IfModule prefork.c>
StartServers         5
MinSpareServers      5
MaxSpareServers      10
ServerLimit          20
MaxClients           20
MaxRequestsPerChild  4000
</IfModule>
atx
  • 1,281
  • 1
  • 9
  • 25
2

The VPS seems capable enough to serve much higher load. My wild guess is, there are not enough active processes serving website. So if for instance you have apache installed, you should raise MaxClients setting.

Klemen
  • 224
  • 1
  • 2