{
  "id": 19450188,
  "title": "Per-Core Licensing for .NET Server Software: Counting Cores Correctly and Binding the Entitlement",
  "url": "https://urgent.news/2026/11/11/per-core-licensing-for-net-server-software-counting-cores-correctly",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-11-11T05:23:26.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/zero_heartbeat_06a3625d7a/per-core-licensing-for-net-server-software-counting-cores-correctly-and-binding-the-entitlement-3f9a"
  },
  "original_language": "en",
  "account": "Per-core licensing is a common model for selling server software, where the price scales with the CPU capacity the customer runs the software on. However, determining the correct number of cores to license can be tricky. Environment.ProcessorCount, the obvious API in .NET, often returns the wrong answer. It counts logical processors, not the actual capacity being sold, and can be affected by hyperthreading, affinity settings, and container quotas.\n\nTo avoid licensing bugs, developers must decide which core count to use as the licensing unit: physical cores, logical processors, or container CPU quota. Once chosen, this number must be measured accurately. For physical cores on Windows, sum the NumberOfCores across sockets using the Management Object Searcher. On Linux, count unique physical ID and core ID pairs from the /proc/cpuinfo file. For container CPU quota, read the quota value from the cgroup v2 or v1 directories. By measuring the right number of cores consistently, developers can avoid incorrect licensing and ensure customers are billed fairly.",
  "summary": "Per-core licensing is how a lot of server software is sold: a price that scales with the CPU capacity the customer runs you on, because a database engine or analytics service on a 64-core box delivers far more value than the same binary on a 4-core VM. The model is simple to state and surprisingly easy to get wrong, because the hard part is not the policy — it is answering, correctly and…",
  "key_points": [
    "Per-core licensing scales software price with CPU capacity",
    "Environment.ProcessorCount counts logical processors, not actual capacity",
    "Measure physical cores on Windows, unique IDs on Linux, container quota value"
  ],
  "editors_take": "Standardizing core measurement across different operating systems and environments prevents billing discrepancies and protects developers from the technical complexities of hyperthreading and containerized resource limits.",
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}