IO Performance Difference between VM and Container

Discussion in 'General Chat' started by DigitalDaz, Sep 28, 2017.

  1. DigitalDaz

    DigitalDaz Administrator Staff Member

    We have just been discussing on IRC the pros and cons of different virtualisation types so I thought I would post the results of a couple of tests I just made.

    I currently use Proxmox in a Ceph cluster, three nodes, replicating to all 3.

    Here are the test results of two different technologies on the same host.

    Here is the virtual machine:

    Code:
    Multiple IO Tester
    
    This application emulates a busy server in several states by launching multiple
    threads that do various types of IO. This allows us to see what the consequences
    are of running in a multitasking environment. This test uses direct IO and
    invalidates caches between tests, testing the disk, not the memory.
    
    NOTE: You need at least 3GB of free space in your current working directory.
    
    The following tests currently consist of:
    
      8 sequential readers
      8 sequential writers
      8 mixed seqential readers/writers (random choice per IO)
      8 random readers
      8 random writers
      8 mixed random readers/writers (random choice per IO)
    
    Feel free to modify the script to meet your needs. Enjoy!
    
    The test should take less than 2 minutes. Press <ENTER> to begin...
    
     running IO "sequential read" test...
            result is 632.25MB per second
    
     running IO "sequential write" test...
            result is 271.08MB per second
    
     running IO "seq read/seq write" test...
            result is 173.74MB/164.91MB per second
    
     running IO "random read" test...
            result is 91.21MB per second
            equals 23349.0 IOs per second
    
     running IO "random write" test...
            result is 54.95MB per second
            equals 14068.0 IOs per second
    
     running IO "rand read/rand write" test...
            result is 36.25MB/36.19MB per second
            equals 9279.8/9265.8 IOs per second
    
    Here is an LXC container:

    Code:
    Multiple IO Tester
    
      This application emulates a busy server in several states by launching multiple
    threads that do various types of IO. This allows us to see what the consequences
    are of running in a multitasking environment. This test uses direct IO and
    invalidates caches between tests, testing the disk, not the memory.
    
    NOTE: You need at least 3GB of free space in your current working directory.
    
    The following tests currently consist of:
    
      8 sequential readers
      8 sequential writers
      8 mixed seqential readers/writers (random choice per IO)
      8 random readers
      8 random writers
      8 mixed random readers/writers (random choice per IO)
    
    Feel free to modify the script to meet your needs. Enjoy!
    
    The test should take less than 2 minutes. Press <ENTER> to begin...
    
    running IO "sequential read" test...
            result is 831.76MB per second
    
    running IO "sequential write" test...
            result is 455.36MB per second
    
    running IO "seq read/seq write" test...
            result is 312.55MB/265.15MB per second
    
    running IO "random read" test...
            result is 184.23MB per second
            equals 47163.2 IOs per second
    
    running IO "random write" test...
            result is 198.99MB per second
            equals 50941.8 IOs per second
    
    running IO "rand read/rand write" test...
            result is 101.80MB/101.76MB per second
            equals 26062.0/26050.0 IOs per second
    
    
    Take particular note of the last three random tests, these are the most important to us in a virtualisation workload.

    As you can see, the container doesn't just beat the VM, it demolishes it!
     

Share This Page