Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Disk Speed (FIO) vs Latency (IOPing) What's more important in real use case?
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

Disk Speed (FIO) vs Latency (IOPing) What's more important in real use case?

UmairUmair Member

Hello,

Well as the title says, I am trying to find out which one would be more important in real usage case. I understand, ideally the best speed and the lowest latency is ideal situation but sometimes achieving that is not possible (various factors, cost being one of them. also the available options). Also the use case might be different for different people so YMMV. Just trying to get more input from the experts here.

My usage case = Setting up a KVM server for a few VMs which will be running high traffic WordPress websites. (and that also means heavy database use for few of them).

Disk Setup A
Pretty great overall speed.

fio Disk Speed Tests (Mixed R/W 50/50):
---------------------------------
Block Size | 4k            (IOPS) | 64k           (IOPS)
  ------   | ---            ----  | ----           ----
Read       | 328.84 MB/s  (82.2k) | 1.03 GB/s    (16.1k)
Write      | 329.70 MB/s  (82.4k) | 1.03 GB/s    (16.2k)
Total      | 658.54 MB/s (164.6k) | 2.07 GB/s    (32.3k)
           |                      |
Block Size | 512k          (IOPS) | 1m            (IOPS)
  ------   | ---            ----  | ----           ----
Read       | 1.25 GB/s     (2.4k) | 1.36 GB/s     (1.3k)
Write      | 1.32 GB/s     (2.5k) | 1.45 GB/s     (1.4k)
Total      | 2.57 GB/s     (5.0k) | 2.82 GB/s     (2.7k)

However, latency kind of sucks.

[root@Dev ~]#  ioping -c 20 .
4 KiB <<< . (ext4 /): request=1 time=230.1 us (warmup)
4 KiB <<< . (ext4 /): request=2 time=7.02 ms
4 KiB <<< . (ext4 /): request=3 time=7.09 ms
4 KiB <<< . (ext4 /): request=4 time=6.99 ms
4 KiB <<< . (ext4 /): request=5 time=7.12 ms
4 KiB <<< . (ext4 /): request=6 time=7.14 ms
4 KiB <<< . (ext4 /): request=7 time=6.97 ms
4 KiB <<< . (ext4 /): request=8 time=7.07 ms
4 KiB <<< . (ext4 /): request=9 time=7.00 ms
4 KiB <<< . (ext4 /): request=10 time=7.01 ms
4 KiB <<< . (ext4 /): request=11 time=7.03 ms
4 KiB <<< . (ext4 /): request=12 time=7.16 ms
4 KiB <<< . (ext4 /): request=13 time=7.15 ms
4 KiB <<< . (ext4 /): request=14 time=7.16 ms
4 KiB <<< . (ext4 /): request=15 time=6.97 ms
4 KiB <<< . (ext4 /): request=16 time=6.92 ms
4 KiB <<< . (ext4 /): request=17 time=7.06 ms
4 KiB <<< . (ext4 /): request=18 time=7.14 ms
4 KiB <<< . (ext4 /): request=19 time=6.98 ms
4 KiB <<< . (ext4 /): request=20 time=7.01 ms

--- . (ext4 /) ioping statistics ---
19 requests completed in 134.0 ms, 76 KiB read, 141 iops, 567.2 KiB/s
generated 20 requests in 19.0 s, 80 KiB, 1 iops, 4.21 KiB/s
min/avg/max/mdev = 6.92 ms / 7.05 ms / 7.16 ms / 72.0 us

Disk Setup B

Not the best disk speed but not awfully bad either.

fio Disk Speed Tests (Mixed R/W 50/50):
---------------------------------
Block Size | 4k            (IOPS) | 64k           (IOPS)
  ------   | ---            ----  | ----           ----
Read       | 238.59 MB/s  (59.6k) | 598.12 MB/s   (9.3k)
Write      | 239.22 MB/s  (59.8k) | 601.27 MB/s   (9.3k)
Total      | 477.81 MB/s (119.4k) | 1.19 GB/s    (18.7k)
           |                      |
Block Size | 512k          (IOPS) | 1m            (IOPS)
  ------   | ---            ----  | ----           ----
Read       | 585.01 MB/s   (1.1k) | 582.03 MB/s    (568)
Write      | 616.10 MB/s   (1.2k) | 620.80 MB/s    (606)
Total      | 1.20 GB/s     (2.3k) | 1.20 GB/s     (1.1k)

However, the latency seems to be great

