Harddrive vs ramdisk vs tmpfs benchmark

Discussion in 'Bukkit Help' started by croxis, Jan 28, 2011.

Thread Status:
Not open for further replies.
  1. Offline

    croxis

    tl;dr: tmpfs and ramdisk are super faster than physical hard disk. Tmpfs and ramdisk are about the same speed.

    Based on the discussion in this thread I decided to attempt to simulate world read/write performance on the three mediums. It is reported that ramdisks are more efficient than tmpfs. However unlike a ramdisk, tmpfs size dynamically, so will only take up the ram it needs. I'll update this post as I go along.

    I should note that I've never done any benchmarking before, so if my methology can be improved, please let me know :)

    The program used is called iozone. It provides a number of benchmarks for disk io performance. I am using 10 read/write threads to work with 100 4k files. I created a minetest directory to which filesystems are mounted to. I will report random read, random write and random mix use(50/50).

    Script used:
    Code:
    iozone -r 4k -s 4k -t 10 -F minetest/tmp0 minetest/tmp1 minetest/tmp2 minetest/tmp3 minetest/tmp4 minetest/tmp5 minetest/tmp6 minetest/tmp7 minetest/tmp8 minetest/tmp9 minetest/tmp10 minetest/tmp0 minetest/tmp11 minetest/tmp12 minetest/tmp13 minetest/tmp14 minetest/tmp15 minetest/tmp16 minetest/tmp17 minetest/tmp18 minetest/tmp19 minetest/tmp20 minetest/tmp21 minetest/tmp22 minetest/tmp23 minetest/tmp24 minetest/tmp25 minetest/tmp26 minetest/tmp27 minetest/tmp28 minetest/tmp29 minetest/tmp30 minetest/tmp31 minetest/tmp32 minetest/tmp33 minetest/tmp34 minetest/tmp35 minetest/tmp36 minetest/tmp37 minetest/tmp38 minetest/tmp39 minetest/tmp40 minetest/tmp41 minetest/tmp42 minetest/tmp43 minetest/tmp44 minetest/tmp45 minetest/tmp46 minetest/tmp47 minetest/tmp48 minetest/tmp49 minetest/tmp50 minetest/tmp51 minetest/tmp52 minetest/tmp53 minetest/tmp54 minetest/tmp55 minetest/tmp56 minetest/tmp57 minetest/tmp58 minetest/tmp59 minetest/tmp60 minetest/tmp61 minetest/tmp62 minetest/tmp63 minetest/tmp64 minetest/tmp65 minetest/tmp66 minetest/tmp67 minetest/tmp68 minetest/tmp69 minetest/tmp70 minetest/tmp71 minetest/tmp72 minetest/tmp73 minetest/tmp74 minetest/tmp75 minetest/tmp76 minetest/tmp77 minetest/tmp78 minetest/tmp79 minetest/tmp80 minetest/tmp81 minetest/tmp82 minetest/tmp83 minetest/tmp84 minetest/tmp85 minetest/tmp86 minetest/tmp87 minetest/tmp88 minetest/tmp89 minetest/tmp90 minetest/tmp91 minetest/tmp92 minetest/tmp93 minetest/tmp94 minetest/tmp95 minetest/tmp96 minetest/tmp97 minetest/tmp98 minetest/tmp99
    System 1: Desktop -- Kubuntu Natty 64 bit.
    350 MB HD, 7200 rmp with ext4 partition.
    Core2 Duo 6700@ 2.66 GHz
    4 MB RAM
    This is a standard desktop, this simulation represents users who run a server on their home machine. Important values bolded.

    HDD:
    Children see throughput for 10 random readers = 142414.30 KB/sec
    Parent sees throughput for 10 random readers = 225.30 KB/sec
    Min throughput per process = 0.00 KB/sec
    Max throughput per process = 142414.30 KB/sec
    Avg throughput per process = 14241.43 KB/sec
    Min xfer = 0.00 KB

    Children see throughput for 10 mixed workload = 114281.78 KB/sec
    Parent sees throughput for 10 mixed workload = 48.99 KB/sec
    Min throughput per process = 0.00 KB/sec
    Max throughput per process = 114281.78 KB/sec
    Avg throughput per process = 11428.18 KB/sec
    Min xfer = 0.00 KB

    Children see throughput for 10 random writers = 129248.69 KB/sec
    Parent sees throughput for 10 random writers = 49.23 KB/sec
    Min throughput per process = 0.00 KB/sec
    Max throughput per process = 129248.69 KB/sec
    Avg throughput per process = 12924.87 KB/sec
    Min xfer = 0.00 KB

    TMPFS -- default values (sudo mount -t tmpfs tmpfs minetest).
    Children see throughput for 10 random readers = 144133.31 KB/sec
    Parent sees throughput for 10 random readers = 2357.71 KB/sec
    Min throughput per process = 0.00 KB/sec
    Max throughput per process = 142414.30 KB/sec
    Avg throughput per process = 14413.33 KB/sec
    Min xfer = 0.00 KB

    Children see throughput for 10 mixed workload = 147419.83 KB/sec
    Parent sees throughput for 10 mixed workload = 1097.71 KB/sec
    Min throughput per process = 0.00 KB/sec
    Max throughput per process = 147419.83 KB/sec
    Avg throughput per process = 14741.98 KB/sec

    Children see throughput for 10 random writers = 147419.83 KB/sec
    Parent sees throughput for 10 random writers = 953.48 KB/sec
    Min throughput per process = 0.00 KB/sec
    Max throughput per process = 147419.83 KB/sec
    Avg throughput per process = 14741.98 KB/sec

    RAMDISK -- 256MB (sudo mount -t ramfs -o mode=1777,size=256m ramfs minetest/)
    Children see throughput for 10 random readers = 120868.35 KB/sec
    Parent sees throughput for 10 random readers = 1003.25 KB/sec
    Min throughput per process = 0.00 KB/sec
    Max throughput per process = 120868.35 KB/sec
    Avg throughput per process = 12086.84 KB/sec

    Children see throughput for 10 mixed workload = 200191.84 KB/sec
    Parent sees throughput for 10 mixed workload = 1108.67 KB/sec
    Min throughput per process = 0.00 KB/sec
    Max throughput per process = 200191.84 KB/sec
    Avg throughput per process = 20019.18 KB/sec

    Children see throughput for 10 random writers = 267128.91 KB/sec
    Parent sees throughput for 10 random writers = 746.29 KB/sec
    Min throughput per process = 0.00 KB/sec
    Max throughput per process = 267128.91 KB/sec
    Avg throughput per process = 26712.89 KB/sec

    Summery -- mixed workload -- First run:
    Disk: 48.99 KB/sec
    TMPFS: 1097.71 KB/sec
    RAMDISK: 1108.67 KB/sec

    10 run average:
    Tmpfs: 879.6
    RAMDISK: 942.4
    Two tailed t score: 0.49
    Therefor the differences in speed are NOT significant, which means for this test run the differences between tmpfs and ramdisk are not significant.
     
  2. Offline

    TnT Retired Staff

    Thanks for settling that debate.
     
Thread Status:
Not open for further replies.

Share This Page