On 05/23/2013 10:13 PM, Henrik Carlqvist wrote:
> On Wed, 22 May 2013 19:41:24 +0100, Peter Chant wrote:
>> This machine has always to me been slow with respect to IO. Could never
>> put my finger on why though.
>
> Maybe it would be worth doing some benchmarks to find out when and why
> the machine is slow. Some quick tests on raw io read performance:
>
I've had a quick go with your IO tests, results below for info. sda is
an SSD and sdb a hdd. Apart from the last large copy the numbers don't
look too bad.
However, I'm coming to a firm conclusion that the main culprit is
kswapd0. Every so often iotop reports that it is maxing the disk IO
despite reporting nothing for read, write or 'SWAPIN'. Googling shows
that others have had such an issue, but not a great number and I can't
find a clear solution. There does not appear to be any specific bug
identified or fixed. I'm running 3.7.7, there are a few comments on
3.7.x and 3.8.x kernels but also one from the 2.4.x series. I can't
nail down anything specific in searches.
One reporter did suggest faulty ram, but stated that memtest did not
show anything up. I'm not convinced by this argument, surely if I had
faulty ram then the machine would be very flakey - and faulty ram that
does not show up in memtest??? I've not got any spare ram to do a swap
and I don't fancy shelling out on a small chance it might be ram.
> Raw read of first 100 MB of disk (the first part is usually quickest):
> bash-4.1# dd if=/dev/sda of=/dev/null bs=1024 count=102400
> 102400+0 records in
> 102400+0 records out
> 104857600 bytes (105 MB) copied, 0.965756 s, 109 MB/s
bash-4.2# dd if=/dev/sda of=/dev/null bs=1024 count=102400
102400+0 records in
102400+0 records out
104857600 bytes (105 MB) copied, 0.404738 s, 259 MB/s
bash-4.2# dd if=/dev/sdb of=/dev/null bs=1024 count=102400
102400+0 records in
102400+0 records out
104857600 bytes (105 MB) copied, 0.939816 s, 112 MB/s
bash-4.2#
>
> Some more data:
> bash-4.1# dd if=/dev/sda of=/dev/null bs=1024 count=10240000
> 10240000+0 records in
> 10240000+0 records out
> 10485760000 bytes (10 GB) copied, 91.3584 s, 115 MB/s
bash-4.2# dd if=/dev/sda of=/dev/null bs=1024 count=10240000
10240000+0 records in
10240000+0 records out
10485760000 bytes (10 GB) copied, 38.7211 s, 271 MB/s
bash-4.2#
>
> Not at the beginning of the disk but 400 GB into the disk:
> bash-4.1# dd if=/dev/sda of=/dev/null bs=1024 count=10240000
> skip=409600000
> 10240000+0 records in
> 10240000+0 records out
> 10485760000 bytes (10 GB) copied, 114.32 s, 91.7 MB/s
bash-4.2# dd if=/dev/sdb of=/dev/null bs=1024 count=10240000
10240000+0 records in
10240000+0 records out
10485760000 bytes (10 GB) copied, 151.027 s, 69.4 MB/s
bash-4.2#