
|
View Full Version : Single P3 + IDE HDD vs Dual P3 + SCSI HDD
singtel22 08-13-2002, 04:40 PM My site runs a lot of cgi scripts and PHP/mySQL processes and we were on virtual host and it died on us. We want to consider DS but not sure if we could survive on single P3, IDE HDD.
Is there a significant difference in Single P3/IDE HDD vs Dual P3/SCSI HDD? :confused:
mikeknoxv 08-13-2002, 04:54 PM Not only are you jumping from a single CPU to dual, you are upgrading to a SCSI hard drive. I think it's safe to say, yes, there is quite a difference.
singtel22 08-13-2002, 05:12 PM Actually my question is whether I need dual/scsi as this is my first time on DS or would a single p3 with ide hdd be sufficient for an active website with 40.3MB of forum database on mysql and running. Here are the stats my host emailed me:
load averages: 90.75, 43.21, 18.70
23:49:42
284 processes: 12 running, 264 sleeping, 8 zombie
CPU states: 74.7% user, 0.0% nice, 22.0% system, 0.0%
interrupt,
3.4% idle
Memory: Real: 158M/187M Virt: 792M/2018M Free: 22M
PID USERNAME PRI NICE SIZE RES STATE TIME WCPU
CPU COMMAND
3678 www 2 0 2436K 2508K sleep 0:00 4.89% 1.27% classifieds.cgi
3686 www 2 0 2252K 2324K sleep 0:00 6.73% 1.22% classifieds.cgi
3679 www 2 0 2436K 2508K sleep 0:00 4.33% 1.12% classifieds.cgi
3680 www 2 0 2436K 2504K sleep 0:00 4.33% 1.12% classifieds.cgi
3636 www 37 0 2436K 2512K run/0 0:00 1.27% 1.12% classifieds.cgi
3676 www 2 0 2436K 2508K sleep 0:00 3.11% 1.03% classifieds.cgi
3606 www 2 0 2880K 2948K sleep 0:00 1.09% 0.98% classifieds.cgi
3682 www 2 0 2436K 2508K sleep 0:00 4.41% 0.98% classifieds.cgi
3685 www 2 0 2240K 2308K sleep 0:00 4.19% 0.93% classifieds.cgi
1708 wiredisl -5 0 2780K 1892K sleep 0:02 0.93% 0.93% mysqld
3684 www 2 0 2436K 2504K sleep 0:00 3.75% 0.83% classifieds.cgi
3687 www 2 0 2252K 2320K sleep 0:00 4.57% 0.83% classifieds.cgi
3662 www 35 0 2440K 2508K run/0 0:00 1.07% 0.78% classifieds.cgi
3677 www 14 0 2440K 2520K sleep 0:00 1.78% 0.59% classifieds.cgi
3637 www 14 0 2436K 2512K sleep 0:00 0.66% 0.59% classifieds.cgi
It's hard to tell. But, that server is certainly overloaded.
Samuel 08-13-2002, 05:40 PM load averages: 90.75, 43.21, 18.70
Those are extremely high usage numbers.
Well above the data corruption threshold guidelines.
sonic 08-13-2002, 06:25 PM well.... one suggestion
CHANGE YOUR CLASSIFIEDS PROGRAM
The Prohacker 08-13-2002, 06:37 PM Yeah, its poorly written apparently...
Get a new script :D
That will prolly load up even a dual box...
ReliableServers 08-13-2002, 06:41 PM Are those stats from a VDS or a DS? If its a vds that could explain the problem.
singtel22 08-13-2002, 09:02 PM Originally posted by Dilhole
Are those stats from a VDS or a DS? If its a vds that could explain the problem. It's from VS...even after I killed the classifieds script, I still get "lost connection" or "out of memory" on mysql...
tilted 08-13-2002, 09:46 PM If you're not quite sure about whether a high end dedicated server is worth the investment, think about it this way: you probably spend over a thousand dollars a month for your home and transportation, but you could probably get away with something more "conservative".
Your site is a living entity. It needs breathing room and fast wheels. You need CPU, you need RAM, and you need fast disk. Your current server is set up with 192MB of RAM (some of the RAM is being used for a soft video card) and a 2GB swap partition. Of that swap partition, you're using 768MB.
Dude, that's insane :bawling: , and it's causing your CPU and disk subsystem to work SUPER hard. You're running the risk of your system losing track of itself and start causing filesystem errors or swap-corruption kernel errors.
First things first, get a gig of RAM. Second, get fast disks that handle I/O queueing really well. Third, make sure that your disks are mirrored. Your software (which you should probably rewrite or find a comparable-but-more-efficient product) is putting the server through its paces. The more system resources you use, the more abuse your disks get. Go for a high quality SCSI system, they've come down in price in the last year.
If the difference between System A and System B is $100-200, wouldn't it be worth it to ensure that your site lives comfortably and without increasing the risk of meltdown and data loss? :cartman:
George
tilted 08-13-2002, 09:58 PM Silly double-post deleted.
Use a php and MySQL script as it seems you are using a really really bad script.
It will have less cost both in short term and in long term.
Mac
PixyMisa 08-14-2002, 12:43 AM A 40MB forum database isn't tiny, but it's not that big either. Databases really zoom along when they can fit entirely in memory. Linux itself is quite happy on a server with 128MB. So a machine with 256MB of memory should solve your problems.
Since you're currently on a virtual server, it's impossible to tell whether it's you or all the other users clogging the system up. But with a load average of 90, and 792MB of swap used against 187MB of total physical memory, that box is seriously overloaded.
I suggest you get a small, cheap dedicated box, and if it doesn't fly, take a look at the software you're running.
Walter 08-14-2002, 06:09 AM I would take the smaller box - your current shared server is overloaded and has way to less RAM, 192 MB RAM is insane for such a server. And a 40 MB forum is not very big...
singtel22 08-14-2002, 01:15 PM Thank you for all the advice, really appreciated it.
I disabled the classifieds script and only running the forum php/mysql script (Invision Board) with 40.7MB database. The VS I'm on hang a few times even as I'm typing this, it hang just an hour ago. The server load went to 34 and I was told that the safe limit was 2! It appears that the real memory is able to flucate according to my usage, I guess it's possible cos its a VS.
My question is: if my site can hang a VS server, which is a dual pentimum, then a dedicated server won't help right, unless it's extremely powerful?
My host suggest the following possible errors:
- the script causes the server to hang as it's badly written causing my queries to repeat itself
- mysql daemon on VS is based on low memory installation :confused: :confused: :confused:
PixyMisa 08-14-2002, 02:37 PM I suspect that the problem may not be you.
Here's my suggestion: check the load average and memory usage. Then shut down your forums for a few minutes. See what the machine is doing then. Bring the forums back up and see what difference it makes.
PHP runs fast and light. Mysql isn't particularly heavy either. A 40MB database is small these days. So there are three possibilities that I can see:
1. Your software is somehow broken.
2. Someone else is hogging all the resources, and it's not your fault at all.
3. It's the hosting service's fault for providing a machine with far too little memory and putting too many people on it. For most applications these days, you shouldn't be using any swap space, let alone 4 x physical memory!
There are two basic ways to hit a load average of 34:
1. Have 34 jobs happily running at the same time, all merrily eating up CPU time.
2. Have 34 jobs all struggling to get something done but not getting anywhere because the stuff they need has been swapped out.
The stats you showed earlier (this is the output from the top command) show me a machine that is approaching a pathological state. I'd be interested in seeing output from vmstat and iostat if you can get them.
On a healthy dual processor machine the load average should spend most of its time around 0.2 to 0.5. 2 means the machine is running flat out. More than 2 means it's overloaded. Jumping up to 5 or so for a few seconds is OK, it just means you got hit by a flurry of requests. If it stays up there, you've got problems. 34 is ridiculous.
Can you log in and run top, vmstat and iostat yourself? This would help a lot.
tilted 08-15-2002, 07:27 PM Originally posted by singtel22
It appears that the real memory is able to flucate according to my usage, I guess it's possible cos its a VS.
My question is: if my site can hang a VS server, which is a dual pentimum, then a dedicated server won't help right, unless it's extremely powerful?
My host suggest the following possible errors:
- the script causes the server to hang as it's badly written causing my queries to repeat itself
- mysql daemon on VS is based on low memory installation :confused: :confused: :confused:
It's not an issue of CPU, guaranteed. RAM, RAM, RAM. The thing about the "real" memory being able to fluctuate doesn't matter at all if you're using 700MB of swap space. Swap (especially on IDE, which I'm guessing your cheap host is using :angry: ) is your biggest bottleneck. You can have 8 Xeon processors in there, but if you only have 192MB or real RAM, you're still going to run high loads.
Best word of advice is this: Find a host that uses overbuilt servers and underutilizes them.
George
singtel22 08-19-2002, 10:28 AM Originally posted by PixyMisa
Can you log in and run top, vmstat and iostat yourself? This would help a lot. [/B]
The following is the vmstat and iostat captured at around 10:45pm and the other was captured at around 11:30pm. The last one was captured at around 12am.
347695460 cpu context switches
486520194 device interrupts
167509285 software interrupts
416368795 traps
1645503772 system calls
391428699 total faults taken
0 swap ins
0 swap outs
0 pages swapped in
0 pages swapped out
10587347 page ins
44997 page outs
4890245 pages paged in
180574 pages paged out
32443128 pages reactivated
9668 intransit blocking page faults
1113336415 zero fill pages created
258981497 zero fill page faults
622639 pages examined by the clock daemon
10159 revolutions of the clock hand
5898174 VM object cache lookups
5898174 VM object hits
0 total VM faults taken
23595893 copy-on-write faults
170953 pages freed by daemon
262338335 pages freed by exiting processes
10596 pages free
9114 pages wired down
39658 pages active
2928 pages inactive
4096 bytes per page
17200 target inactive pages
85 target free pages
64 minimum free pages
920788590 total name lookups
cache hits (87% pos + 6% neg) system 1% per-process
deletions 1%, falsehits 0%, toolong 0%
bash-2.02# iostat
tty sr0 sd0 sd1 % cpu
tin tout sps tps msps sps tps msps sps tps msps usr nic sys int idl
0 3 0 0 0.0 372 18 4.6 54 2 9.3 4 0 1 0 94
-----------------------------------------------
348804199 cpu context switches
487874768 device interrupts
167768110 software interrupts
418419638 traps
1673599701 system calls
393190256 total faults taken
0 swap ins
0 swap outs
0 pages swapped in
0 pages swapped out
10889403 page ins
59026 page outs
4925531 pages paged in
212564 pages paged out
32584908 pages reactivated
9823 intransit blocking page faults
1115880710 zero fill pages created
260036501 zero fill page faults
730840 pages examined by the clock daemon
12141 revolutions of the clock hand
5915208 VM object cache lookups
5915208 VM object hits
0 total VM faults taken
23683673 copy-on-write faults
202431 pages freed by daemon
263250441 pages freed by exiting processes
19489 pages free
9107 pages wired down
31437 pages active
2268 pages inactive
4096 bytes per page
17430 target inactive pages
85 target free pages
64 minimum free pages
929867883 total name lookups
cache hits (87% pos + 6% neg) system 1% per-process
deletions 1%, falsehits 0%, toolong 0%
bash-2.02# iostat
tty sr0 sd0 sd1 % cpu
tin tout sps tps msps sps tps msps sps tps msps usr nic sys int idl
0 4 0 0 0.0 373 18 4.6 54 2 9.3 4 0 1 0 94
--------------------------------------------------------
bash-2.02# iostat
tty sr0 sd0 sd1 % cpu
tin tout sps tps msps sps tps msps sps tps msps usr nic sys int idl
0 4 0 0 0.0 373 18 4.6 54 2 9.3 4 0 1 0 94
bash-2.02# iostat
tty sr0 sd0 sd1 % cpu
tin tout sps tps msps sps tps msps sps tps msps usr nic sys int idl
0 4 0 0 0.0 374 18 4.6 54 2 9.3 4 0 1 0 94
You have new mail in /var/mail/webvis
bash-2.02# vmstat -s
349402158 cpu context switches
488642564 device interrupts
167925078 software interrupts
419401964 traps
1688417092 system calls
394025994 total faults taken
0 swap ins
0 swap outs
0 pages swapped in
0 pages swapped out
11030058 page ins
59026 page outs
4933764 pages paged in
212564 pages paged out
32636155 pages reactivated
9823 intransit blocking page faults
1117180332 zero fill pages created
260525589 zero fill page faults
730840 pages examined by the clock daemon
12141 revolutions of the clock hand
5923530 VM object cache lookups
5923530 VM object hits
0 total VM faults taken
23729684 copy-on-write faults
202431 pages freed by daemon
263685126 pages freed by exiting processes
15636 pages free
9131 pages wired down
34937 pages active
2589 pages inactive
4096 bytes per page
17430 target inactive pages
85 target free pages
64 minimum free pages
934687191 total name lookups
cache hits (87% pos + 6% neg) system 1% per-process
deletions 1%, falsehits 0%, toolong 0%
netdude 08-19-2002, 12:13 PM [trying to delete this post, but it won't let me]
|