Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

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

Eg:

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

2 Answers

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.

--dave

share|improve this answer
add comment

Try:

hdparm -Tt /dev/ram0

You should consider using tmpfs rather than ramdisk

share|improve this answer
add comment

Your Answer

 
discard

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.