CentOS Icon CentOS Logo
CentOS Text
   
  
www.centos.org Forum Index
   CentOS 5 - General Support
  Extremely Sluggish CentOS 5.2 (Final) with Software RAID1

 

 Bottom   Previous Topic   Next Topic
  •  Rate Thread
      Rate this Thread
      Excellent
      Good
      Average
      Bad
      Terrible
Poster Thread
  •  Astek777
      Astek777
Extremely Sluggish CentOS 5.2 (Final) with Software RAID1
#1
Newbie
Joined: 2008/9/6
From
Posts: 5
Hi all, I'm fairly new to Linux in general and although I'm starting to find my way around I keep coming up against problems I have no idea how to resolve. Perhaps somebody could help?

Here's my issue...

MACHINE
Intel Core2 Duo (2.4GHz)
2Gb RAM
2x250Gb Western Digital SATA drives (WD2500JS)

SETUP
Fresh install of CentOS 5.2 (final) with kernel 2.6.18-92.el5. No GNU, just the basics with MySQL Server.
I've setup the drives with matching software RAID1 partitions setup on install. These are the partitions I've setup...

Partition 1: SWAP - 4096Mb - (RAID1)
Partition 2: /boot - 128Mb (RAID1)
Partition 3: / - Remaining space (RAID1)

After install the machine rebooted but everything was really slow...even typing in my SSH window had huge delays. I managed to install Plesk (8.6) but it took nearly 6 hours (normally 2hrs max). I then installed a couple of websites and they were incredibly slow too. A simply MySQL query which would normally be instant took several seconds and meant that the page loaded in stages...I've never seen anything like it!

I've been trying to find a solution but as of yet not been able to. Under the BIOS settings I have temporarily disabled the second HDD which has improved performance massively so it must be something relating to the RAID setup. Have I set something up wrong? Should the SWAP partitions not be setup as RAID or is something else going on here?

I guess when I enable the second HDD again now I will have to rebuilt the RAID somehow? Is there any easy way to do this?

Any suggestions or recommendations would be hugely appreciated!

Many Thanks

Sean.
Posted on: 2008/9/6 12:55
Create PDF from Post Print
Top
  •  centuser1
      centuser1
Re: Extremely Sluggish CentOS 5.2 (Final) with Software RAID1
#2
Jr Board Member
Joined: 2008/3/14
From
Posts: 34
my first guess would be you never waited for the intial mirror to take place. This can take a very long time and take up resources, especially if you are installing other things

also, the standard install of centos does a lot of installing of other programs that can bog you

I would goto a linix site and get commands to check processes and suff to see what is running

you will find these forums rather quiet for some reason..but in time someone who had a similiar issue may help you.
Posted on: 2008/9/6 20:07
Create PDF from Post Print
Top
  •  Astek777
      Astek777
Re: Extremely Sluggish CentOS 5.2 (Final) with Software RAID1
#3
Newbie
Joined: 2008/9/6
From
Posts: 5
Thanks for the reply centuser1.

Can I gather from that the initial Raid mirror is created after the first reboot then? Is there a way to check the progress of the image building? Roughly how long should it take with just a clean version of CentOS 5?

I wouldn't have through there was too much else running. This machine has been setup as a web server so I haven't installed any GUIs. Can you use hdparm on raided discs?

Thanks again, Sean.
Posted on: 2008/9/7 10:23
Create PDF from Post Print
Top
  •  Astek777
      Astek777
Re: Extremely Sluggish CentOS 5.2 (Final) with Software RAID1
#4
Newbie
Joined: 2008/9/6
From
Posts: 5
More information...

I've been looking in to the drive setups...running "hdparm -tT /dev/hda" was bringing back some poor stats...around 3Mb/second. I've managed to improve this by running "hdparm -c3 -m16 -u1"...increased to around 7.5Mb/second...still not great. Got an error if I tried to enable DMA. I checked a different server I've have with matching hardware which is setup as default from the company and the drive on there is getting around 70mb/second but is showing as "sda" (ie SATA) rather than "hda" (ie IDE). Why has CentOS 5.2 picked these drives up as IDE rather than SATA and how can I change it?

Thanks, Sean.
Posted on: 2008/9/7 13:11
Create PDF from Post Print
Top
  •  Astek777
      Astek777
Re: Extremely Sluggish CentOS 5.2 (Final) with Software RAID1
#5
Newbie
Joined: 2008/9/6
From
Posts: 5
I'm doing well answering my own questions!

Looked around some more and have found that if I add "hda=noprobe" to the end of my Grub statement it defaults to the Bios settings and loads my HDD as SATA with an 80Mb/second transfer rate...that's more like it!
Posted on: 2008/9/7 17:26
Create PDF from Post Print
Top
  •  AlanBartlett
      AlanBartlett
