From 3a128281cd8fec1c698346191c240a771f80d72c Mon Sep 17 00:00:00 2001 From: mischief Date: Thu, 20 Aug 2026 17:57:27 -0300 Subject: randomx: optional 2 MB large pages for the cache, dataset and scratchpads RandomX reads its 256 MB cache, 2 GB dataset and per-VM scratchpads at random, so most accesses miss the TLB on 4 KB pages. Requesting 2 MB pages recovers roughly a tenth of the hash rate. Each allocation tries large pages first and falls back to normal pages when the pool is not reserved, so nothing regresses when hugepages are unavailable. -nolargepages opts out, and the diagnostics report which allocations got large pages. --- src/net.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/net.cpp') diff --git a/src/net.cpp b/src/net.cpp index ecfd565..287a4bd 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -366,6 +366,7 @@ string GetDiagnosticsText() nMining, (RandomXFastReady() ? 2080 : 256) + 2 * nMining).c_str() : ", not mining"); + str += strprintf(" large pages %s\n", RandomXLargePagesStatus()); str += SockAccountingText(); -- cgit v1.2.3