Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
(Solved) Weird drop of hard disk performance!
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
Apopatos
Guru
Guru


Joined: 17 Oct 2004
Posts: 512
Location: Hellas

PostPosted: Fri Jan 11, 2008 4:22 pm    Post subject: (Solved) Weird drop of hard disk performance! Reply with quote

Hi guys,
I bought a new hard disk and installing gentoo.
When I compiled my kernel and booted it was as fast as a dream. The T option of hdparm gave about 1000 MB/s. I continued to emerge software when suddenly, after few hours, I noticed a slowness to both my hard disks. hdparm now gives:
/dev/sda
Timing cached reads: 467.15 MB/s

/dev/sdb
Timing cached reads: 464.44 MB/s

Which menas it dropped by 50% :S

I tried the livecd and I got 946.62 MB/s for sda and 971.22 MB/s for sdb. These are normal numbers I used to get to my original system few hours ago.
I chrooted to my system and the numbers dropped again to: 499.87 and 499.55 MB/s.

Weird! Isn't it?
Any idea guys?

(sorry for writing like this but I'm posting from command line and is difficult to copy-paste, insert code etc) :)


Last edited by Apopatos on Wed Jan 30, 2008 9:58 pm; edited 1 time in total
Back to top
View user's profile Send private message
Urban Cowboy
n00b
n00b


Joined: 09 Oct 2007
Posts: 64

PostPosted: Fri Jan 11, 2008 5:24 pm    Post subject: Reply with quote

From what I understand, I think hdparm only really works well for IDE devices. Not so much for SATA or SCSI.

Also, during LiveCD use, I think most of the stuff being used by the computer is read off the CD or is stored in the RAM, making it much faster.

For SCSI and SATA disks, try using sdparm
_________________
Anything worth doing is worth over-doing. Moderation is for cowards.
Back to top
View user's profile Send private message
Apopatos
Guru
Guru


Joined: 17 Oct 2004
Posts: 512
Location: Hellas

PostPosted: Fri Jan 11, 2008 5:33 pm    Post subject: Reply with quote

400MB/s are too low even if hdparm works well or not. The hard disks delay a lot, it's obvious when I use them.
I tried my second drive to another computer with different distribution. It gives 995+ Mb/s as my gentoo used to do few hours ago. :S
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9891
Location: almost Mile High in the USA

PostPosted: Fri Jan 11, 2008 10:08 pm    Post subject: Reply with quote

Make sure your versions of hdparm are the same for both before and after, or better yet, use the same binary.

Version 6.9 of hdparm made a large calculation difference in cached speeds.
_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
Apopatos
Guru
Guru


Joined: 17 Oct 2004
Posts: 512
Location: Hellas

PostPosted: Sat Jan 12, 2008 3:06 am    Post subject: Reply with quote

Indeed in the live cd there is hdparm 6.6. I Have 7.7 but there isn't an ebuild previous than 7.7. Where can I find one?
Here there is 7.7 as well:
http://tinderbox.dev.gentoo.org/html/default-linux/amd64/hdparm-7.7.html
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9891
Location: almost Mile High in the USA

PostPosted: Sat Jan 12, 2008 3:35 pm    Post subject: Reply with quote

for the most part, if you take a pre-6.9 version's result and approximately divide by 2, that's what the post 6.9 binary would generate for may older machines. For newer machines it will produce a higher number.

The cached reads number is fairly inconsequential, what are your relative (from run to run)
- Buffered disk reads
- Bogomips
- DMA settings

Those will have a larger impact of your machine.

The thing that I'm suspecting now is that you installed the 6.6 version of hdparm from the livecd and tested it, then during the install you picked up the latest version, 7.7, and your speed went "down" when it really just was counted differently.
_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
Apopatos
Guru
Guru


Joined: 17 Oct 2004
Posts: 512
Location: Hellas

PostPosted: Sat Jan 12, 2008 5:33 pm    Post subject: Reply with quote

But my system is significantly slower now. emerge needs a lot of time when it was much faster before and the video thumbnails are generated much slower now plus both the hard disks are noisy while before weren't at all!
Back to top
View user's profile Send private message
Apopatos
Guru
Guru


Joined: 17 Oct 2004
Posts: 512
Location: Hellas

PostPosted: Mon Jan 14, 2008 2:44 am    Post subject: Reply with quote

Ok I installed version 6.6. "Timing cached reads" is improved the noises stays and when I try copy many big files (over one GB) from sdb to sda and vice versa they "run" with 50-60 mb/s but after few minutes it drops to 10-20mb/s. Is that normal?
Every partition is in reiserfs.
Back to top
View user's profile Send private message
drescherjm
Advocate
Advocate


Joined: 05 Jun 2004
Posts: 2790
Location: Pittsburgh, PA, USA

PostPosted: Mon Jan 14, 2008 3:43 pm    Post subject: Reply with quote

Quote:
they "run" with 50-60 mb/s but after few minutes it drops to 10-20mb/s. Is that normal?


This could be the result of cache. You may want to eliminate the filesystem from the equation by using dd

Quote:
dd if=/dev/sda of=/dev/null bs=8M count=100


If you have a recent dd it will tell you the rate as well as the time it took.
_________________
John

My gentoo overlay
Instructons for overlay
Back to top
View user's profile Send private message
drescherjm
Advocate
Advocate


Joined: 05 Jun 2004
Posts: 2790
Location: Pittsburgh, PA, USA

PostPosted: Mon Jan 14, 2008 3:46 pm    Post subject: Re: Weird drop of hard disk performance! Reply with quote

Apopatos wrote:
Hi guys,
I bought a new hard disk and installing gentoo.
When I compiled my kernel and booted it was as fast as a dream. The T option of hdparm gave about 1000 MB/s. I continued to emerge software when suddenly, after few hours, I noticed a slowness to both my hard disks. hdparm now gives:
/dev/sda
Timing cached reads: 467.15 MB/s

/dev/sdb
Timing cached reads: 464.44 MB/s

Which menas it dropped by 50% :S

I tried the livecd and I got 946.62 MB/s for sda and 971.22 MB/s for sdb. These are normal numbers I used to get to my original system few hours ago.
I chrooted to my system and the numbers dropped again to: 499.87 and 499.55 MB/s.

Weird! Isn't it?
Any idea guys?


The cached reads are more a benchmark of your CPU/memory than your disk subsystem. Depending on what computer I do this at work and at home I get between 1000 MB/s and 2600MB/s.

You may want to check your memory timings. Did you add more memory or change any bios settings? Are you using x86? If so have you activated the kernel setting for accessing memory over 1GB?
_________________
John

My gentoo overlay
Instructons for overlay
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9891
Location: almost Mile High in the USA

PostPosted: Mon Jan 14, 2008 6:25 pm    Post subject: Reply with quote

run 'top' and see if there are any processes running in the background.

There's no reason to run hdparm-6.6, all it is - is an epeen boost with a larger number...

What CPU are you running?
Most Core2 chips should be in the Gbyte/s range for cached reads.

These are all with hdparm-7.7 for comparison, but it looks like this is not your issue since you got the same number with hdparm-6.6 when the machine is in "slow" mode.

My 1.8GHz athlon is slow (and may be an issue, could anyone compare? 256K L2, SiS735 chipset):
Timing cached reads: 538 MB in 2.01 seconds = 268.23 MB/sec

My 1.6GHz Pentium-M is also fairly low (2M L2):
Timing cached reads: 1162 MB in 2.00 seconds = 580.39 MB/sec

My 1.3GHz Madison is a bit higher (3M L2):
Timing cached reads: 2444 MB in 2.00 seconds = 1222.59 MB/sec

My 2.6GHz Core2 is ludicrous (4M L2):
Timing cached reads: 7032 MB in 2.00 seconds = 3518.92 MB/sec
_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
Apopatos
Guru
Guru


Joined: 17 Oct 2004
Posts: 512
Location: Hellas

PostPosted: Wed Jan 16, 2008 3:15 pm    Post subject: Reply with quote

Thank you very much guys for your answers.
Indeed there isn't any change to the speed of the hard disk if I try hdparm 6.6 or 7.7 but the displayed numbers.
Now why sometimes when I copy large files the speed is less than 20 mb/s and sometimes over 50, I can't figure out.

I have athlon64 3000+ with 64bit installed gentoo. RAM 768 and filesystem reiserfs.
My hard disks are two Seagate Barracuda. 500GB with 32 mb cache and 320 GB with 16mb cache.
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9891
Location: almost Mile High in the USA

PostPosted: Wed Jan 16, 2008 11:23 pm    Post subject: Reply with quote

when it's running at 50MB/sec and then 20MB/sec, are you measuring through 'cp' or 'hdparm'?

When the machine is running at 50MB/sec, what does hdparm -t /dev/sda report, and when it's running slow, the same?

When you run 'top' do you see anything running in the background such as updatedb?
_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
Apopatos
Guru
Guru


Joined: 17 Oct 2004
Posts: 512
Location: Hellas

PostPosted: Thu Jan 17, 2008 12:22 am    Post subject: Reply with quote

eccerr0r wrote:
when it's running at 50MB/sec and then 20MB/sec, are you measuring through 'cp' or 'hdparm'?

When the machine is running at 50MB/sec, what does hdparm -t /dev/sda report, and when it's running slow, the same?

When you run 'top' do you see anything running in the background such as updatedb?

I'm measuring it with gkrellm. When I run hdparm -t /dev/sdx it reports about the same as gkrellm does.
top displays nothing that uses too much CPU (actually gkrellm displays CPU 1-2% as it always uses to be). During the time the copy takes place the CPU is 45-55%
I searched the net and found some benchmarks about the filesystems. reiserfs is very fast with large files and slower with a lot small ones. My files are 350 MB to 2 GB. I noticed the slowness exists only when I copy directories with a lot of files inside not single ones. So I assume is just a filesystem problem.
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9891
Location: almost Mile High in the USA

PostPosted: Thu Jan 17, 2008 12:51 am    Post subject: Reply with quote

All filesystems will slow down a bit for small files; but the specialty of reiserfs is that it will consume CPU cycles for small files as it will pack the small files better.

Small files are files less than one block, so more like 0 bytes to probably around 16K bytes. Do you have a lot of these?

hdparm should virtually report the same speed all the time since it does not use files. If you see hdparm dropping, then this is unexpected behavior.

Mark your topic with [Solved] if you're now sure this is what's happening...
_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum