All Flash ZFS Performance Tuning

Vengance

Renowned Member
May 21, 2016
271
12
83
33
Hi,

Ich habe ein frisches Proxmox System im Einsatz und benötige etwas Hilfe bezüglich der empfohlenen ZFS Konfiguration.
Das System verfügt über 14x PM883 3.84TB SATA Datacenter SSDs, 512GB RAM und 2x Xeon Gold 6130.


Auf dem System sollen eine Reihe von VMs betrieben werden. Der Workload ist hierbei recht unterschiedlich, von einfachen Webservern, über Datenbankserver etc.
Also von allem etwas dabei.

Die SSDs sind aktuell in einem ZFS RAID 10 Konfiguriert mit den Default Options.
Ich frage mich nun, ob die gewählten Options für den Einsatzzweck passend sind, oder ob hier gewisse Optionen noch optimiert werden können.

Interessant wären zudem einige fio Befehle um die Performance zu testen.
Im Internet finden sich zwar einige, aber ohne konkrete Referenzwerte zum Vergleich kann ich die Performance schlecht einschätzen.

Ich habe dennoch unten ein paar Tests angehängt.


Ich freue mich über jeglichen Rat!
Vielen Dank!



Beispiel Benchmarks in einer VM
Code:
root@test:~# fio --name=randwrite --ioengine=posixaio --rw=randwrite --bs=64k --numjobs=8 --size=4g --iodepth=8 --runtime=60 --time_based --end_fsync=1 --group_reporting
randwrite: (g=0): rw=randwrite, bs=(R) 64.0KiB-64.0KiB, (W) 64.0KiB-64.0KiB, (T) 64.0KiB-64.0KiB, ioengine=posixaio, iodepth=8
...
fio-3.33
...............

Run status group 0 (all jobs):
  WRITE: bw=1378MiB/s (1445MB/s), 1378MiB/s-1378MiB/s (1445MB/s-1445MB/s), io=81.9GiB (87.9GB), run=60852-60852msec

Disk stats (read/write):
  sda: ios=31/1249432, merge=0/49436, ticks=21/1170129, in_queue=1196372, util=50.30%

Code:
root@test:~# curl -sL yabs.sh | bash

fio Disk Speed Tests (Mixed R/W 50/50) (Partition /dev/sda1):
---------------------------------
Block Size | 4k            (IOPS) | 64k           (IOPS)
  ------   | ---            ----  | ----           ----
Read       | 261.70 MB/s  (65.4k) | 2.22 GB/s    (34.7k)
Write      | 262.39 MB/s  (65.5k) | 2.23 GB/s    (34.9k)
Total      | 524.09 MB/s (131.0k) | 4.46 GB/s    (69.7k)
           |                      |                     
Block Size | 512k          (IOPS) | 1m            (IOPS)
  ------   | ---            ----  | ----           ----
Read       | 3.66 GB/s     (7.1k) | 3.49 GB/s     (3.4k)
Write      | 3.86 GB/s     (7.5k) | 3.73 GB/s     (3.6k)
Total      | 7.53 GB/s    (14.7k) | 7.23 GB/s     (7.0k)


Code:
root@pve:~# zfs get recordsize data
NAME  PROPERTY    VALUE    SOURCE
data  recordsize  128K     default


root@pve:~# zpool get all data
NAME  PROPERTY                       VALUE                          SOURCE
data  size                           24.4T                          -
data  capacity                       0%                             -
data  altroot                        -                              default
data  health                         ONLINE                         -
data  guid                           6553458538151577448            -
data  version                        -                              default
data  bootfs                         -                              default
data  delegation                     on                             default
data  autoreplace                    off                            default
data  cachefile                      none                           local
data  failmode                       wait                           default
data  listsnapshots                  off                            default
data  autoexpand                     off                            default
data  dedupratio                     1.00x                          -
data  free                           24.3T                          -
data  allocated                      107G                           -
data  readonly                       off                            -
data  ashift                         12                             local
data  comment                        -                              default
data  expandsize                     -                              -
data  freeing                        0                              -
data  fragmentation                  0%                             -
data  leaked                         0                              -
data  multihost                      off                            default
data  checkpoint                     -                              -
data  load_guid                      13823593720175011956           -
data  autotrim                       off                            default
data  compatibility                  off                            default
data  bcloneused                     0                              -
data  bclonesaved                    0                              -
data  bcloneratio                    1.00x                          -
data  feature@async_destroy          enabled                        local
data  feature@empty_bpobj            active                         local
data  feature@lz4_compress           active                         local
data  feature@multi_vdev_crash_dump  enabled                        local
data  feature@spacemap_histogram     active                         local
data  feature@enabled_txg            active                         local
data  feature@hole_birth             active                         local
data  feature@extensible_dataset     active                         local
data  feature@embedded_data          active                         local
data  feature@bookmarks              enabled                        local
data  feature@filesystem_limits      enabled                        local
data  feature@large_blocks           enabled                        local
data  feature@large_dnode            enabled                        local
data  feature@sha512                 enabled                        local
data  feature@skein                  enabled                        local
data  feature@edonr                  enabled                        local
data  feature@userobj_accounting     active                         local
data  feature@encryption             enabled                        local
data  feature@project_quota          active                         local
data  feature@device_removal         enabled                        local
data  feature@obsolete_counts        enabled                        local
data  feature@zpool_checkpoint       enabled                        local
data  feature@spacemap_v2            active                         local
data  feature@allocation_classes     enabled                        local
data  feature@resilver_defer         enabled                        local
data  feature@bookmark_v2            enabled                        local
data  feature@redaction_bookmarks    enabled                        local
data  feature@redacted_datasets      enabled                        local
data  feature@bookmark_written       enabled                        local
data  feature@log_spacemap           active                         local
data  feature@livelist               enabled                        local
data  feature@device_rebuild         enabled                        local
data  feature@zstd_compress          enabled                        local
data  feature@draid                  enabled                        local
data  feature@zilsaxattr             enabled                        local
data  feature@head_errlog            active                         local
data  feature@blake3                 enabled                        local
data  feature@block_cloning          enabled                        local
data  feature@vdev_zaps_v2           active                         local
root@pve:~#


