Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Can we measure I/O performance of ramdisk(/dev/ram0) ?

AFAIK I/O performance can be measured using 'dd' command.


# dd if=/dev/zero of=/mnt/ramdisk0/file bs=1k count=200
share|improve this question

Since the ramdisk is on the same machine where you are going to have to run the loads, there will be some bias towards reporting slower performance as you increase the load, but...

Measure the time it takes to execute 1 dd write, as described above, over perhaps 10 runs. Do the same for reads, but watch out for outliers as the cache warms.

Do the same for 2, 3, 4, ... dd writes simultaneously, until the time start to increase rapidly, but keep on testing until the response time is about 10 times what you measured initially.

Now plot response times against load. You should get a curve that looks like a hockey-stick, i.e. "_/" so you can plot load against performance for the device.


share|improve this answer


hdparm -Tt /dev/ram0

You should consider using tmpfs rather than ramdisk

share|improve this answer

For Write:

dd if=/dev/zero of=/dev/shm/ram/test bs=1048576 count=4096 oflag=nocache conv=fsync

For Read:

dd if=/dev/shm/ram/test of=/dev/null bs=1048576 iflag=nocache,sync conv=nocreat

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.