{"id":13642157,"url":"https://github.com/intel/intel-cmt-cat","last_synced_at":"2025-05-14T10:14:14.681Z","repository":{"id":24734250,"uuid":"28146558","full_name":"intel/intel-cmt-cat","owner":"intel","description":"User space software for Intel(R) Resource Director Technology","archived":false,"fork":false,"pushed_at":"2025-03-25T14:34:46.000Z","size":6744,"stargazers_count":708,"open_issues_count":7,"forks_count":187,"subscribers_count":66,"default_branch":"master","last_synced_at":"2025-04-03T20:07:01.204Z","etag":null,"topics":["c","cache","cat","cmt","llc","mba","mbm","perl","pqos","rdt","rdtset","snmp","swig"],"latest_commit_sha":null,"homepage":"http://www.intel.com/content/www/us/en/architecture-and-technology/resource-director-technology.html","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/intel.png","metadata":{"files":{"readme":"README.md","changelog":"ChangeLog","contributing":"CONTRIBUTING","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2014-12-17T16:58:08.000Z","updated_at":"2025-04-03T15:27:44.000Z","dependencies_parsed_at":"2023-02-18T06:31:28.371Z","dependency_job_id":"90a93cbd-bbc0-4031-af0b-dd10ee8ca5bd","html_url":"https://github.com/intel/intel-cmt-cat","commit_stats":{"total_commits":1410,"total_committers":46,"mean_commits":"30.652173913043477","dds":0.673049645390071,"last_synced_commit":"d03e0ca96dd427da0e9e3212baf665e5a8e90cda"},"previous_names":[],"tags_count":28,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/intel%2Fintel-cmt-cat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/intel%2Fintel-cmt-cat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/intel%2Fintel-cmt-cat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/intel%2Fintel-cmt-cat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/intel","download_url":"https://codeload.github.com/intel/intel-cmt-cat/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248338519,"owners_count":21087208,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["c","cache","cat","cmt","llc","mba","mbm","perl","pqos","rdt","rdtset","snmp","swig"],"created_at":"2024-08-02T01:01:28.065Z","updated_at":"2025-04-11T03:38:54.159Z","avatar_url":"https://github.com/intel.png","language":"C","readme":"README for Intel(R) RDT Software Package\n========================================\n\n[![Coverity Status](https://scan.coverity.com/projects/intel-cmt-cat/badge.svg)](https://scan.coverity.com/projects/intel-cmt-cat)\n[![License](https://img.shields.io/badge/Licence-BSD%203--Clause-blue)](https://github.com/intel/intel-cmt-cat/blob/master/lib/python/LICENSE)\n\n\n\nContents\n--------\n\n- Overview\n- Package Content\n- Hardware Support\n- OS Support\n- Software Compatibility\n- Legal Disclaimer\n\n\nOverview\n--------\n\nThis software package provides basic support for\nIntel(R) Resource Director Technology (Intel(R) RDT) and\nIntel(R) I/O Resource Director Technology (Intel(R) I/O RDT) including:\nCache Monitoring Technology (CMT), Memory Bandwidth Monitoring (MBM),\nCache Allocation Technology (CAT), Code and Data Prioritization (CDP)\nand Memory Bandwidth Allocation (MBA).\n\nIn principle, the software programs the technologies via\nModel Specific Registers (MSR) on a hardware thread basis.\nMSR access is arranged via a standard operating system driver:\nmsr on Linux and cpuctl on FreeBSD. In the most common architectural\nimplementations, presence of the technologies is detected via the\nCPUID instruction.\n\nIn a limited number of special cases where CAT is not architecturally\nsupported on a particular SKU (but instead a non-architectural\n(model-specific) implementation exists) it can be detected via brand\nstring. This brand string is read from CPUID and compared to a table\nof known-supported SKUs. If needed, a final check is to probe the\nspecific MSR’s to discover hardware capabilities, however it is\nrecommended that CPUID enumeration should be used wherever possible.\n\nFrom software version v1.0.0 the library adds option to use Intel(R) RDT via\navailable OS interfaces (perf and resctrl on Linux). The library detects\npresence of these interfaces and allows to select the preferred one through\na configuration option.\nAs the result, existing tools like 'pqos' or 'rdtset' can also be used\nto manage Intel(R) RDT in an OS compatible way. As of release v4.3.0, OS\ninterface became the default option. 'pqos' tool wrappers have been added to\nhelp with the interface selection. 'pqos-os' and 'pqos-msr' for OS and MSR\ninterface operations respectively.\n\nPID API compile time option has been removed and the APIs are always available.\nNote that proper operation of these APIs depends on availability and\nselection of OS interface.\n\nThis software package is maintained, updated and developed on\nhttps://github.com/intel/intel-cmt-cat\n\nhttps://github.com/intel/intel-cmt-cat/wiki provides FAQ, usage examples and\nuseful links.\n\nPlease refer to INSTALL file for package installation instructions.\n\n\nPackage Content\n---------------\n\n**\"lib\" directory:** \\\nIncludes software library files providing API's for\ntechnology detection, monitoring and allocation.\nPlease refer to the library README for more details (lib/README).\n\n**“lib/perl” directory:** \\\nIncludes PQoS library Perl wrapper.\nPlease refer to the interface README for more details (lib/perl/README).\n\n**“lib/python” directory:** \\\nIncludes PQoS library Python 3.x wrapper.\nPlease refer to the interface README for more details (lib/python/README.md).\n\n**\"pqos\" directory:** \\\nIncludes source files for a utility that provides command line access to\nIntel(R) RDT. The utility links against the library and programs\nthe technologies via its API's.\nPlease refer to the utility README for more details \"pqos/README\".\nManual page of \"pqos\" utility also provides information about tool usage:\n$ man pqos\n\n**\"rdtset\" directory:** \\\nIncludes source files for a utility that provides \"taskset\"-like functionality\nfor RDT configuration.\nThe utility links against the library and programs the technologies\nvia its API's.\nPlease refer to the utility README for more details \"rdtset/README\".\nManual page of \"rdtset\" utility also provides information about tool usage:\n$ man rdtset\n\n**\"appqos\" directory:**\\\nIncludes source files for an application that allows to group apps into\npriority based pools. Each pool is assigned an Intel(R) RDT and Intel(R) SST\nconfiguration that can be set on startup or at runtime through a REST API.\nPlease refer to the application README for more details \"appqos/README\".\n\n**\"appqos_client\" directory:**\\\nIncludes source files for an App QoS client web application. The app\nprovides a simple user interface to remotely configure Intel(R) RDT and\nIntel(R) SST on systems where App QoS is running.\nPlease refer to the application README for more details \"appqos_client/README\".\n\n**\"examples\" directory:** \\\nIncludes C and Perl examples of Intel(R) RDT usage via the library API's.\nPlease refer to README file for more details \"examples/README\".\n\n**\"snmp\" directory:** \\\nIncludes Net-SNMP AgentX subagent written in Perl to demonstrate the use of\nthe PQoS library Perl wrapper API.\nPlease refer to README file for more details \"snmp/README\".\n\n**\"tools\" directory:** \\\nIncludes membw tool for stressing memory bandwidth with different operations.\n\n**\"srpm\" directory:** \\\nIncludes *.src *.rpm and *.spec files for the software package.\n\n**\"ChangeLog\" file:** \\\nBrief description of changes between releases.\n\n**\"INSTALL\" file:** \\\nInstallation instructions.\n\n**\"LICENSE\" file:** \\\nLicense of the package.\n\n**\"unit-test\" directory:** \\\nUnit tests\n\nHardware Support\n----------------\n\nSupported products can be found in Addendum A of the Intel® Resource Director Technology (Intel® RDT) Architecture Specification:\nhttps://www.intel.com/content/www/us/en/content-details/789566/intel-resource-director-technology-intel-rdt-architecture-specification.html\n\nAddendum B contains a list of processors with model-specific Intel® RDT Features.  \n**Note:** Detection of model-specific features requires the `RDT_PROBE_MSR` environment variable to be set when using the library and utilities. \nThese features are only available when using the MSR interface. See the \"Interfaces\" section below for more information.\nSee the [wiki](https://github.com/intel/intel-cmt-cat/wiki/Usage-Examples#18-using-model-specific-non-architectural-features) for usage examples.\n\nFor additional Intel(R) RDT details please refer to the Intel(R)\nArchitecture Software Development Manuals available at:\nhttps://www.intel.com/content/www/us/en/develop/download/intel-64-and-ia-32-architectures-sdm-combined-volumes-1-2a-2b-2c-2d-3a-3b-3c-3d-and-4.html\nSpecific information can be found in volume 3a, Chapters 17.18 and 17.19.\n\n\nOS Support\n----------\n\n### Overview\n\nLinux is the primary supported operating system at the moment. There is a\nFreeBSD port of the software but due to limited validation scope it is rather\nexperimental at this stage. Although most modern Linux kernels include support\nfor Intel(R) RDT, the Intel(R) RDT software package predates these extensions\nand can operate with and without kernel support. The Intel(R) RDT software can\ndetect and leverage these kernel extensions when available to add functionality,\nbut is also compatible with legacy kernels.\n\n### OS Frameworks\n\nLinux kernel support for Intel(R) RDT was originally introduced with Linux perf\nsystem call extensions for CMT and MBM. More recently, the Resctrl interface\nadded support for CAT, CDP and MBA. On modern Linux kernels, it is advised to\nuse the kernel/OS interface when available. Details about these interfaces can\nbe found in resctrl_ui.txt. This software package, Intel(R) RDT, remains to\nwork seamlessly in all Linux kernel versions.\n\n### Interfaces\n\nThe Intel(R) RDT software library and utilities offer two interfaces to program\nIntel(R) RDT technologies, these are the MSR \u0026 OS interfaces.\n\nThe MSR interface is used to configure the platform by programming the hardware\n(MSR's) directly. This is the legacy interface and requires no kernel support\nfor Intel(R) RDT but is limited to monitoring and managing resources on a per\ncore basis.\n\nThe OS interface was later added to the package and when selected, the library\nwill leverage Linux kernel extensions to program these technologies. This allows\nmonitoring and managing resources on a per core/process basis and should be used\nwhen available.\n\nPlease see the tables below for more information on when Intel(R) RDT feature\n(MSR \u0026 OS) support was added to the package.\n\n###### Table 2. MSR interface feature support\n| Intel(R) RDT version   |    RDT feature enabled   | Kernel version required |\n| :--------------------: | :----------------------- | :----------------------:|\n| 0.1.3                  | L3 CAT, CMT, MBM         | Any                     |\n| 0.1.4                  | L3 CDP                   | Any                     |\n| 0.1.5                  | L2 CAT                   | Any                     |\n| 1.2.0                  | MBA                      | Any                     |\n| 2.0.0                  | L2 CDP                   | Any                     |\n| 5.0.0                  | I/O RDT                  | Any                     |\n\n\n###### Table 3. OS interface feature support\n| Intel(R) RDT version  |    RDT feature enabled           | Kernel version required | Recommended interface                                                                  |\n| :-------------------: | :------------------------------- | :---------------------: | :------------------------------------------------------------------------------------- |\n| 0.1.4                 | CMT (Perf)                       | 4.1                     | MSR (1)                                                                                |\n| 1.0.0                 | MBM (Perf)                       | 4.7                     | MSR (1)                                                                                |\n| 1.1.0                 | L3 CAT, L3 CDP, L2 CAT (Resctrl) | 4.10                    | OS for allocation only (with the exception of MBA) MSR for allocation + monitoring (2) |\n| 1.2.0                 | MBA (Resctrl)                    | 4.12                    | OS for allocation only MSR for allocation + monitoring (2)                             |\n| 2.0.0                 | CMT, MBM (Resctrl)               | 4.14                    | OS                                                                                     |\n| 2.0.0                 | L2 CDP                           | 4.16                    | OS                                                                                     |\n| 3.0.0                 | MBA CTRL (Resctrl)               | 4.18                    | OS                                                                                     |\n\n***References:***\n\n1. *Monitoring with Perf on a per core basis is not supported and returns invalid results.*\n2. *The MSR and OS interfaces are not compatible. MSR interface is recommended if monitoring and allocation is to be used.*\n\n### Software dependencies\n\nThe only dependencies of Intel(R) RDT is access to C and pthreads libraries and:\n- without kernel extensions - 'msr' kernel module\n- with kernel extensions - Intel(R) RDT extended Perf system call and Resctrl filesystem\n\nEnable Intel(R) RDT support in:\n- kernel v4.10 - v4.13 with kernel configuration option CONFIG_INTEL_RDT_A\n- kernel v4.14+ with kernel configuration option CONFIG_INTEL_RDT\n- kernel v5.0+ with kernel configuration option CONFIG_X86_RESCTRL\n\nNote: No kernel configuration options required before v4.10.\n\n\nSoftware Compatibility\n----------------------\n\nIn short, using Intel(R) RDT or PCM software together with\nLinux perf and cgroup frameworks is not allowed at the moment.\n\nAs disappointing as it is, use of Linux perf for CMT \u0026 MBM and\nIntel(R) RDT for CAT \u0026 CDP is not allowed. This is because\nLinux perf overrides existing CAT configuration during its operations.\n\nThere are a number of options to choose from in order to make use of CAT:\n- Intel(R) RDT software for CMT/MBM/CAT and CDP (core granularity only)\n- use Linux resctrl for CAT and Linux perf for monitoring (kernel 4.10+)\n- patch kernel with an out of tree cgroup patch (CAT) and\n  only use perf for monitoring (CMT kernels 4.1+, MBM kernels 4.6+)\n\nTable 4. Software interoperability matrix\n|                  | Intel(R) RDT  |     PCM      |  Linux perf  | Linux cgroup | Linux resctrl |\n| :--------------- | :-----------: | :----------: | :----------: | :----------: | :-----------: |\n|Intel(R) RDT      | Yes(1)        | Yes(2)       | Yes(5)       | No           | Yes(5)        |\n|PCM               | Yes(2)        | Yes          | No           | No           | No            |\n|Linux perf        | Yes(5)        | No           | Yes          | Yes(3)       | Yes           |\n|Linux cgroup      | No            | No           | Yes          | Yes(3)       | No            |\n|Linux resctrl (4) | Yes(5)        | No           | Yes          | No           | Yes           |\n\n***References:***\n\n1. *pqos monitoring from Intel(R) RDT can detect other\n    pqos monitoring processes in the system.\n    rdtset from Intel(R) RDT detects other processes started with rdtset and\n    it will not use their CAT/CDP resources.*\n\n2. *pqos from Intel(R) RDT can detect that PCM monitors cores and\n    it will not attempt to hijack the cores unless forced.\n    However, if pqos monitoring is started first and then\n    PCM is started then the latter one will hijack monitoring\n    infrastructure from pqos for its use.*\n\n3. *Linux cgroup kernel patch\n    https://www.kernel.org/doc/Documentation/cgroup-v1/cgroups.txt*\n\n4. *Linux kernel version 4.10 and newer.\n    A wiki for Intel resctrl is available at:\n    https://github.com/intel/intel-cmt-cat/wiki/resctrl*\n\n5. *Only with Linux kernel version 4.10 (and newer),\n    Intel(R) RDT version 1.0.0 (and newer) with selected OS interface\n    See '-I' option in 'man pqos' or 'pqos-os'.*\n\nPCM is available at:\nhttps://github.com/opcm/pcm\n\nTable 5. Intel(R) RDT software enabling status.\n|                  | Core  | Task  |  CMT  |  MBM  | L3 CAT | L3 CDP  | L2 CAT |  MBA   |\n| :--------------- | :---: | :---: | :---: | :---: | :----: | :-----: | :----: | :----: |\n|Intel(R) RDT      | Yes   | Yes(7)| Yes   | Yes   | Yes    | Yes     | Yes    | Yes    |\n|Linux perf        | Yes(6)| Yes   | Yes(1)| Yes(2)| No(3)  | No(3)   | No(3)  | No     |\n|Linux cgroup      | No    | Yes   | No    | No    | Yes(4) | No      | No     | No     |\n|Linux resctrl (5) | Yes   | Yes   | Yes(8)| Yes(8)| Yes    | Yes     | Yes    | Yes(9) |\n\n***Legend:***\n\n- **Core**  - use of technology with core granularity\n- **Task**  - use of technology per task or group of tasks\n\n***References:***\n\n1. *Linux kernel version 4.1 and newer*\n2. *Linux kernel version 4.6 and newer*\n3. *Linux perf corrupts CAT and CDP configuration even though\n    it doesn't enable it*\n4. *This is patch and relies on Linux perf enabling*\n5. *Linux kernel version 4.10 and newer*\n6. *perf API allows for CMT/MBM core monitoring but returned values are incorrect*\n7. *Intel(R) RDT version 1.0.0 monitoring only and depends on kernel support*\n8. *Linux kernel version 4.14 and newer*\n9. *Linux kernel version 4.12 and newer*\n\nLegal Disclaimer\n----------------\n\nTHIS SOFTWARE IS PROVIDED BY INTEL\"AS IS\". NO LICENSE, EXPRESS OR\nIMPLIED, BY ESTOPPEL OR OTHERWISE, TO ANY INTELLECTUAL PROPERTY RIGHTS\nARE GRANTED THROUGH USE. EXCEPT AS PROVIDED IN INTEL'S TERMS AND\nCONDITIONS OF SALE, INTEL ASSUMES NO LIABILITY WHATSOEVER AND INTEL\nDISCLAIMS ANY EXPRESS OR IMPLIED WARRANTY, RELATING TO SALE AND/OR\nUSE OF INTEL PRODUCTS INCLUDING LIABILITY OR WARRANTIES RELATING TO\nFITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR INFRINGEMENT\nOF ANY PATENT, COPYRIGHT OR OTHER INTELLECTUAL PROPERTY RIGHT.\n","funding_links":[],"categories":["C"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fintel%2Fintel-cmt-cat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fintel%2Fintel-cmt-cat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fintel%2Fintel-cmt-cat/lists"}