I am back again with a new query regarding disk read and write. While performing a disk read, For eg:- say 1MB of data, speed of read is 50 to 100MB/sec. If i perform a disk writeimmediately followed by disk read, then speed of read is 1000 to 1200MB/sec. Large variation in speed. i.e. if disk read operation is performed alone, speed is very low. if a disk write is done and then immediately read it, then read speed is very high. Is this also issue with cache ?
When you first read the data, it has to be transferred from the disk, so you are seeing times related to your disk performance. When you write the data first, it is stored in the cache, so reading it afterwards is like reading from a ram disk. If you write enough, more than the size of the cache, you will find that the disk reads afterwards will be slow again.