Extremely Sluggish CentOS 5.2 (Final) with Software RAID1

General support questions including new installations

Extremely Sluggish CentOS 5.2 (Final) with Software RAID1

Postby Astek777 » 2008/09/06 12:55:18

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.
Astek777
 
Posts: 5
Joined: 2008/09/06 12:34:10

Re: Extremely Sluggish CentOS 5.2 (Final) with Software RAID1

Postby centuser1 » 2008/09/06 20:07:21

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.
centuser1
 
Posts: 34
Joined: 2008/03/14 13:37:00

Re: Extremely Sluggish CentOS 5.2 (Final) with Software RAID1

Postby Astek777 » 2008/09/07 10:23:01

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.
Astek777
 
Posts: 5
Joined: 2008/09/06 12:34:10

Re: Extremely Sluggish CentOS 5.2 (Final) with Software RAID1

Postby Astek777 » 2008/09/07 13:11:47

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.
Astek777
 
Posts: 5
Joined: 2008/09/06 12:34:10

Re: Extremely Sluggish CentOS 5.2 (Final) with Software RAID1

Postby Astek777 » 2008/09/07 17:26:18

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!
Astek777
 
Posts: 5
Joined: 2008/09/06 12:34:10

Re: Extremely Sluggish CentOS 5.2 (Final) with Software RAID1

Postby AlanBartlett » 2008/09/07 18:01:05

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?
User avatar
AlanBartlett
Forum Moderator
 
Posts: 8975
Joined: 2007/10/22 11:30:09
Location: ~/Earth/UK/England/Suffolk

Re: Extremely Sluggish CentOS 5.2 (Final) with Software RAID1

Postby Astek777 » 2008/09/07 19:25:39

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! :-)
Astek777
 
Posts: 5
Joined: 2008/09/06 12:34:10

Re: Extremely Sluggish CentOS 5.2 (Final) with Software RAID1

Postby AlanBartlett » 2008/09/07 19:42:38

Sean,

Hopefully our software RAID expert, Gerald Clark, will spot this thread tomorrow and then will be able to give you some advice.
User avatar
AlanBartlett
Forum Moderator
 
Posts: 8975
Joined: 2007/10/22 11:30:09
Location: ~/Earth/UK/England/Suffolk

Re: Extremely Sluggish CentOS 5.2 (Final) with Software RAID1

Postby centuser1 » 2008/09/08 01:04:50

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.
centuser1
 
Posts: 34
Joined: 2008/03/14 13:37:00

Extremely Sluggish CentOS 5.2 (Final) with Software RAID1

Postby gerald_clark » 2008/09/08 15:30:17

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
gerald_clark
 
Posts: 7166
Joined: 2005/08/05 15:19:54
Location: Northern Illinois, USA

Next

Return to CentOS 5 - General Support

Who is online

Users browsing this forum: Bing [Bot] and 1 guest