root@pve:~# zfs get all data
NAME  PROPERTY              VALUE                  SOURCE
data  type                  filesystem             -
data  creation              Thu Jul 11 20:50 2024  -
data  used                  107G                   -
data  available             24.1T                  -
data  referenced            96K                    -
data  compressratio         1.13x                  -
data  mounted               yes                    -
data  quota                 none                   default
data  reservation           none                   default
data  recordsize            128K                   default
data  mountpoint            /data                  default
data  sharenfs              off                    default
data  checksum              on                     default
data  compression           on                     local
data  atime                 on                     default
data  devices               on                     default
data  exec                  on                     default
data  setuid                on                     default
data  readonly              off                    default
data  zoned                 off                    default
data  snapdir               hidden                 default
data  aclmode               discard                default
data  aclinherit            restricted             default
data  createtxg             1                      -
data  canmount              on                     default
data  xattr                 on                     default
data  copies                1                      default
data  version               5                      -
data  utf8only              off                    -
data  normalization         none                   -
data  casesensitivity       sensitive              -
data  vscan                 off                    default
data  nbmand                off                    default
data  sharesmb              off                    default
data  refquota              none                   default
data  refreservation        none                   default
data  guid                  13297612617211384623   -
data  primarycache          all                    default
data  secondarycache        all                    default
data  usedbysnapshots       0B                     -
data  usedbydataset         96K                    -
data  usedbychildren        107G                   -
data  usedbyrefreservation  0B                     -
data  logbias               latency                default
data  objsetid              54                     -
data  dedup                 off                    default
data  mlslabel              none                   default
data  sync                  standard               default
data  dnodesize             legacy                 default
data  refcompressratio      1.00x                  -
data  written               96K                    -
data  logicalused           121G                   -
data  logicalreferenced     42K                    -
data  volmode               default                default
data  filesystem_limit      none                   default
data  snapshot_limit        none                   default
data  filesystem_count      none                   default
data  snapshot_count        none                   default
data  snapdev               hidden                 default
data  acltype               off                    default
data  context               none                   default
data  fscontext             none                   default
data  defcontext            none                   default
data  rootcontext           none                   default
data  relatime              on                     default
data  redundant_metadata    all                    default
data  overlay               on                     default
data  encryption            off                    default
data  keylocation           none                   default
data  keyformat             none                   default
data  pbkdf2iters           0                      default
data  special_small_blocks  0                      default
data  prefetch              all                    default



root@pve:~# zpool status data
  pool: data
 state: ONLINE
config:

    NAME                                               STATE     READ WRITE CKSUM
    data                                               ONLINE       0     0     0
      mirror-0                                         ONLINE       0     0     0
        ata-SAMSUNG_MZ7LH3T8HMLT-00005_S456NY0R711749  ONLINE       0     0     0
        ata-SAMSUNG_MZ7LH3T8HMLT-00005_S456NY0R711750  ONLINE       0     0     0
      mirror-1                                         ONLINE       0     0     0
        ata-SAMSUNG_MZ7LH3T8HMLT-00005_S456NY0R711751  ONLINE       0     0     0
        ata-SAMSUNG_MZ7LH3T8HMLT-00005_S456NY0R711758  ONLINE       0     0     0
      mirror-2                                         ONLINE       0     0     0
        ata-SAMSUNG_MZ7LH3T8HMLT-00005_S456NY0R711761  ONLINE       0     0     0
        ata-SAMSUNG_MZ7LH3T8HMLT-00005_S456NY0R711752  ONLINE       0     0     0
      mirror-3                                         ONLINE       0     0     0
        ata-SAMSUNG_MZ7LH3T8HMLT-00005_S456NC0R405277  ONLINE       0     0     0
        ata-SAMSUNG_MZ7LH3T8HMLT-00005_S456NY0R711753  ONLINE       0     0     0
      mirror-4                                         ONLINE       0     0     0
        ata-SAMSUNG_MZ7LH3T8HMLT-00005_S456NY0MB06458  ONLINE       0     0     0
        ata-SAMSUNG_MZ7LH3T8HMLT-00005_S456NY0R711739  ONLINE       0     0     0
      mirror-5                                         ONLINE       0     0     0
        ata-SAMSUNG_MZ7LH3T8HMLT-00005_S456NY0R711754  ONLINE       0     0     0
        ata-SAMSUNG_MZ7LH3T8HMLT-00005_S456NY0MB06397  ONLINE       0     0     0
      mirror-6                                         ONLINE       0     0     0
        ata-SAMSUNG_MZ7LH3T8HMLT-00005_S456NY0MB06459  ONLINE       0     0     0
        ata-SAMSUNG_MZ7LH3T8HMLT-00005_S456NY0MB06460  ONLINE       0     0     0

errors: No known data errors
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!