[SOLVED] (very) slow I/O operations

Started by Corto, March 19, 2014, 11:36:04 AM

Previous topic - Next topic

Corto

Hi there,
yesterday I needed to untar an archive from the Downloads dir of my Debian installation on my Olinuxino (located in the microSD where the system is too) to another dir located on the second SD... the operation was extremely slow, so I thought: "maybe the cheaper SD card I'm using is not so fast, let's try to untar on the SATA drive!", I did it and i obtained the same embarassing speed.
Trying to untar in the system device instead results in relatively fast operation so, my question is: are there some well known problems related to I/O operation? Did someone have the same experience or this is just a problem of mine?
Thank you a lot!

Corto

Just to clarify the problem I did some tests on the RW speed.

This is my situation:
/dev/mmcblk0 is the device where the system is installed in (microSD)
/dev/mmcblk1 is the SD card mounted in /var/www
/dev/sda is the SATA drive (3.5" 250GB 7200rpm HD) mounted in /home/data

Please note that the class of the two cards in not known (they are 2 really cheap ones reused from old cellphones) but it doesn't care, the lack of speed is not comparable to the expected behavior, also for low class cards as you will see.

I used hdparm and dd to test read and write speed on these devices, these are the outputs from tests:

hdparm -tT /dev/mmcblk0

/dev/mmcblk0:
Timing cached reads:   304 MB in  2.00 seconds = 151.66 MB/sec
Timing buffered disk reads:  34 MB in  3.08 seconds =  11.05 MB/sec


hdparm -tT /dev/mmcblk1

/dev/mmcblk1:
Timing cached reads:   314 MB in  2.01 seconds = 156.17 MB/sec
Timing buffered disk reads:  42 MB in  3.09 seconds =  13.58 MB/sec


hdparm -tT /dev/sda
/dev/sda:
Timing cached reads:   342 MB in  2.00 seconds = 170.74 MB/sec
Timing buffered disk reads: 186 MB in  3.02 seconds =  61.49 MB/sec


Well, read tests are acceptable I would say...

dd if=/dev/zero of=/tmp/tempfile bs=8k count=1k; rm -f /tmp/tempfile
1024+0 records in
1024+0 records out
8388608 bytes (8.4 MB) copied, 0.486781 s, 17.2 MB/s


dd if=/dev/zero of=/var/www/tempfile bs=8k count=1k; rm -f /var/www/tempfile
1024+0 records in
1024+0 records out
8388608 bytes (8.4 MB) copied, 627.462 s, 13.4 kB/s


dd if=/dev/zero of=/home/data/tempfile bs=8k count=1k; rm -f /home/data/tempfile
1024+0 records in
1024+0 records out
8388608 bytes (8.4 MB) copied, 72.852 s, 115 kB/s


As you can see the write speed is embarassing both for the SD card and for the SATA drive while the problem doesn't exist for the system (microSD) drive.

Suggestions?

Corto

Solved.

The problem was due to the fact that I mounted the 2 devices with the sync option. Removed this write rates reach about 60 MB/s, as expected.