root@Dev2]# ioping -c 20 .
4 KiB <<< . (ext4 / ): request=1 time=132.8 us (warmup)
4 KiB <<< . (ext4 / ): request=2 time=200.4 us
4 KiB <<< . (ext4 / ): request=3 time=155.8 us
4 KiB <<< . (ext4 / ): request=4 time=180.7 us
4 KiB <<< . (ext4 / ): request=5 time=157.2 us
4 KiB <<< . (ext4 / ): request=6 time=167.0 us
4 KiB <<< . (ext4 / ): request=7 time=148.7 us (fast)
4 KiB <<< . (ext4 / ): request=8 time=185.4 us
4 KiB <<< . (ext4 / ): request=9 time=159.8 us
4 KiB <<< . (ext4 / ): request=10 time=150.4 us (fast)
4 KiB <<< . (ext4 / ): request=11 time=158.0 us
4 KiB <<< . (ext4 / ): request=12 time=185.1 us
4 KiB <<< . (ext4 / ): request=13 time=197.4 us
4 KiB <<< . (ext4 / ): request=14 time=178.9 us
4 KiB <<< . (ext4 / ): request=15 time=179.8 us
4 KiB <<< . (ext4 / ): request=16 time=147.5 us (fast)
4 KiB <<< . (ext4 / ): request=17 time=183.6 us
4 KiB <<< . (ext4 / ): request=18 time=148.2 us (fast)
4 KiB <<< . (ext4 / ): request=19 time=169.6 us
4 KiB <<< . (ext4 / ): request=20 time=180.8 us

--- . (ext4 / ) ioping statistics ---
19 requests completed in 3.23 ms, 76 KiB read, 5.87 k iops, 22.9 MiB/s
generated 20 requests in 19.0 s, 80 KiB, 1 iops, 4.21 KiB/s
min/avg/max/mdev = 147.5 us / 170.2 us / 200.4 us / 16.5 us

So if you are going to setup a KVM Server for a few VMs running high traffic (and heavy usage of Database), would you pick Setup A or Setup B ?

What is really important is actual usage ?? High speed ? Or low latency ??

FYI, the tests are run on a server which is practically empty (New setup).

