Results 1 to 6 of 6

Thread: Linux newbie need help: Why IOWait?

  1. #1
    YUKIKAZE arthurleung's Avatar
    Join Date
    Feb 2005
    Location
    Aberdeen
    Posts
    3,280
    Thanks
    8
    Thanked
    88 times in 83 posts
    • arthurleung's system
      • Motherboard:
      • Asus P5E (Rampage Formula 0902)
      • CPU:
      • Intel Core2Quad Q9550 3.6Ghz 1.2V
      • Memory:
      • A-Data DDR2-800 2x2GB CL4
      • Storage:
      • 4x1TB WD1000FYPS @ RAID5 3Ware 9500S-8 / 3x 1TB Samsung Ecogreen F2
      • Graphics card(s):
      • GeCube HD4870 512MB
      • PSU:
      • Corsair VX450
      • Case:
      • Antec P180
      • Operating System:
      • Windows Server 2008 Standard
      • Monitor(s):
      • Dell Ultrasharp 2709W + 2001FP
      • Internet:
      • Be*Unlimited 20Mbps

    Linux newbie need help: Why IOWait?

    I've always seen my server spend 50+% CPU on I/O wait. Why does it happen? I've never see windows spend anywhere >10% CPU even during very heavy I/O load. What makes the difference? Could it not just skip for the next job

    Yesterday I tried to solve this and attempted hdparm. Thought it is not dangerous (as if its windows), but it crashed the machine and it never boot. Now cost me money and time to get it sorted by the datacenter staff Never hate linux so much, when it comes to automatic system recovery it just doesn't boot.

    Can anyone suggest any safe way to optimize apache+mysql

    Thanks.
    Workstation 1: Intel i7 950 @ 3.8Ghz / X58 / 12GB DDR3-1600 / HD4870 512MB / Antec P180
    Workstation 2: Intel C2Q Q9550 @ 3.6Ghz / X38 / 4GB DDR2-800 / 8400GS 512MB / Open Air
    Workstation 3: Intel Xeon X3350 @ 3.2Ghz / P35 / 4GB DDR2-800 / HD4770 512MB / Shuttle SP35P2
    HTPC: AMD Athlon X4 620 @ 2.6Ghz / 780G / 4GB DDR2-1000 / Antec Mini P180 White
    Mobile Workstation: Intel C2D T8300 @ 2.4Ghz / GM965 / 3GB DDR2-667 / DELL Inspiron 1525 / 6+6+9 Cell Battery

    Display (Monitor): DELL Ultrasharp 2709W + DELL Ultrasharp 2001FP
    Display (Projector): Epson TW-3500 1080p
    Speakers: Creative Megaworks THX550 5.1
    Headphones: Etymotic hf2 / Ultimate Ears Triple.fi 10 Pro

    Storage: 8x2TB Hitachi @ DELL PERC 6/i RAID6 / 13TB Non-RAID Across 12 HDDs
    Consoles: PS3 Slim 120GB / Xbox 360 Arcade 20GB / PS2

  2. #2
    The late but legendary peterb - Onward and Upward peterb's Avatar
    Join Date
    Aug 2005
    Location
    Looking down & checking on swearing
    Posts
    19,378
    Thanks
    2,892
    Thanked
    3,403 times in 2,693 posts
    Is the server yours, or yours installed in the data centre? IOwait may not be related to the hard disk - and using the hdparm command can be really dangerous (as you have found out!) unless you really know what you are doing!

    What kernel are you using? What file system?
    (\__/)
    (='.'=)
    (")_(")

    Been helped or just 'Like' a post? Use the Thanks button!
    My broadband speed - 750 Meganibbles/minute

  3. #3
    Seething Cauldron of Hatred TheAnimus's Avatar
    Join Date
    Aug 2005
    Posts
    17,164
    Thanks
    803
    Thanked
    2,152 times in 1,408 posts
    are you going on a RAID controller, rather than the first two IDE channels on your motherboard (its not SATA or SCSI is it?).

    Best way to optimize apache + mysql. Not to use mySQL!

    If your running PHP code, look at phalanger http://www.php-compiler.net/.

    But seriously MySQL is just abizmal when it comes to performance, but its cheap, and its the popular kid, dosen't mean its the best.

    Also if your doing complicated queries, we could probably help you optermise thouse a bit.

    IOWait can that be caused by a domain socket? I think it can.
    throw new ArgumentException (String, String, Exception)

  4. #4
    YUKIKAZE arthurleung's Avatar
    Join Date
    Feb 2005
    Location
    Aberdeen
    Posts
    3,280
    Thanks
    8
    Thanked
    88 times in 83 posts
    • arthurleung's system
      • Motherboard:
      • Asus P5E (Rampage Formula 0902)
      • CPU:
      • Intel Core2Quad Q9550 3.6Ghz 1.2V
      • Memory:
      • A-Data DDR2-800 2x2GB CL4
      • Storage:
      • 4x1TB WD1000FYPS @ RAID5 3Ware 9500S-8 / 3x 1TB Samsung Ecogreen F2
      • Graphics card(s):
      • GeCube HD4870 512MB
      • PSU:
      • Corsair VX450
      • Case:
      • Antec P180
      • Operating System:
      • Windows Server 2008 Standard
      • Monitor(s):
      • Dell Ultrasharp 2709W + 2001FP
      • Internet:
      • Be*Unlimited 20Mbps
    I rented a server in amsterdam and the performance is horrible due to I/O wait. There were plenty of ram left, and >60% of CPU time went to iowait. I'm running a forum on that, with a db around 1.2GB in size. Running CentOS (default of the host). P4 2.8G, 1G ram and 160G HDD. The HDD is just plain IDE.

    I was using a P4 3.2Ghz server with 80G hdd previously and moved to this just to save cost. iowait wasn't that of a problem back there (was around 35% max) even with 150% users online of what I got now.

    One thing I noticed is the old system always use around 800~1000m ram but the new one is just around 300-400. The old one was using Plesk on RHE but the new one is just plain vanilla mysql+apache, which probably explain the low ram usage.
    Workstation 1: Intel i7 950 @ 3.8Ghz / X58 / 12GB DDR3-1600 / HD4870 512MB / Antec P180
    Workstation 2: Intel C2Q Q9550 @ 3.6Ghz / X38 / 4GB DDR2-800 / 8400GS 512MB / Open Air
    Workstation 3: Intel Xeon X3350 @ 3.2Ghz / P35 / 4GB DDR2-800 / HD4770 512MB / Shuttle SP35P2
    HTPC: AMD Athlon X4 620 @ 2.6Ghz / 780G / 4GB DDR2-1000 / Antec Mini P180 White
    Mobile Workstation: Intel C2D T8300 @ 2.4Ghz / GM965 / 3GB DDR2-667 / DELL Inspiron 1525 / 6+6+9 Cell Battery

    Display (Monitor): DELL Ultrasharp 2709W + DELL Ultrasharp 2001FP
    Display (Projector): Epson TW-3500 1080p
    Speakers: Creative Megaworks THX550 5.1
    Headphones: Etymotic hf2 / Ultimate Ears Triple.fi 10 Pro

    Storage: 8x2TB Hitachi @ DELL PERC 6/i RAID6 / 13TB Non-RAID Across 12 HDDs
    Consoles: PS3 Slim 120GB / Xbox 360 Arcade 20GB / PS2

  5. #5
    Senior Member
    Join Date
    Nov 2005
    Posts
    500
    Thanks
    0
    Thanked
    0 times in 0 posts
    Quote Originally Posted by arthurleung
    One thing I noticed is the old system always use around 800~1000m ram but the new one is just around 300-400.
    Apologies if I this is obvious to you, I'm fairly new round these parts and don't know everyone's skill level.

    If your memory usage has suddenly dropped half a GB and your IO wait times have gone up significantly then I suspect your MySQL query cache is set waaaay too small. Can you post the ouput of "SHOW VARIABLES LIKE 'query_cache_size';"? In your case I'd be concerned if it's less than about 500000000 assuming I read your post correctly

  6. #6
    Agent of the System ikonia's Avatar
    Join Date
    May 2004
    Location
    South West UK (Bath)
    Posts
    3,736
    Thanks
    39
    Thanked
    75 times in 56 posts
    ok - lets look at this with a basic head on.

    1.) you had a lower spec server and you had IO wait - so you upgraded to a more powerful server, and your still having the wait.

    Questions:

    If your problem was IO related, what diags did you to to make suggest that an upgrade of ram/cpu was the issue ?

    you still having the io wait issue on the more powerful server, so you could probably move away from the OS being the base problem.

    Is you assumed the problem was IO - why did you upgrade to a server with another IDE disk

    What is your disk partition layout ?
    What is your file system ?
    What is the driver for the disk controller ?

    2.) you've got a vanilla mysql/apache/php install with a 1.2 gig database !!!!! 1.2 gig is quite a reasonable size database for a non-business style use, a default config could probably use some tuning

    Look at

    1.) how php/apache is configured
    2.) mysql is configured
    3.) how your applications works (does it use idexes ? how big are they ? does it do table locking ? how can you optimise this as high users using 1.2 gig of data to search will be IO intensive. etc)
    4.) look at the versions of the products your using for known bugs
    5.) look at OS patches for your OS (unlikley) that effect memory/disk - as your not using very much memory I doubt this is a big deal at this time.

    Now for the harsh comments.

    1.) why would you "assume" a tool that messes with your disk is "safe" and if your in any doubt - READ UP! - tough luck that you had to pay - thats your fault.
    2.) You sound very new at linux, you even call yourself a "noob" in the title - why are you using linux to host your project if you have very basic skills with it, why not use a windows server that you seem more familer with
    3.) why not pay for someone to manage your server, it may be cheaper than "trying" things suggested on a public forum that could cause you further expense.
    It is Inevitable.....


Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Quick Linux question from a newbie...
    By madmonkey in forum Software
    Replies: 19
    Last Post: 26-08-2005, 09:07 PM
  2. We heard your feedback on Newegg....
    By DR in forum General Discussion
    Replies: 33
    Last Post: 05-03-2005, 08:13 PM
  3. Linux Newbie
    By atifds9 in forum Software
    Replies: 16
    Last Post: 27-01-2004, 05:36 PM
  4. Linux Newbie Advice
    By Barakka in forum Software
    Replies: 4
    Last Post: 04-12-2003, 09:58 AM
  5. What Linux for a Newbie
    By Darkmatter in forum Software
    Replies: 28
    Last Post: 18-11-2003, 07:53 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •