qemu-e2k/tests
Emilio G. Cota 515864a0d7 qht: add qht-bench, a performance benchmark
This serves as a performance benchmark as well as a stress test
for QHT. We can tweak quite a number of things, including the
number of resize threads and how frequently resizes are triggered.

A performance comparison of QHT vs CLHT[1] and ck_hs[2] using
this same benchmark program can be found here:
  http://imgur.com/a/0Bms4

The tests are run on a 64-core AMD Opteron 6376, pinning threads
to cores favoring same-socket cores. For each run, qht-bench is
invoked with:
  $ tests/qht-bench -d $duration -n $n -u $u -g $range
, where $duration is in seconds, $n is the number of threads,
$u is the update rate (0.0 to 100.0), and $range is the number
of keys.

Note that ck_hs's performance drops significantly as writes go
up, since it requires an external lock (I used a ck_spinlock)
around every write.

Also, note that CLHT instead of using a seqlock, relies on an
allocator that does not ever return the same address during the
same read-critical section. This gives it a slight performance
advantage over QHT on read-heavy workloads, since the seqlock
writes aren't there.

[1] CLHT: https://github.com/LPD-EPFL/CLHT
          https://infoscience.epfl.ch/record/207109/files/ascy_asplos15.pdf

[2] ck_hs: http://concurrencykit.org/
           http://backtrace.io/blog/blog/2015/03/13/workload-specialization/

A few of those plots are shown in text here, since that site
might not be online forever. Throughput is on Mops/s on the Y axis.

                             200K keys, 0 % updates

  450 ++--+------+------+-------+-------+-------+-------+------+-------+--++
      |   +      +      +       +       +       +       +      +      +N+  |
  400 ++                                                           ---+E+ ++
      |                                                       +++----      |
  350 ++          9 ++------+------++                       --+E+    -+H+ ++
      |             |      +H+-     |                 -+N+----   ---- +++  |
  300 ++          8 ++     +E+     ++             -----+E+  --+H+         ++
      |             |      +++      |         -+N+-----+H+--               |
  250 ++          7 ++------+------++  +++-----+E+----                    ++
  200 ++                    1         -+E+-----+H+                        ++
      |                           ----                     qht +-E--+      |
  150 ++                      -+E+                        clht +-H--+     ++
      |                   ----                              ck +-N--+      |
  100 ++               +E+                                                ++
      |            ----                                                    |
   50 ++       -+E+                                                       ++
      |   +E+E+  +      +       +       +       +       +      +       +   |
    0 ++--E------+------+-------+-------+-------+-------+------+-------+--++
          1      8      16      24      32      40      48     56      64
                                Number of threads

                             200K keys, 1 % updates

  350 ++--+------+------+-------+-------+-------+-------+------+-------+--++
      |   +      +      +       +       +       +       +      +     -+E+  |
  300 ++                                                         -----+H+ ++
      |                                                       +E+--        |
      |           9 ++------+------++                  +++----             |
  250 ++            |      +E+   -- |                 -+E+                ++
      |           8 ++         --  ++             ----                     |
  200 ++            |      +++-     |  +++  ---+E+                        ++
      |           7 ++------N------++ -+E+--               qht +-E--+      |
      |                     1  +++----                    clht +-H--+      |
  150 ++                      -+E+                          ck +-N--+     ++
      |                   ----                                             |
  100 ++               +E+                                                ++
      |            ----                                                    |
      |        -+E+                                                        |
   50 ++    +H+-+N+----+N+-----+N+------                                  ++
      |   +E+E+  +      +       +      +N+-----+N+-----+N+----+N+-----+N+  |
    0 ++--E------+------+-------+-------+-------+-------+------+-------+--++
          1      8      16      24      32      40      48     56      64
                                Number of threads

                             200K keys, 20 % updates

  300 ++--+------+------+-------+-------+-------+-------+------+-------+--++
      |   +      +      +       +       +       +       +      +       +   |
      |                                                              -+H+  |
  250 ++                                                         ----     ++
      |           9 ++------+------++                       --+H+  ---+E+  |
      |           8 ++     +H+--   ++                 -+H+----+E+--        |
  200 ++            |      +E+    --|             -----+E+--  +++         ++
      |           7 ++      + ---- ++       ---+H+---- +++ qht +-E--+      |
  150 ++          6 ++------N------++ -+H+-----+E+        clht +-H--+     ++
      |                     1     -----+E+--                ck +-N--+      |
      |                       -+H+----                                     |
  100 ++                  -----+E+                                        ++
      |                +E+--                                               |
      |            ----+++                                                 |
   50 ++       -+E+                                                       ++
      |     +E+ +++                                                        |
      |   +E+N+-+N+-----+       +       +       +       +      +       +   |
    0 ++--E------+------N-------N-------N-------N-------N------N-------N--++
          1      8      16      24      32      40      48     56      64
                                Number of threads

                            200K keys, 100 % updates       qht +-E--+
                                                          clht +-H--+
  160 ++--+------+------+-------+-------+-------+-------+---ck-+-N-----+--++
      |   +      +      +       +       +       +       +      +   ----H   |
  140 ++                                                      +H+--  -+E+ ++
      |                                                +++----   ----      |
  120 ++          8 ++------+------++                 -+H+    +E+         ++
      |           7 ++     +H+---- ++             ---- +++----             |
  100 ++            |      +E+      |  +++  ---+H+    -+E+                ++
      |           6 ++     +++     ++ -+H+--   +++----                     |
   80 ++          5 ++------N----------+E+-----+E+                        ++
      |                     1 -+H+---- +++                                 |
      |                   -----+E+                                         |
   60 ++               +H+---- +++                                        ++
      |            ----+E+                                                 |
   40 ++        +H+----                                                   ++
      |       --+E+                                                        |
   20 ++    +E+                                                           ++
      |  +EE+    +      +       +       +       +       +      +       +   |
    0 ++--+N-N---N------N-------N-------N-------N-------N------N-------N--++
          1      8      16      24      32      40      48     56      64
                                Number of threads

Signed-off-by: Emilio G. Cota <cota@braap.org>
Message-Id: <1465412133-3029-13-git-send-email-cota@braap.org>
Signed-off-by: Richard Henderson <rth@twiddle.net>
2016-06-11 17:11:16 -07:00
..
acpi-test-data tests: acpi: update tables with consolidated legacy cpu-hotplug AML 2016-06-07 15:36:54 +03:00
docker tests/docker: build all targets in test-clang 2016-06-08 15:19:30 +08:00
guest-debug tests/guest-debug: introduce basic gdbstub tests 2015-12-17 13:37:15 +00:00
image-fuzzer tests: Use Python 2.6 "except E as ..." syntax 2016-02-08 17:29:54 +01:00
libqos tests: Remove unnecessary glib.h includes 2016-06-07 18:19:24 +03:00
multiboot tests/multiboot: Add test for modules 2015-01-26 12:22:44 +01:00
qapi-schema qapi: Allow anonymous base for flat union 2016-03-18 10:29:26 +01:00
qemu-iotests block: Switch bdrv_write_zeroes() to byte interface 2016-06-08 10:21:08 +02:00
rocker rocker: tests: don't need to specify master/self when setting vlans 2015-07-07 13:13:22 +01:00
tcg Fix some typos found by codespell 2016-05-18 15:04:27 +03:00
vmstate-static-checker-data
.gitignore qht: add qht-bench, a performance benchmark 2016-06-11 17:11:16 -07:00
Makefile.include qht: add qht-bench, a performance benchmark 2016-06-11 17:11:16 -07:00
ac97-test.c tests: Remove unnecessary glib.h includes 2016-06-07 18:19:24 +03:00
ahci-test.c tests: Remove unnecessary glib.h includes 2016-06-07 18:19:24 +03:00
bios-tables-test.c tests: Remove unnecessary glib.h includes 2016-06-07 18:19:24 +03:00
boot-order-test.c tests: Remove unnecessary glib.h includes 2016-06-07 18:19:24 +03:00
boot-sector.c all: Clean up includes 2016-02-23 12:43:05 +00:00
boot-sector.h tests: add pxe e1000 and virtio-pci tests 2016-02-16 12:05:18 +02:00
check-block.sh qemu-iotests: make check-block.sh work on out-of-tree builds 2016-01-07 21:30:16 +01:00
check-qdict.c tests: Remove unnecessary glib.h includes 2016-06-07 18:19:24 +03:00
check-qfloat.c tests: Remove unnecessary glib.h includes 2016-06-07 18:19:24 +03:00
check-qint.c tests: Remove unnecessary glib.h includes 2016-06-07 18:19:24 +03:00
check-qjson.c tests: Remove unnecessary glib.h includes 2016-06-07 18:19:24 +03:00
check-qlist.c tests: Remove unnecessary glib.h includes 2016-06-07 18:19:24 +03:00
check-qnull.c tests: Remove unnecessary glib.h includes 2016-06-07 18:19:24 +03:00
check-qom-interface.c tests: Remove unnecessary glib.h includes 2016-06-07 18:19:24 +03:00
check-qom-proplist.c tests: Remove unnecessary glib.h includes 2016-06-07 18:19:24 +03:00
check-qstring.c tests: Remove unnecessary glib.h includes 2016-06-07 18:19:24 +03:00
crypto-tls-x509-helpers.c tests: Clean up includes 2016-02-16 14:29:27 +00:00
crypto-tls-x509-helpers.h crypto: add sanity checking of TLS x509 credentials 2015-09-15 15:05:09 +01:00
device-introspect-test.c tests: Remove unnecessary glib.h includes 2016-06-07 18:19:24 +03:00
display-vga-test.c tests: Remove unnecessary glib.h includes 2016-06-07 18:19:24 +03:00
drive_del-test.c tests: Remove unnecessary glib.h includes 2016-06-07 18:19:24 +03:00
ds1338-test.c tests: Remove unnecessary glib.h includes 2016-06-07 18:19:24 +03:00
e1000-test.c tests: Remove unnecessary glib.h includes 2016-06-07 18:19:24 +03:00
e1000e-test.c e1000e: Introduce qtest for e1000e device 2016-06-02 10:42:30 +08:00
eepro100-test.c tests: Remove unnecessary glib.h includes 2016-06-07 18:19:24 +03:00
endianness-test.c tests: Remove unnecessary glib.h includes 2016-06-07 18:19:24 +03:00
es1370-test.c tests: Remove unnecessary glib.h includes 2016-06-07 18:19:24 +03:00
fdc-test.c tests: Remove unnecessary glib.h includes 2016-06-07 18:19:24 +03:00
fw_cfg-test.c tests: Remove unnecessary glib.h includes 2016-06-07 18:19:24 +03:00
hd-geo-test.c tests: Remove unnecessary glib.h includes 2016-06-07 18:19:24 +03:00
i440fx-test.c tests: Remove unnecessary glib.h includes 2016-06-07 18:19:24 +03:00
i82801b11-test.c tests: Remove unnecessary glib.h includes 2016-06-07 18:19:24 +03:00
ide-test.c tests: Remove unnecessary glib.h includes 2016-06-07 18:19:24 +03:00
intel-hda-test.c tests: Remove unnecessary glib.h includes 2016-06-07 18:19:24 +03:00
io-channel-helpers.c include/qemu/osdep.h: Don't include qapi/error.h 2016-03-22 22:20:15 +01:00
io-channel-helpers.h io: add QIOChannelSocket class 2015-12-18 12:18:31 +00:00
ioh3420-test.c tests: Remove unnecessary glib.h includes 2016-06-07 18:19:24 +03:00
ipmi-bt-test.c tests: Remove unnecessary glib.h includes 2016-06-07 18:19:24 +03:00
ipmi-kcs-test.c tests: Remove unnecessary glib.h includes 2016-06-07 18:19:24 +03:00
ipoctal232-test.c tests: Remove unnecessary glib.h includes 2016-06-07 18:19:24 +03:00
ivshmem-test.c tests: Remove unnecessary glib.h includes 2016-06-07 18:19:24 +03:00
libqtest.c tests: Remove unnecessary glib.h includes 2016-06-07 18:19:24 +03:00
libqtest.h all: Clean up includes 2016-02-23 12:43:05 +00:00
m48t59-test.c tests: Remove unnecessary glib.h includes 2016-06-07 18:19:24 +03:00
ne2000-test.c tests: Remove unnecessary glib.h includes 2016-06-07 18:19:24 +03:00
nvme-test.c tests: Remove unnecessary glib.h includes 2016-06-07 18:19:24 +03:00
pc-cpu-test.c tests: Remove unnecessary glib.h includes 2016-06-07 18:19:24 +03:00
pcnet-test.c tests: Remove unnecessary glib.h includes 2016-06-07 18:19:24 +03:00
pkix_asn1_tab.c tests: Clean up includes 2016-02-16 14:29:27 +00:00
pvpanic-test.c tests: Remove unnecessary glib.h includes 2016-06-07 18:19:24 +03:00
pxe-test.c tests: Remove unnecessary glib.h includes 2016-06-07 18:19:24 +03:00
q35-test.c tests: Remove unnecessary glib.h includes 2016-06-07 18:19:24 +03:00
qemu-iotests-quick.sh
qht-bench.c qht: add qht-bench, a performance benchmark 2016-06-11 17:11:16 -07:00
qom-test.c tests: Remove unnecessary glib.h includes 2016-06-07 18:19:24 +03:00
rcutorture.c tests: Remove unnecessary glib.h includes 2016-06-07 18:19:24 +03:00
rtc-test.c tests: Remove unnecessary glib.h includes 2016-06-07 18:19:24 +03:00
rtl8139-test.c tests: Remove unnecessary glib.h includes 2016-06-07 18:19:24 +03:00
spapr-phb-test.c tests: Remove unnecessary glib.h includes 2016-06-07 18:19:24 +03:00
tco-test.c tests: Remove unnecessary glib.h includes 2016-06-07 18:19:24 +03:00
test-aio.c tests: Remove unnecessary glib.h includes 2016-06-07 18:19:24 +03:00
test-base64.c tests: Remove unnecessary glib.h includes 2016-06-07 18:19:24 +03:00
test-bitops.c tests: Remove unnecessary glib.h includes 2016-06-07 18:19:24 +03:00
test-blockjob-txn.c tests: Remove unnecessary glib.h includes 2016-06-07 18:19:24 +03:00
test-coroutine.c trivial patches for 2016-06-07 2016-06-07 16:34:45 +01:00
test-crypto-afsplit.c include/qemu/osdep.h: Don't include qapi/error.h 2016-03-22 22:20:15 +01:00
test-crypto-block.c include/qemu/osdep.h: Don't include qapi/error.h 2016-03-22 22:20:15 +01:00
test-crypto-cipher.c tests: Remove unnecessary glib.h includes 2016-06-07 18:19:24 +03:00
test-crypto-hash.c tests: Remove unnecessary glib.h includes 2016-06-07 18:19:24 +03:00
test-crypto-ivgen.c include/qemu/osdep.h: Don't include qapi/error.h 2016-03-22 22:20:15 +01:00
test-crypto-pbkdf.c include/qemu/osdep.h: Don't include qapi/error.h 2016-03-22 22:20:15 +01:00
test-crypto-secret.c tests: Remove unnecessary glib.h includes 2016-06-07 18:19:24 +03:00
test-crypto-tlscredsx509.c include/qemu/osdep.h: Don't include qapi/error.h 2016-03-22 22:20:15 +01:00
test-crypto-tlssession.c include/qemu/osdep.h: Don't include qapi/error.h 2016-03-22 22:20:15 +01:00
test-crypto-xts.c crypto: import an implementation of the XTS cipher mode 2016-03-17 14:41:15 +00:00
test-cutils.c tests: Remove unnecessary glib.h includes 2016-06-07 18:19:24 +03:00
test-filter-mirror.c tests: Remove unnecessary glib.h includes 2016-06-07 18:19:24 +03:00
test-filter-redirector.c tests: Remove unnecessary glib.h includes 2016-06-07 18:19:24 +03:00
test-hbitmap.c hbitmap: Use DIV_ROUND_UP 2016-06-07 18:19:25 +03:00
test-int128.c tests: Remove unnecessary glib.h includes 2016-06-07 18:19:24 +03:00
test-io-channel-buffer.c tests: Clean up includes 2016-02-16 14:29:27 +00:00
test-io-channel-command.c include/qemu/osdep.h: Don't include qapi/error.h 2016-03-22 22:20:15 +01:00
test-io-channel-file.c include/qemu/osdep.h: Don't include qapi/error.h 2016-03-22 22:20:15 +01:00
test-io-channel-socket.c util: retry getaddrinfo if getting EAI_BADFLAGS with AI_V4MAPPED 2016-04-05 11:46:52 +02:00
test-io-channel-tls.c tests: Clean up includes 2016-02-16 14:29:27 +00:00
test-io-task.c tests: Remove unnecessary glib.h includes 2016-06-07 18:19:24 +03:00
test-iov.c tests: Remove unnecessary glib.h includes 2016-06-07 18:19:24 +03:00
test-logging.c tests: Remove unnecessary glib.h includes 2016-06-07 18:19:24 +03:00
test-mul64.c tests: Remove unnecessary glib.h includes 2016-06-07 18:19:24 +03:00
test-netfilter.c tests: Remove unnecessary glib.h includes 2016-06-07 18:19:24 +03:00
test-opts-visitor.c tests: Remove unnecessary glib.h includes 2016-06-07 18:19:24 +03:00
test-qdev-global-props.c tests: Remove unnecessary glib.h includes 2016-06-07 18:19:24 +03:00
test-qdist.c qdist: add test program 2016-06-11 23:10:19 +00:00
test-qemu-opts.c tests: Remove unnecessary glib.h includes 2016-06-07 18:19:24 +03:00
test-qga.c tests: start a /qga/guest-exec test 2016-06-07 11:25:06 -05:00
test-qht.c qht: add test program 2016-06-11 23:10:20 +00:00
test-qmp-commands.c tests: Remove unnecessary glib.h includes 2016-06-07 18:19:24 +03:00
test-qmp-event.c tests: Remove unnecessary glib.h includes 2016-06-07 18:19:24 +03:00
test-qmp-input-strict.c tests: Remove unnecessary glib.h includes 2016-06-07 18:19:24 +03:00
test-qmp-input-visitor.c tests: Remove unnecessary glib.h includes 2016-06-07 18:19:24 +03:00
test-qmp-output-visitor.c tests: Remove unnecessary glib.h includes 2016-06-07 18:19:24 +03:00
test-rcu-list.c tests: Remove unnecessary glib.h includes 2016-06-07 18:19:24 +03:00
test-rfifolock.c tests: Remove unnecessary glib.h includes 2016-06-07 18:19:24 +03:00
test-string-input-visitor.c tests: Remove unnecessary glib.h includes 2016-06-07 18:19:24 +03:00
test-string-output-visitor.c tests: Remove unnecessary glib.h includes 2016-06-07 18:19:24 +03:00
test-thread-pool.c tests: Remove unnecessary glib.h includes 2016-06-07 18:19:24 +03:00
test-throttle.c trivial patches for 2016-06-07 2016-06-07 16:34:45 +01:00
test-timed-average.c tests: Remove unnecessary glib.h includes 2016-06-07 18:19:24 +03:00
test-visitor-serialization.c tests: Remove unnecessary glib.h includes 2016-06-07 18:19:24 +03:00
test-vmstate.c tests: Remove unnecessary glib.h includes 2016-06-07 18:19:24 +03:00
test-write-threshold.c tests: Remove unnecessary glib.h includes 2016-06-07 18:19:24 +03:00
test-x86-cpuid.c tests: Remove unnecessary glib.h includes 2016-06-07 18:19:24 +03:00
test-xbzrle.c util: move declarations out of qemu-common.h 2016-03-22 22:20:17 +01:00
tmp105-test.c tests: Remove unnecessary glib.h includes 2016-06-07 18:19:24 +03:00
tpci200-test.c tests: Remove unnecessary glib.h includes 2016-06-07 18:19:24 +03:00
usb-hcd-ehci-test.c tests: Remove unnecessary glib.h includes 2016-06-07 18:19:24 +03:00
usb-hcd-ohci-test.c tests: Remove unnecessary glib.h includes 2016-06-07 18:19:24 +03:00
usb-hcd-uhci-test.c tests: Remove unnecessary glib.h includes 2016-06-07 18:19:24 +03:00
usb-hcd-xhci-test.c tests: Remove unnecessary glib.h includes 2016-06-07 18:19:24 +03:00
vhost-user-bridge.c tests/vhost-user-bridge: fix build on 32 bit systems 2016-02-25 13:14:19 +02:00
vhost-user-test.c tests: Remove unnecessary glib.h includes 2016-06-07 18:19:24 +03:00
virtio-9p-test.c tests: Remove unnecessary glib.h includes 2016-06-07 18:19:24 +03:00
virtio-balloon-test.c tests: Remove unnecessary glib.h includes 2016-06-07 18:19:24 +03:00
virtio-blk-test.c tests: Remove unnecessary glib.h includes 2016-06-07 18:19:24 +03:00
virtio-console-test.c tests: Remove unnecessary glib.h includes 2016-06-07 18:19:24 +03:00
virtio-net-test.c tests: Remove unnecessary glib.h includes 2016-06-07 18:19:24 +03:00
virtio-rng-test.c tests: Remove unnecessary glib.h includes 2016-06-07 18:19:24 +03:00
virtio-scsi-test.c tests: Remove unnecessary glib.h includes 2016-06-07 18:19:24 +03:00
virtio-serial-test.c tests: Remove unnecessary glib.h includes 2016-06-07 18:19:24 +03:00
vmxnet3-test.c tests: Remove unnecessary glib.h includes 2016-06-07 18:19:24 +03:00
wdt_ib700-test.c tests: Remove unnecessary glib.h includes 2016-06-07 18:19:24 +03:00