{"id":1643,"date":"2026-11-11T12:53:36","date_gmt":"2026-11-11T12:53:36","guid":{"rendered":"https:\/\/bestdedicatedwebhostingserver.com\/blog\/?p=1643"},"modified":"2026-11-11T12:53:36","modified_gmt":"2026-11-11T12:53:36","slug":"dedicated-host-numa-pinning-latency-workloads","status":"publish","type":"post","link":"https:\/\/bestdedicatedwebhostingserver.com\/blog\/dedicated-host-numa-pinning-latency-workloads\/","title":{"rendered":"NUMA Pinning on a Dedicated Host: Latency Wins for Databases and Game Servers"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">On a dual-socket dedicated server, memory is physically partitioned into NUMA nodes: each CPU owns a slice of RAM and pays a lower latency to reach its own slice than the other socket&#8217;s. Linux, left to its own devices, is a reasonable scheduler but not a perfect one, and it will happily migrate a database thread across sockets mid-query. Each migration turns a ~80 ns local memory access into a ~140\u2013170 ns remote access across the inter-socket link, and at tens of thousands of accesses per millisecond that compounds into visible tail latency.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">NUMA pinning is the practice of binding processes and their memory allocations to a single node so those remote hops never happen. It is one of the few tuning levers on a rented dedicated server that costs nothing and routinely buys 10\u201330% on p99 latency for databases and game server tick loops.<\/p>\n\n\n<!-- wp:heading level=\"2\" -->\n<h2>How NUMA Topology Looks on a Rented Host<\/h2>\n<!-- \/wp:post-content -->\n\n<!-- wp:paragraph -->\n<p>On a dual-socket EPYC or Xeon box, <code>lscpu<\/code> will show two NUMA nodes and a cross-node distance matrix, usually 10 for local and 21 or 32 for remote. Dual-socket EPYC with a single memory controller per socket presents two nodes; some Xeon configurations expose four or even eight by splitting each socket&#8217;s memory channels.<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>Confirm the topology before writing any tuning rules, because the correct pinning differs for two nodes versus four. Run <code>lscpu | grep NUMA<\/code> and <code>numactl --hardware<\/code> together. If the host is a single-socket dedicated machine, NUMA tuning is mostly a no-op and your latency effort is better spent on <a href=\"https:\/\/bestdedicatedwebhostingserver.com\/\">choosing hardware with higher single-core clock<\/a>.<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:heading level=\"2\" -->\n<h2>The Cost of a Remote Memory Access<\/h2>\n<!-- \/wp:heading -->\n\n<!-- wp:paragraph -->\n<p>Local DRAM access on current server silicon runs 70\u201390 ns. Remote access over AMD Infinity Fabric or Intel UPI runs 130\u2013180 ns depending on generation. That is a 2x penalty on every cache miss that crosses sockets, and databases miss cache constantly when scanning index pages larger than L3.<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>The penalty is not uniform. Bandwidth falls too: cross-socket traffic is limited by the interconnect width, not the memory bus. A workload that saturates memory bandwidth on one socket will queue behind the link when it spills across. This is why NUMA effects show up as bandwidth stalls in some workloads and as pure latency in others.<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:heading level=\"2\" -->\n<h2>Detecting NUMA-Related Latency<\/h2>\n<!-- \/wp:heading -->\n\n<!-- wp:paragraph -->\n<p>The tell-tale signature is a bimodal latency distribution: most requests fast, a long tail at roughly 1.7x median. If your p50 is 0.8 ms and p99 is 4.2 ms on a query that should be uniform, NUMA migration is a prime suspect. Confirm with <code>numastat -p &lt;pid&gt;<\/code>, which reports how much memory each process pulled from remote nodes.<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>A non-zero <code>numa_foreign<\/code> value combined with a high <code>numa_hit<\/code> ratio across two nodes indicates the process is allocating on both sockets. For a game server tick loop, the more reliable signal is jitter in frame time that correlates with nothing in the game logic \u2014 that is scheduler migration, not simulation cost.<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:heading level=\"2\" -->\n<h2>numactl Command Reference<\/h2>\n<!-- \/wp:heading -->\n\n<!-- wp:table -->\n<figure class=\"wp-block-table\"><table><thead><tr><th>Command<\/th><th>Effect<\/th><th>Use when<\/th><\/tr><\/thead><tbody><tr><td><code>numactl --hardware<\/code><\/td><td>Show node topology and free memory per node<\/td><td>Always, first step<\/td><\/tr><tr><td><code>numactl --show<\/code><\/td><td>Show current process policy<\/td><td>Verifying inherited defaults<\/td><\/tr><tr><td><code>numactl --cpunodebind=0 --membind=0 CMD<\/code><\/td><td>Run on node 0 CPUs and allocate only on node 0<\/td><td>Single-instance database<\/td><\/tr><tr><td><code>numactl --interleave=all CMD<\/code><\/td><td>Round-robin allocations across all nodes<\/td><td>Large shared-cache workloads<\/td><\/tr><tr><td><code>numactl --physcpubind=0-7 CMD<\/code><\/td><td>Pin to specific logical CPUs<\/td><td>Dedicated cores per service<\/td><\/tr><tr><td><code>numactl --preferred=1 CMD<\/code><\/td><td>Prefer node 1 but allow overflow<\/td><td>Memory larger than one node<\/td><\/tr><tr><td><code>numastat -p PID<\/code><\/td><td>Per-process node allocation report<\/td><td>Diagnosing remote allocations<\/td><\/tr><\/tbody><\/table><\/figure>\n<!-- \/wp:table -->\n\n<!-- wp:paragraph -->\n<p><code>--membind<\/code> is strict and will fail allocation rather than fall back, which is what you want for a database that must stay local. <code>--preferred<\/code> is the safer choice for anything whose working set might grow past one node \u2014 it degrades gracefully instead of OOMing.<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:heading level=\"2\" -->\n<h2>Database Workloads: PostgreSQL and MySQL<\/h2>\n<!-- \/wp:heading -->\n\n<!-- wp:paragraph -->\n<p>PostgreSQL&#8217;s shared buffers behave badly under strict pinning when the buffer pool is larger than one node&#8217;s memory. The pragmatic pattern is to pin the backend processes to one node and interleave the shared buffer allocation. Set <code>numactl --interleave=all<\/code> at postmaster start, or tune <code>huge_pages<\/code> and let the pool span both sockets evenly.<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>MySQL and InnoDB prefer strict pinning because the buffer pool is allocated up front and does not resize. Pin <code>mysqld<\/code> to node 0 with <code>--cpunodebind=0 --membind=0<\/code> and set <code>innodb_buffer_pool_size<\/code> to no more than 80% of node 0&#8217;s capacity. This keeps every page fault local and typically cuts p99 query latency by a quarter on a dual-socket box.<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:heading level=\"2\" -->\n<h2>Game Servers and Latency-Sensitive Daemons<\/h2>\n<!-- \/wp:heading -->\n\n<!-- wp:paragraph -->\n<p>A game server tick loop wants one core, isolated, on the same node as its entity data. Use <code>--physcpubind<\/code> to pin the process to a dedicated core and <code>--membind<\/code> to keep its heap local, then set the kernel&#8217;s <code>isolcpus<\/code> parameter to remove that core from the general scheduler. Combine this with <code>irqbalance<\/code> exclusion so network interrupts do not steal the core.<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>For multi-instance game hosting, run each instance pinned to its own core-and-node pair rather than letting the scheduler pack them. Two instances on eight cores across two nodes should be pinned four-and-four, not allowed to float. This is the same discipline as CPU pinning for realtime audio, and it is documented alongside other <a href=\"https:\/\/bestdedicatedwebhostingserver.com\/\">hardware tuning practices for dedicated hosts<\/a>.<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:heading level=\"2\" -->\n<h2>Pitfalls: Over-Pinning and Cgroup Conflicts<\/h2>\n<!-- \/wp:heading -->\n\n<!-- wp:paragraph -->\n<p>The most common mistake is pinning everything strictly and then wondering why a memory-hungry service OOMs. Strict <code>--membind<\/code> on a process that grows past one node fails allocations rather than spilling. Reserve strict binding for processes with bounded, known working sets.<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>The second mistake is stacking NUMA policy under a container runtime or systemd unit that already sets <code>AllowedCPUs<\/code>. The narrower constraint wins silently, and you end up debugging latency that is actually a three-core cpuset. Check <code>taskset -cp &lt;pid&gt;<\/code> after starting any service to confirm the effective mask matches your intent.<\/p>\n<!-- \/wp:paragraph -->\n","protected":false},"excerpt":{"rendered":"<p>On a dual-socket dedicated server, memory is physically partitioned into NUMA nodes: each CPU owns a slice of RAM and pays a lower latency to reach its own slice than&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"iawp_total_views":1,"footnotes":""},"categories":[14],"tags":[],"class_list":["post-1643","post","type-post","status-publish","format-standard","hentry","category-hardware-tuning"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v26.1 (Yoast SEO v26.1) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>NUMA Pinning on a Dedicated Host: Latency Wins for Databases and Game Servers - Best Dedicated Web Hosting Server Blog<\/title>\n<meta name=\"description\" content=\"On a dual-socket dedicated server, memory is physically partitioned into NUMA nodes: each CPU owns a slice of RAM and pays a lower latency to reach its\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/bestdedicatedwebhostingserver.com\/blog\/dedicated-host-numa-pinning-latency-workloads\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"NUMA Pinning on a Dedicated Host: Latency Wins for Databases and Game Servers\" \/>\n<meta property=\"og:description\" content=\"NUMA Pinning on a Dedicated Host: Latency Wins for Databases and Game Servers\" \/>\n<meta property=\"og:url\" content=\"https:\/\/bestdedicatedwebhostingserver.com\/blog\/dedicated-host-numa-pinning-latency-workloads\/\" \/>\n<meta property=\"og:site_name\" content=\"Best Dedicated Web Hosting Server Blog\" \/>\n<meta property=\"article:published_time\" content=\"2026-11-11T12:53:36+00:00\" \/>\n<meta name=\"author\" content=\"bestdedicatedwebhostingserver\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@bestdedicatedwebhostingserver\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"bestdedicatedwebhostingserver\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/bestdedicatedwebhostingserver.com\/blog\/dedicated-host-numa-pinning-latency-workloads\/\",\"url\":\"https:\/\/bestdedicatedwebhostingserver.com\/blog\/dedicated-host-numa-pinning-latency-workloads\/\",\"name\":\"NUMA Pinning on a Dedicated Host: Latency Wins for Databases and Game Servers - Best Dedicated Web Hosting Server Blog\",\"isPartOf\":{\"@id\":\"https:\/\/bestdedicatedwebhostingserver.com\/blog\/#website\"},\"datePublished\":\"2026-11-11T12:53:36+00:00\",\"author\":{\"@id\":\"https:\/\/bestdedicatedwebhostingserver.com\/blog\/#\/schema\/person\/6eb5f9ea35033fe8e67df44397e089b1\"},\"description\":\"On a dual-socket dedicated server, memory is physically partitioned into NUMA nodes: each CPU owns a slice of RAM and pays a lower latency to reach its\",\"breadcrumb\":{\"@id\":\"https:\/\/bestdedicatedwebhostingserver.com\/blog\/dedicated-host-numa-pinning-latency-workloads\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/bestdedicatedwebhostingserver.com\/blog\/dedicated-host-numa-pinning-latency-workloads\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/bestdedicatedwebhostingserver.com\/blog\/dedicated-host-numa-pinning-latency-workloads\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/bestdedicatedwebhostingserver.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"NUMA Pinning on a Dedicated Host: Latency Wins for Databases and Game Servers\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/bestdedicatedwebhostingserver.com\/blog\/#website\",\"url\":\"https:\/\/bestdedicatedwebhostingserver.com\/blog\/\",\"name\":\"Best Dedicated Web Hosting Server Blog\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/bestdedicatedwebhostingserver.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/bestdedicatedwebhostingserver.com\/blog\/#\/schema\/person\/6eb5f9ea35033fe8e67df44397e089b1\",\"name\":\"bestdedicatedwebhostingserver\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/bestdedicatedwebhostingserver.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/462a07aa37399bdb149e5f91dc3cd8906656bc4c7ed391a3b6f0199c5d2ab964?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/462a07aa37399bdb149e5f91dc3cd8906656bc4c7ed391a3b6f0199c5d2ab964?s=96&d=mm&r=g\",\"caption\":\"bestdedicatedwebhostingserver\"},\"sameAs\":[\"https:\/\/bestdedicatedwebhostingserver.com\/blog\",\"https:\/\/x.com\/bestdedicatedwebhostingserver\"],\"url\":\"https:\/\/bestdedicatedwebhostingserver.com\/blog\/author\/bestdedicatedwebhostingserver\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"NUMA Pinning on a Dedicated Host: Latency Wins for Databases and Game Servers - Best Dedicated Web Hosting Server Blog","description":"On a dual-socket dedicated server, memory is physically partitioned into NUMA nodes: each CPU owns a slice of RAM and pays a lower latency to reach its","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/bestdedicatedwebhostingserver.com\/blog\/dedicated-host-numa-pinning-latency-workloads\/","og_locale":"en_US","og_type":"article","og_title":"NUMA Pinning on a Dedicated Host: Latency Wins for Databases and Game Servers","og_description":"NUMA Pinning on a Dedicated Host: Latency Wins for Databases and Game Servers","og_url":"https:\/\/bestdedicatedwebhostingserver.com\/blog\/dedicated-host-numa-pinning-latency-workloads\/","og_site_name":"Best Dedicated Web Hosting Server Blog","article_published_time":"2026-11-11T12:53:36+00:00","author":"bestdedicatedwebhostingserver","twitter_card":"summary_large_image","twitter_creator":"@bestdedicatedwebhostingserver","twitter_misc":{"Written by":"bestdedicatedwebhostingserver","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/bestdedicatedwebhostingserver.com\/blog\/dedicated-host-numa-pinning-latency-workloads\/","url":"https:\/\/bestdedicatedwebhostingserver.com\/blog\/dedicated-host-numa-pinning-latency-workloads\/","name":"NUMA Pinning on a Dedicated Host: Latency Wins for Databases and Game Servers - Best Dedicated Web Hosting Server Blog","isPartOf":{"@id":"https:\/\/bestdedicatedwebhostingserver.com\/blog\/#website"},"datePublished":"2026-11-11T12:53:36+00:00","author":{"@id":"https:\/\/bestdedicatedwebhostingserver.com\/blog\/#\/schema\/person\/6eb5f9ea35033fe8e67df44397e089b1"},"description":"On a dual-socket dedicated server, memory is physically partitioned into NUMA nodes: each CPU owns a slice of RAM and pays a lower latency to reach its","breadcrumb":{"@id":"https:\/\/bestdedicatedwebhostingserver.com\/blog\/dedicated-host-numa-pinning-latency-workloads\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/bestdedicatedwebhostingserver.com\/blog\/dedicated-host-numa-pinning-latency-workloads\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/bestdedicatedwebhostingserver.com\/blog\/dedicated-host-numa-pinning-latency-workloads\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/bestdedicatedwebhostingserver.com\/blog\/"},{"@type":"ListItem","position":2,"name":"NUMA Pinning on a Dedicated Host: Latency Wins for Databases and Game Servers"}]},{"@type":"WebSite","@id":"https:\/\/bestdedicatedwebhostingserver.com\/blog\/#website","url":"https:\/\/bestdedicatedwebhostingserver.com\/blog\/","name":"Best Dedicated Web Hosting Server Blog","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/bestdedicatedwebhostingserver.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/bestdedicatedwebhostingserver.com\/blog\/#\/schema\/person\/6eb5f9ea35033fe8e67df44397e089b1","name":"bestdedicatedwebhostingserver","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/bestdedicatedwebhostingserver.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/462a07aa37399bdb149e5f91dc3cd8906656bc4c7ed391a3b6f0199c5d2ab964?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/462a07aa37399bdb149e5f91dc3cd8906656bc4c7ed391a3b6f0199c5d2ab964?s=96&d=mm&r=g","caption":"bestdedicatedwebhostingserver"},"sameAs":["https:\/\/bestdedicatedwebhostingserver.com\/blog","https:\/\/x.com\/bestdedicatedwebhostingserver"],"url":"https:\/\/bestdedicatedwebhostingserver.com\/blog\/author\/bestdedicatedwebhostingserver\/"}]}},"_links":{"self":[{"href":"https:\/\/bestdedicatedwebhostingserver.com\/blog\/wp-json\/wp\/v2\/posts\/1643","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/bestdedicatedwebhostingserver.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/bestdedicatedwebhostingserver.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/bestdedicatedwebhostingserver.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/bestdedicatedwebhostingserver.com\/blog\/wp-json\/wp\/v2\/comments?post=1643"}],"version-history":[{"count":1,"href":"https:\/\/bestdedicatedwebhostingserver.com\/blog\/wp-json\/wp\/v2\/posts\/1643\/revisions"}],"predecessor-version":[{"id":1658,"href":"https:\/\/bestdedicatedwebhostingserver.com\/blog\/wp-json\/wp\/v2\/posts\/1643\/revisions\/1658"}],"wp:attachment":[{"href":"https:\/\/bestdedicatedwebhostingserver.com\/blog\/wp-json\/wp\/v2\/media?parent=1643"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/bestdedicatedwebhostingserver.com\/blog\/wp-json\/wp\/v2\/categories?post=1643"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/bestdedicatedwebhostingserver.com\/blog\/wp-json\/wp\/v2\/tags?post=1643"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}