Quote:
Originally Posted by
nytty
Alright, I get your point. I though that using /dev/sdb1 moves to position 0
AFAIK hdparm only gives you the speed of the disk and not the time of reading a given amount of data.
Do a little math. x megabytes per second is 1/x seconds per megabyte.
Quote:
So far with my tests I find that reading 16kb takes about the same time as reading 512b.
Disks do read-ahead for you. Disks transfer to the host in larger bundles than 512 bytes anyway. Disks even do their own
caching which the OS has no control over, which is going to throw off all your results supremely.
Too bad there isn't a tool which can tell you more about what your disk's doing, test uncached reads, or even configure hardware read-ahead to your preference... something like hdparm...
Quote:
I need this information to set the optimal page size of my system (oracle and mysql suggest these sizes)
Tell me exactly what they're asking you. I suspect you've gotten it a bit mixed up.
Quote:
Can you elaborate on why dropping the caches is a bad idea?
Because it's not realistic. Your system needs cache to work. Disk speeds are going to be awful without it.
Quote:
How about this sudo procedure:
- drop_caches
- flush disk-cache with hdparm
- make sure dd is in memory
- position the read head randomly on disk
- with DD: read X amount of bytes from the beginning of my file (this is timed)
Same problem as the exact same thing you did before. YOu're running huge programs to do tiny things and your results are going to be meaningless.