Prestazioni e affidabilità

Come faccio a fare benchmark di un VPS?

Risposta breve

Misura le tre cose che realmente variano: CPU single-thread con sysbench, disco con fio a lettura/scrittura casuale 4K, e rete con iperf3 verso un endpoint noto. Esegui ciascuno più volte in ore diverse — un singolo benchmark misura quel minuto, non il server.

Il disco è dove i provider differiscono di più e dove i numeri di marketing sintetici sono meno utili. Testa gli IOPS casuali 4K con una profondità di coda di 1, che è ciò che fa realmente un database, piuttosto che la velocità sequenziale, che sembra impressionante e non predice nulla.

Osserva il tempo di steal durante l'esecuzione. Un benchmark che sembra buono alle 03:00 e scarso alle 20:00 ti sta parlando dei tuoi vicini piuttosto che dell'hardware.

  • sysbench cpu --cpu-max-prime=20000 run — single-thread performance
  • fio --name=rand --rw=randrw --bs=4k --iodepth=1 --size=1G --runtime=60
  • iperf3 -c a-known-endpoint — real throughput, not the advertised port speed
  • vmstat 1 during all of it — watch the st column

Vedi anche: IOPS