Skip to content

Instantly share code, notes, and snippets.

@zldrobit
Last active January 2, 2024 07:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zldrobit/0b6dfc054d1e53f356621a1da6472a0b to your computer and use it in GitHub Desktop.
Save zldrobit/0b6dfc054d1e53f356621a1da6472a0b to your computer and use it in GitHub Desktop.

System Performance

Sampling performance as top

perf top --sort comm,dso

Record performance

perf record --call-graph dwarf

Parse performance record

perf report --call-graph --sort comm,dso

See also

https://dev.to/franckpachot/linux-perf-top-basics-understand-the-316l

CPU

7z b -mmt1 (single thread)

7z b5 -mmt1 (5x tests)

7z b (multi thread)

(https://askubuntu.com/a/1219689/958072)

Disk

Throughput

dd if=/dev/zero of=/tmp/test1.img bs=1G count=1 oflag=dsync

Latency

dd if=/dev/zero of=/tmp/test2.img bs=512 count=1000 oflag=dsync (https://www.cyberciti.biz/faq/howto-linux-unix-test-disk-performance-with-dd-command/)

Memory

https://www.howtogeek.com/devops/how-to-test-your-unix-servers-disk-and-ram-speed/

https://mazzo.li/posts/value-speculation.html

Find virtualization

systemd-detect-virt (https://serverfault.com/a/933994/599382)

virt-what
dmidecode -s system-manufacturer

(https://ostechnix.com/check-linux-system-physical-virtual-machine/)

(Multi) CPU Specification

numactl/numastat, taskset

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment