Skip to content

Instantly share code, notes, and snippets.

View danielbendix's full-sized avatar

Daniel Bendix danielbendix

  • Bendix IT
  • Copenhagen, Denmark
View GitHub Profile
@danielbendix
danielbendix / enable_hugepages.sh
Last active October 27, 2024 10:07
Enabling and using large pages on Linux
# Replace HUGEPAGE_COUTN with the number of large pages you want.
# I recommend not changing huge pages in configuration files, as it may then persist after a reboot.
# This should not persist beyond your current session.
sudo sysctl -w vm.nr_hugepages=$HUGEPAGE_COUNT
2024-10-23T20:26:48+02:00
Running ./a.out
Run on (24 X 5100 MHz CPU s)
CPU Caches:
L1 Data 48 KiB (x12)
L1 Instruction 32 KiB (x12)
L2 Unified 1280 KiB (x12)
L3 Unified 30720 KiB (x1)
Load Average: 0.73, 0.56, 0.57
***WARNING*** CPU scaling is enabled, the benchmark real time measurements may be noisy and will incur extra overhead.