Re: Extremely Sluggish CentOS 5.2 (Final) with Software RAID1
#6
Moderator
Joined: 2007/10/22
From ~/Earth/UK/England/Suffolk
Posts: 9187
Quote:
I'm doing well answering my own questions!

Please don't stop - you're doing very well.

One thing that concerns me: Why did the installer take it upon itself to identify and use those disks as hd rather then sd? Perhaps the installer needed the noprobe option when it was booted?

If this new system has not yet been used, I wonder if a re-install may be a good idea?
_________________
Alan

100% Unix & Linux. Co-founder of the ELRepo Project.
Posted on: 2008/9/7 18:01
Create PDF from Post Print
Top
  •  Astek777
      Astek777
Re: Extremely Sluggish CentOS 5.2 (Final) with Software RAID1
#7
Newbie
Joined: 2008/9/6
From
Posts: 5
Hi Alan, thanks for your comments.

I think you're probably right...it was one of my first installs of CentOS and I just assumed (wrongly) that it would automatically pick-up the SATA drives. In future I will set the "noprobe" option before install but as the server is live it's going to have to stay like this for the minute. I edited /etc/grub.conf and hardcoded the "noprobe" options in. Seems to work fine although probably not ideal.

I've just re-enabled the second drive via Bios and set this hard drive to "noprobe" too. For some reason this drive came up as "hdc" rather than "hdb"...I'm sure it's trying to confuse me on puropose!

Anyway, after having searched around for a while I've finally managed to rebuild my RAID 1 setup. Running "cat /proc/mdstat" reviled that RAID 1 was still setup but out of sync...I was getting "U_" against each raided partition. I ran "mdadm --add /dev/mdX /dev/sdbX" for each raided partition to re-add and resync everything. Running "watch /proc/mdstat" lets you watch the rebuild process.

Hope this information might come in useful to somebody else as it's taken me most the weekend to sort!

I love Linux but I'm still a long way from understanding it!
Posted on: 2008/9/7 19:25
Create PDF from Post Print
Top
  •  AlanBartlett
      AlanBartlett
Re: Extremely Sluggish CentOS 5.2 (Final) with Software RAID1
#8
Moderator
Joined: 2007/10/22
From ~/Earth/UK/England/Suffolk
Posts: 9187
Sean,

Hopefully our software RAID expert, Gerald Clark, will spot this thread tomorrow and then will be able to give you some advice.
_________________
Alan

100% Unix & Linux. Co-founder of the ELRepo Project.
Posted on: 2008/9/7 19:42
Create PDF from Post Print
Top
  •  centuser1
      centuser1
Re: Extremely Sluggish CentOS 5.2 (Final) with Software RAID1
#9
Jr Board Member
Joined: 2008/3/14
From
Posts: 34
Good thing you are cruising along.

I made this page documenting my weeks of fun making it work.
Software raid and partitions

I learned that checking up on my motherboard manufactureres website was important to see if any issues with linux. I did find an issue and had to disable something in the bios. This was a significant development and one worth checking out. This had to do with my sata onboard card...

I went software raid too and I added all the commands you will need to check on the mirroring, cat /proc/mdstat , how to add a new drive to the array, how to set up a spare, how to re-add a drive you took out, how to make them all bootable, how to LVM partition, and a lot of other stuff.

I had such a hard time trying to get all this info...a real nightmare, that I posted it so others do not have to waste all their time figuring it out.
Even went so far as to tell you to buy drives from different manfacturing batches, so in case a batch is bad, all your drives do not fail, just the one from that batch.

I hope it helps and if you have anything to add to it, shoot me a mail and I will add it...this is for everyone, so the more info the better.
Posted on: 2008/9/8 1:04
Create PDF from Post Print
Top
  •  gerald_clark
      gerald_clark
Re: Extremely Sluggish CentOS 5.2 (Final) with Software RAID1
#10
Professional Board Member
Joined: 2005/8/5
From Northern Illinois, USA
Posts: 6259
Looks like Astek is doing fine.
Just make sure to install GRUB on both drives.
This will install GRUB on the second drive for either hd1 or sd1.
( Grub uses BIOS names, so hd1 is the second hard drive whether PATA or SATA. )
echo -e "root (hd1,0)\nsetup (hd1)\nquit" | grub
Posted on: 2008/9/8 15:30
Create PDF from Post Print
Top
 Top   Previous Topic   Next Topic

 


 You cannot start a new topic.
 You can view topic.
 You cannot reply to posts.
 You cannot edit your posts.
 You cannot delete your posts.
 You cannot add new polls.
 You cannot vote in polls.
 You cannot attach files to posts.
 You cannot post without approval.




"Linux" is a registered trademark of Linus Torvalds. | All other trademarks are property of their respective owners. | All other content is Copyright @ 2004-2009 by the CentOS Project or "each individual contributor (forums, comments, etc.) unless otherwise assigned".| Theme based on a theme by 7dana.com