Comments

  • chihcherngchihcherng Veteran
    edited July 2023

    I have been brainwashed that IOPS is important, so I will choose Setup A based on its higher IOPS performance.

    But you probably need page caching for better performance. The disk might not be that important.

    Thanked by 1Umair
  • febryanvaldofebryanvaldo Member
    edited July 2023

    @Umair said: What is really important is actual usage ?? High speed ? Or low latency ??

    I would say both, but i will prefer high IOPS over IOPing latency, as long as the latency is not over 250ms. If the latency over 250ms, then i will be considering the other options.

    I was using IOPing as my benchmark methodology (v1), but right now i'm not using it again, as VPS with NVMe or even SSD usually has IOPing latency less than 250ms, which is still pretty good.

    This is my sample of IOPing, back in 2022.

    Thanked by 1Umair
  • UmairUmair Member

    @febryanvaldo said:

    @Umair said: What is really important is actual usage ?? High speed ? Or low latency ??

    I would say both, but i will prefer high IOPS over IOPing latency, as long as the latency is not over 250ms. If the latency over 250ms, then i will be considering the other options.

    I was using IOPing as my benchmark methodology (v1), but right now i'm not using it again, as VPS with NVMe or even SSD usually has IOPing latency less than 250ms, which is still pretty good.

    Thanks for this. That gave me a good idea about latency.

    Looks like not many people are interested in this topic. So I guess I will look somewhere else for more answers/replies.

  • eva2000eva2000 Veteran
    edited July 2023

    If it's for database work specifically, why not test databases specifically? Coming up with your own sysbench MySQL test profile that approximates your database usage and testing those VPS servers might be better. I have a sysbench wrapper script to make some testing easier. Folks are free to modify it for their needs https://github.com/centminmod/centminmod-sysbench :D

    example on 2 cpu KVM VPS

    ./sysbench.sh mysqloltpnew
    
    sysbench mysql OLTP new benchmark:
    sysbench oltp_read_write.lua --mysql-host=localhost --mysql-port=3306 --mysql-socket=/var/lib/mysql/mysql.sock --mysql-user=sbtest --mysql-password=sbtestpass --mysql-db=sbt --mysql-storage-engine=InnoDB --time=30 --threads=2 --report-interval=1 --rand-type=uniform --rand-seed=1 --table-size=150000 --tables=8 --db-driver=mysql run
    sysbench 1.0.20 (using bundled LuaJIT 2.1.0-beta2)
    
    Running the test with following options:
    Number of threads: 2
    Report intermediate results every 1 second(s)
    Initializing random number generator from seed (1).
    
    
    Initializing worker threads...
    
    Threads started!
    
    [ 1s ] thds: 2 tps: 17.97 qps: 388.45 (r/w/o: 278.61/71.90/37.95) lat (ms,95%): 112.67 err/s: 0.00 reconn/s: 0.00
    [ 2s ] thds: 2 tps: 13.94 qps: 287.73 (r/w/o: 196.13/63.72/27.88) lat (ms,95%): 144.97 err/s: 0.00 reconn/s: 0.00
    [ 3s ] thds: 2 tps: 18.07 qps: 361.46 (r/w/o: 253.02/72.29/36.15) lat (ms,95%): 153.02 err/s: 0.00 reconn/s: 0.00
    [ 4s ] thds: 2 tps: 15.99 qps: 319.86 (r/w/o: 223.90/63.97/31.99) lat (ms,95%): 127.81 err/s: 0.00 reconn/s: 0.00
    [ 5s ] thds: 2 tps: 18.00 qps: 359.99 (r/w/o: 251.99/72.00/36.00) lat (ms,95%): 139.85 err/s: 0.00 reconn/s: 0.00
    [ 6s ] thds: 2 tps: 16.02 qps: 320.34 (r/w/o: 224.24/64.07/32.03) lat (ms,95%): 132.49 err/s: 0.00 reconn/s: 0.00
    [ 7s ] thds: 2 tps: 18.00 qps: 360.03 (r/w/o: 252.02/72.01/36.00) lat (ms,95%): 108.68 err/s: 0.00 reconn/s: 0.00
    [ 8s ] thds: 2 tps: 20.00 qps: 399.99 (r/w/o: 279.99/80.00/40.00) lat (ms,95%): 112.67 err/s: 0.00 reconn/s: 0.00
    [ 9s ] thds: 2 tps: 15.98 qps: 319.58 (r/w/o: 223.70/63.92/31.96) lat (ms,95%): 127.81 err/s: 0.00 reconn/s: 0.00
    [ 10s ] thds: 2 tps: 18.02 qps: 360.46 (r/w/o: 252.32/72.09/36.05) lat (ms,95%): 121.08 err/s: 0.00 reconn/s: 0.00
    [ 11s ] thds: 2 tps: 17.98 qps: 359.61 (r/w/o: 251.73/71.92/35.96) lat (ms,95%): 127.81 err/s: 0.00 reconn/s: 0.00
    [ 12s ] thds: 2 tps: 16.02 qps: 320.36 (r/w/o: 224.26/64.07/32.04) lat (ms,95%): 137.35 err/s: 0.00 reconn/s: 0.00
    [ 13s ] thds: 2 tps: 20.00 qps: 383.99 (r/w/o: 271.99/72.00/40.00) lat (ms,95%): 112.67 err/s: 0.00 reconn/s: 0.00
    [ 14s ] thds: 2 tps: 18.00 qps: 375.98 (r/w/o: 259.99/80.00/36.00) lat (ms,95%): 108.68 err/s: 0.00 reconn/s: 0.00
    [ 15s ] thds: 2 tps: 17.96 qps: 335.28 (r/w/o: 235.49/63.86/35.92) lat (ms,95%): 130.13 err/s: 0.00 reconn/s: 0.00
    [ 16s ] thds: 2 tps: 13.96 qps: 303.24 (r/w/o: 211.47/63.84/27.93) lat (ms,95%): 139.85 err/s: 0.00 reconn/s: 0.00
    [ 17s ] thds: 2 tps: 18.07 qps: 351.42 (r/w/o: 251.01/64.26/36.15) lat (ms,95%): 139.85 err/s: 0.00 reconn/s: 0.00
    [ 18s ] thds: 2 tps: 16.01 qps: 330.22 (r/w/o: 226.15/72.05/32.02) lat (ms,95%): 134.90 err/s: 0.00 reconn/s: 0.00
    [ 19s ] thds: 2 tps: 20.00 qps: 392.00 (r/w/o: 276.00/76.00/40.00) lat (ms,95%): 110.66 err/s: 0.00 reconn/s: 0.00
    [ 20s ] thds: 2 tps: 18.00 qps: 367.99 (r/w/o: 255.99/76.00/36.00) lat (ms,95%): 112.67 err/s: 0.00 reconn/s: 0.00
    [ 21s ] thds: 2 tps: 18.00 qps: 360.00 (r/w/o: 252.00/72.00/36.00) lat (ms,95%): 116.80 err/s: 0.00 reconn/s: 0.00
    [ 22s ] thds: 2 tps: 18.00 qps: 360.01 (r/w/o: 252.01/72.00/36.00) lat (ms,95%): 114.72 err/s: 0.00 reconn/s: 0.00
    [ 23s ] thds: 2 tps: 18.00 qps: 359.98 (r/w/o: 251.98/72.00/36.00) lat (ms,95%): 116.80 err/s: 0.00 reconn/s: 0.00
    [ 24s ] thds: 2 tps: 18.00 qps: 360.01 (r/w/o: 252.01/72.00/36.00) lat (ms,95%): 112.67 err/s: 0.00 reconn/s: 0.00
    [ 25s ] thds: 2 tps: 20.00 qps: 399.98 (r/w/o: 279.99/80.00/40.00) lat (ms,95%): 112.67 err/s: 0.00 reconn/s: 0.00
    [ 26s ] thds: 2 tps: 18.00 qps: 360.01 (r/w/o: 252.01/72.00/36.00) lat (ms,95%): 112.67 err/s: 0.00 reconn/s: 0.00
    [ 27s ] thds: 2 tps: 18.00 qps: 359.96 (r/w/o: 251.97/71.99/36.00) lat (ms,95%): 108.68 err/s: 0.00 reconn/s: 0.00
    [ 28s ] thds: 2 tps: 18.00 qps: 360.04 (r/w/o: 252.03/72.01/36.00) lat (ms,95%): 137.35 err/s: 0.00 reconn/s: 0.00
    [ 29s ] thds: 2 tps: 18.00 qps: 360.01 (r/w/o: 252.01/72.00/36.00) lat (ms,95%): 110.66 err/s: 0.00 reconn/s: 0.00
    [ 30s ] thds: 2 tps: 18.00 qps: 359.98 (r/w/o: 251.99/72.00/36.00) lat (ms,95%): 112.67 err/s: 0.00 reconn/s: 0.00
    SQL statistics:
        queries performed:
            read:                            7448
            write:                           2128
            other:                           1064
            total:                           10640
        transactions:                        532    (17.72 per sec.)
        queries:                             10640  (354.42 per sec.)
        ignored errors:                      0      (0.00 per sec.)
        reconnects:                          0      (0.00 per sec.)
    
    General statistics:
        total time:                          30.0198s
        total number of events:              532
    
    Latency (ms):
             min:                                  106.28
             avg:                                  112.85
             max:                                  156.04
             95th percentile:                      132.49
             sum:                                60034.04
    
    Threads fairness:
        events (avg/stddev):           266.0000/0.00
        execution time (avg/stddev):   30.0170/0.00
    
    
    sysbench mysql OLTP new summary:
    sysbench oltp_read_write.lua --mysql-host=localhost --mysql-port=3306 --mysql-socket=/var/lib/mysql/mysql.sock --mysql-user=sbtest --mysql-password=sbtestpass --mysql-db=sbt --mysql-storage-engine=InnoDB --time=30 --threads=2 --report-interval=1 --rand-type=uniform --rand-seed=1 --table-size=150000 --tables=8 --db-driver=mysql run
    sysbench 1.0.20 (using bundled LuaJIT 2.1.0-beta2)
    threads: 2
    read: 7448
    write: 2128
    other: 1064
    total: 10640
    transactions/s: 17.72
    queries/s: 354.42
    time: 30.0198s
    min: 106.28
    avg: 112.85
    max: 156.04
    95th: 132.49
    

    markdown output

    mysql sysbench sysbench threads: read: write: other: total: transactions/s: queries/s: time: min: avg: max: 95th:
    oltp_read_write.lua 1.0.20 2 7448 2128 1064 10640 17.72 354.42 30.0198s 106.28 112.85 156.04 132.49

    and CSV output

    sysbench,sysbench,threads,read,write,other,total,transactions/s,queries/s,time,min,avg,max,95th 
    oltp_read_write.lua,1.0.20,2,7448,2128,1064,10640,17.72,354.42,30.0198s,106.28,112.85,156.04,132.49 
    
Sign In or Register to comment.