Web Hosting Talk







View Full Version : High iowait - more ram or switch to SCSI


FrzzMan
05-13-2004, 02:12 AM
Hello,

My server start to slow down as my visitors are coming more often. iowait sometimes raise to 95% or even higher.

Should I upgrade more ram to it? Or switch to SCSI HDD?

Current configuration:

P4 2.8GHz CPU
512MB RAM
80GB 8MB cache HDD

The weird thing is, if I stop the Apache then start it (not restart), the server back to normal for a while, about 30 mins.

I'm thinking about add more ram to 1GB, or should I switch HDD to SCSI one?

Steven
05-13-2004, 02:15 AM
is this a rhe box? Rhe kernels have issues with iowait

FrzzMan
05-13-2004, 02:22 AM
Yes, RHEL 3.0 ES, if it's about the kernel, is there any fix (work around)???

Steven
05-13-2004, 02:25 AM
what kernel version are you using

Mfjp
05-13-2004, 02:28 AM
Type Free and look for the memory usage

wheimeng
05-13-2004, 02:33 AM
512MB RAM? I believe RAM is foremost important than SCSI then. Yes, RHE has problem with that and have easy fix around.

RayWomack
05-13-2004, 02:41 AM
Yes, you will likely find that you are out of memory.

The good news is, this is the most inexpensive and painless upgrade. Lot's of heavy sites run IDE's. When you get to the point where you need SCSI, you WILL need Memory too.

FrzzMan
05-13-2004, 02:43 AM
Give me a moment, I'm doing up2date... SM didn't do it for me as I thought...

My server run only a forums with 2500 members, 100+ onlines at any time... I don't think this server can't handle it... it just behave like this for few weeks...

And yes, I'm going to upgrade ram to 1GB this week, and do you have some link about the work around (fix)?

FrzzMan
05-13-2004, 03:02 AM
The kernel I've just upgrade to is: Red Hat Enterprise Linux ES (2.4.21-15.EL)

free results:
total used free shared buffers cached
Mem: 505400 498180 7220 0 61544 206804
-/+ buffers/cache: 229832 275568
Swap: 522104 124340 397764

RayWomack
05-13-2004, 03:33 AM
Upgrade your Memory.

panopticon
05-13-2004, 03:44 AM
I've noticed this also with RHE. When stats ran on my RH 7 box (same sites) load was around 5. On the RHE box with SATA drives and a faster CPU now load skyrockets to 20 and makes the box pretty sluggish with IOWait at 95% for around 30 minutes :(

I upgraded to the 2.4.1-15.EL-SMP kernel yesterday and so far so good - maybe they made some improvements at long last (load today didn't go above 1 so far). We'll see... (fingers crossed)

BizB
05-13-2004, 03:45 AM
i had the same problem with a scsi system so i droped support at SM a msg and they fixed the kernel in 15 min , and now every thing runs ok :)
just post a ticket and see

love there support

IRCCo Jeff
05-13-2004, 04:00 AM
Upgrade to FreeBSD :smokin:

djstonefish
05-13-2004, 07:16 AM
When checking RAM usage on a cPanel box do you go off the ram usage in "top" or the ram usage displayed in WHM? As in my experience, the two figures vary quite widely.

TIA

Steven
05-13-2004, 10:11 AM
Djstonefish, technically its the same value, cpanel just does so math to not include cached memory

djstonefish
05-13-2004, 11:32 AM
thelinuxguy: thanks for your reply, there's quite a big difference though:

SSH:
root@server [~]# free
total used free shared buffers cached
Mem: 1030488 1002476 28012 0 43728 477340
-/+ buffers/cache: 481408 549080
Swap: 1052248 253344 798904


WHM:
Memory Used 28.1 %

Taking the above figures as an example, would you suggest the server needs more RAM? Looking at the WHM figures, it's only using 28% of memory, so it looks fine to me. But going off the figures through "free", it definately needs more.

Sorry if it sounds thick, but I don't see how these two figures are the same?

rusko
05-13-2004, 11:37 AM
they are. linux uses all free memory for pagecache. this memory gets released to userspace if it needs it. thus, it is not in use per se, although it gets included in the total.

upgrade your ram. since an apache restart helps it, it is likely that apache usage over time causes your box to allocate a lot of memory and start hitting the swap.

paul

paulj
05-13-2004, 07:32 PM
Run the following commands and see if the settings are same as shown below. These are the defaults for Redhat stock kernels and can cause the problems you describe.

cat /proc/sys/vm/inactive_clean_percent
5

cat /proc/sys/vm/pagecache
1 15 100

If they are the same, then you can change them with the following:
echo 100 > /proc/sys/vm/inactive_clean_percent
echo 2 10 20 > /proc/sys/vm/pagecache

These settings were provided to me by theplanet support people.
If the problem goes away, then add the same commands to /etc/rc.d/rc.local so that they are executed during a reboot.

It worked for me.
This was on a dual xeon with scsi and 2GB RAM, but the changes should be applicable for most current configurations.

djstonefish
05-14-2004, 07:59 PM
Hi paulj,

Were those commands meant for me? Neither of them seemed to work - but it's probably something I'm doing wrong :)

Steven
05-14-2004, 08:08 PM
no they were not. they are related to the thread starter's kernel issue

djstonefish
05-14-2004, 08:15 PM
Originally posted by thelinuxguy
no they were not. they are related to the thread starter's kernel issue

Thought so, but then I figured they should work on my box anyway (but apparently not).

Sorry for hijacking the thread. :D

Steven
05-14-2004, 08:36 PM
your issue has nothing to do with the iowait. I would upgrade your ram or see about optimizing your mysql / apache setup