Web Hosting Talk







View Full Version : When to move to a Second Server?


arn
08-09-2002, 03:40 AM
Hey there guys,

I needed some advice...

I presently run a news/weblog-type site... the main page and articles pages are static shtml pages, which are generated by a cron'd script. (the main page gets updated every 15mins). (Main page + articles ~ 50,000 page views/day)

I have a vBulletin backend which handles comments/forums... and that gets about 50,000 page views/day. (mysql based bulletin board)

Adcycle is my ad rotation software (adcycle.com) and currently displays about 140,000 ads/day. (mysql based - but I use the unix "daemon" which is supposed to be more efficient).

My loads during peak times range from 1-5 or so. vBulletin has a setting to disable the forums at arbitrary server loads - and their default is 5.00. I've kept this...

So, it's a SQL/script heavy site. Primarly, SQL usage is likely the most load intensive.

with loads that range from minimal to 5-6 during peak ours... is this normal? Should I just increase the load cutoff limit? Should I be thinking of adding a second server? Thoughts?

The server has 512mb of ram presently...

total used free shared buffers cached
Mem: 510832 458696 52136 364 93220 232412
-/+ buffers/cache: 133064 377768
Swap: 522072 22980 499092

this is during low-load times

thanks
arn

sitekeeper
08-09-2002, 03:45 AM
You swap file is being used a lot, memory should help.

I like as little swapping as possiable.
SwapTotal: 2096472 kB
SwapFree: 2096472 kB
Committed_AS: 80552 kB


What processor are you using?

You might just need to go to a faster processor or Duel prosessor.

arn
08-09-2002, 04:12 AM
oh sorry... it's a 1.2 GHz Celeron/512MG RAM, IDE 60gb, CPanel/RedHat/Linux

I suppose I could upgrade the processor and/or increase the memory... but I guess at some point does it make more sense to get a second server?

In other words, moving to a Pentium or dual Pentium will help more than adding a second low end P3/Celeron server altogether as a sql server alone? Costs would likely be similar...

arn

sitekeeper
08-09-2002, 05:21 AM
In other words, moving to a Pentium or dual Pentium will help more than adding a second low end P3/Celeron server altogether as a sql server alone? Costs would likely be similar...
arn [/B]

In my opinion it would be better to go with one duel processor server then to buy another low end server just for MySql. There are many factors that can impact performance. Settings in your http.conf, php.ini, and other config files.

I would suggest you find a good Linux Admin and have them do some tweaking first. Settings like the ones below in your http.conf can make a difference. How apache is compiled can make difference too.

MinSpareServers 75
MaxSpareServers 255
StartServers 75
MaxClients 1024
MaxRequestsPerChild 100
KeepAliveTimeout 10

fog
08-09-2002, 02:00 PM
Maybe I'm just insane, but I always load systems up with tons of RAM. If it's not a big hassle, try throwing in another 256 or 512 MB of RAM and see how things go. I've got a gig of RAM here, but it's a MAJOR pain to go use someone else's computer and hear as the hard drive starts writing into swap...

Unless you put WAY too much in (something truly absurd, like 32 GB or something), I don't believe it's possible to have "too much" RAM -- the unused stuff can be used to cache files, further reducing use of the hard drive(s).

A second processor can be good too, as it can literally do two things at once, but I'd go the RAM route first.

Not sure on your hosting arrangement, but adding a second server seems to be non-trivial. (Although you don't mention your hosting arrangment; if it's in your own colo cabinet or something, you could probably just slap some Gigabit cards in each box and setup a separate LAN for the interconnect.)

arn
08-09-2002, 02:48 PM
Originally posted by fog
Maybe I'm just insane, but I always load systems up with tons of RAM. If it's not a big hassle, try throwing in another 256 or 512 MB of RAM and see how things go. I've got a gig of RAM here, but it's a MAJOR pain to go use someone else's computer and hear as the hard drive starts writing into swap...

Unless you put WAY too much in (something truly absurd, like 32 GB or something), I don't believe it's possible to have "too much" RAM -- the unused stuff can be used to cache files, further reducing use of the hard drive(s).

A second processor can be good too, as it can literally do two things at once, but I'd go the RAM route first.

Not sure on your hosting arrangement, but adding a second server seems to be non-trivial. (Although you don't mention your hosting arrangment; if it's in your own colo cabinet or something, you could probably just slap some Gigabit cards in each box and setup a separate LAN for the interconnect.)

Good point about the RAM. That is a relatively easy upgrade... and I'll go with it.

Processor upgrade would be a bit more of a task (upgrade wise).

I'm hosted with a hosting company (Fastservers.net)... but I guess I needed some guidance, as I don't have a good "feel" for which interventions would be the best and most effective. ie. ram, increased processor in one box, vs dedicated sql box... which is why I ask...

arn

demonet
08-09-2002, 03:12 PM
Adcycle serving 140,000 ads a day is a large drain.
the extra ram will help alot, and placing adcycle on its own low cost server would be the best bet.

arn
08-09-2002, 04:13 PM
Originally posted by demonet
Adcycle serving 140,000 ads a day is a large drain.
the extra ram will help alot, and placing adcycle on its own low cost server would be the best bet.

A low cost server with it's own adcycle SQL db, I presume?

Is it silly to have two boxes each running mysql? In that is there a lot of overhead in running it at all?

Box1: Mysql + Adcycle
Box2: MySQL + vBulletin

vs

Box1: MySQL
Box2: vBulletin, Adcycle

(presumably box1-box2 communicating on a local network)

like I said before, I'll go with more ram for now... 512 -> 1gig... but as things continue to grow, I'll have to look into options...

arn

no1v2
08-09-2002, 04:27 PM
You should probably still upgrade it, but I also recommend getting rid of WHM/Cpanel. It doesn't sound like you're using it for anything that can't be done easily with it, and I recall it using a fair amount of resources on its own (especially RAM). I think it uses enough that just removing it should keep it from using any swap for now. Then again I know very little about it, I don't know if its even practical to simply remove it.