Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I would like to know which of both is faster; a tmpfs or a ext4 ramdisk.

If someone knows a good way to benchmark disk perfomance on ubuntu, I will gladly do the test myself and post the results.

Best regards

Tom

share|improve this question
add comment

2 Answers 2

up vote 4 down vote accepted

For many file operations, they probably have approximately the same speed. If you have journaling turned on for the ext4 filesystem though, that might slow things down.

However, the main benefit of tmpfs is that it only uses as much RAM (or swap) as is needed to store the files. In contrast, a 500MB ramdisk will use that much RAM whether it is 10% full or 100% full.

share|improve this answer
add comment

tmpfs of course. It also avoids having to preallocate a fixed size of ram. One common disk benchmark is bonnie++.

share|improve this answer
    
Also, ext4fs implies journaling is turned on, which would add overhead to whatever was written. –  CraigM May 12 '11 at 1:18
    
That's not strictly true. It is possible to create ext4 file systems without a journal. They added that feature to make it a possible upgrade path for both ext2 and ext3 users. –  James Henstridge May 12 '11 at 3:10
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.