Is the time it takes to retrieve data from disk to RAM linear?


Let’s suppose that it takes X seconds to retrieve 100MB from disk to RAM in one retrieval. Then does that mean that it will take also X seconds to retrieve the same 100MB divided up to 100MB/N per retrieval in N retrievals, where each retrieval is roughly takes X/N seconds?

>Solution :

It depends on various factors such as the storage device, the file system, the operating system and the retrieval method.

In general, when you perform multiple small retrievals, the time it takes to retrieve the data may be longer than if you perform a single large retrieval, due to the overhead of performing multiple operations. This is because the storage device may have to seek to different locations on the disk, which takes time, and the operating system may have to manage multiple requests.

Additionally, if you’re using a hard disk drive (HDD) as the storage device, the time it takes to retrieve the data may be longer because hard drives are slower than solid-state drives (SSD) when it comes to random read operations. However, if you’re using an SSD, the difference in retrieval time between multiple small retrievals and a single large retrieval may be less significant.

In the end, it’s hard to give a general answer without more information about the specific storage device, file system and operating system you’re using. But, in general, you should expect that multiple small retrievals might take longer than a single large retrieval.

Leave a ReplyCancel reply