Skip to content

Instantly share code, notes, and snippets.

@eiri
Created February 2, 2018 18:40
Show Gist options
  • Save eiri/82d357dcc2854c5df8fb2bc1e5b3fa18 to your computer and use it in GitHub Desktop.
Save eiri/82d357dcc2854c5df8fb2bc1e5b3fa18 to your computer and use it in GitHub Desktop.
Bench CPU and disk of VM debian/jessie64

Bench CPU and disk of VM debian/jessie64

Setup

Host: MBP Intel i7 4 cores, RAM 16GB. Guest: 1 cpu, 4096 memory. Surprisingly this is better than more memory and/or more cpu cores setup.

Compare --ioapic and --acpi flags.

TL;DR

Turn both on. Even though ioapic shouldn't be relevant on 1 cpu and acpi said to be better off for perf boost, in my setup the opposite is true.

How to bench

CPU

$ sysbench --test=cpu --num-threads=8 run

Disk

in /tmp and then in ~/git (NFS shard) for write and read

$ dd bs=16k count=102400 oflag=direct if=/dev/zero of=test_data
$ dd bs=16K count=102400 iflag=direct if=test_data of=/dev/null

Results

ioapic=off acpi=off

cpu:
95 percentile:              51.01ms
/tmp
1677721600 bytes (1.7 GB) copied, 12.4997 s, 134 MB/s
1677721600 bytes (1.7 GB) copied, 9.06731 s, 185 MB/s
/nfs
1677721600 bytes (1.7 GB) copied, 61.3931 s, 27.3 MB/s
1677721600 bytes (1.7 GB) copied, 37.565 s, 44.7 MB/s

ioapic=on acpi=off

cpu:
95 percentile:              50.95ms
/tmp
1677721600 bytes (1.7 GB) copied, 11.5783 s, 145 MB/s
1677721600 bytes (1.7 GB) copied, 7.79284 s, 215 MB/s
/nfs
1677721600 bytes (1.7 GB) copied, 59.9851 s, 28.0 MB/s
1677721600 bytes (1.7 GB) copied, 38.6035 s, 43.5 MB/s

ioapic=on acpi=on

cpu:
95 percentile:              47.33ms
/tmp
1677721600 bytes (1.7 GB) copied, 11.4873 s, 146 MB/s
1677721600 bytes (1.7 GB) copied, 7.47205 s, 225 MB/s
/nfs
1677721600 bytes (1.7 GB) copied, 57.8836 s, 29.0 MB/s
1677721600 bytes (1.7 GB) copied, 37.62 s, 44.6 MB/s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment