Disk bandwidth - new file versus existing file using dd

I wanted to measure disk throughput using the following command:

dd if=/dev/zero of=/mydir/junkfile bs=4k count=125000 

If the junkfile exists, my disk bandwidth is 6 times less than if the junkfile does not exist. I repeated this many times and the results are saved. Does anyone know why?

Thanks,

Amir.

+4
source share
1 answer

To minimize disk caching, you need to copy an amount significantly larger than the amount of memory in your system. 2X the amount of RAM on your server is a useful amount.

from http://www.westnet.com/~gsmith/content/postgresql/pg-disktesting.htm

+3
source

Source: https://habr.com/ru/post/1413605/


All Articles