{"id":19203333,"url":"https://github.com/rouming/ccont","last_synced_at":"2025-10-09T12:35:38.652Z","repository":{"id":142055917,"uuid":"54385635","full_name":"rouming/ccont","owner":"rouming","description":"Tool burns CPUs on different NUMA nodes and measures execution time","archived":false,"fork":false,"pushed_at":"2024-06-19T11:13:11.000Z","size":3,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-18T16:48:12.309Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rouming.png","metadata":{"files":{"readme":"README","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-03-21T12:09:03.000Z","updated_at":"2024-06-19T11:13:15.000Z","dependencies_parsed_at":null,"dependency_job_id":"2c766f72-3d72-4c81-bfb3-3e8870e2664c","html_url":"https://github.com/rouming/ccont","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/rouming/ccont","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rouming%2Fccont","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rouming%2Fccont/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rouming%2Fccont/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rouming%2Fccont/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rouming","download_url":"https://codeload.github.com/rouming/ccont/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rouming%2Fccont/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279001432,"owners_count":26083078,"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","status":"online","status_checked_at":"2025-10-09T02:00:07.460Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-11-09T12:47:55.851Z","updated_at":"2025-10-09T12:35:38.637Z","avatar_url":"https://github.com/rouming.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"ccont: Tool burns CPUs on different NUMA nodes and measures execution time.\n\nDescription:\n    The goal is to measure cache contention on different NUMA nodes,\n    burn different CPUs, execute different instructions with different\n    load patterns, e.g. the following is the list of three load patterns\n    which were executed on machine with 2 NUMA nodes and 8 CPUs:\n\n    o cpu-increase - on each iteration number of CPU is increased:\n\n      # ./ccont --load cpu-increase --op cmpxchg\n      Nodes  N0   N1  CPUs    operation       min       max       avg     stdev\n       CPUs *--- ----    1      cmpxchg     8.938     8.938     8.938     0.000\n       CPUs **-- ----    2      cmpxchg    36.114    36.119    36.117     0.004\n       CPUs ***- ----    3      cmpxchg    54.270    54.272    54.271     0.001\n       CPUs **** ----    4      cmpxchg    72.292    72.321    72.313     0.013\n       CPUs **** *---    5      cmpxchg    61.691   108.060    98.782    20.735\n       CPUs **** **--    6      cmpxchg   101.316   136.923   125.059    18.369\n       CPUs **** ***-    7      cmpxchg   151.639   169.218   161.702     9.358\n       CPUs **** ****    8      cmpxchg   192.281   196.250   194.281     2.098\n\n    o node-cascade - on each iteration CPUs from each node are burned:\n\n      # ./ccont --load node-cascade --op cmpxchg\n      Nodes  N0   N1  CPUs    operation       min       max       avg     stdev\n       CPUs **** ----    4      cmpxchg    72.287    72.322    72.310     0.016\n       CPUs ---- ****    4      cmpxchg    72.327    72.333    72.330     0.003\n\n    o cpu-rollover - on each iteration executor thread rolls to another CPU on\n    the next node, keeping the same amount of CPUs burning:\n\n      # ./ccont --load cpu-rollover --op cmpxcgh\n      Nodes  N0   N1  CPUs    operation       min       max       avg     stdev\n       CPUs **** ----    4      cmpxchg    48.769    48.774    48.772     0.002\n       CPUs ***- *---    4      cmpxchg    85.506    97.754    94.683     6.118\n       CPUs **-- **--    4      cmpxchg   116.803   121.450   119.108     2.658\n       CPUs *--- ***-    4      cmpxchg    91.312   103.877   100.721     6.273\n       CPUs ---- ****    4      cmpxchg    48.288    48.368    48.323     0.038\n\n    Memory chunk for each load is always allocated on the node#0.\n\n    Results show, that scattered tasks over NUMA nodes show bad performance for\n    cmpxchg instruction (cpu-rollover pattern), but execution on remote node\n    is not so bad, because of the L3 cache (node-cascade pattern).  Increase of\n    the CPUs number can degrade performance by factor of 24 because of the cache\n    line contention (cpu-increase pattern).\n\n    The following burning operations are supported:\n\n    o \"idle\" - idle loop:\n          used just for calibrating.\n              while (spins--)\n                   ;\n\n    o \"memset64\" - memset glibc call:\n\t      memsets 64 bytes (usual cache line size).\n\n    o \"memset128\" - memset glibc call:\n\t      memsets 128 bytes.\n\n    o \"memset256\" - memset glibc call:\n\t      memsets 256 bytes.\n\n    o \"test_bit\" - btl:\n          testing a bit, used for test_bit() in Linux kernel.\n              var | (1 \u003c\u003c bit)\n\n    o \"set_bit\" - bts:\n          test and set bit, used for test_and_set_bit() in Linux kernel.\n          \"test_bit\" - name in test results.\n              res = var | (1 \u003c\u003c bit)\n              var |= (1 \u003c\u003c bit)\n\n    o \"inc\" - lock inc:\n          increment, used for atomic_inc() in Linux kernel.\n              var += 1\n\n    o \"xadd\" - lock xadd:\n          exchanges operands, used for __sync_fetch_and_add()\n          and similar gcc atomic builtins.\n              tmp = src + dst;\n              src = dst;\n              dst = tmp;\n\n    o \"cmpxchg\" - lock cmpxchg:\n          exchanges operangs, used for cmpxchg() for all sorts of atomic\n          exchanges in Linux kernel.\n              res = var\n              if (res == old)\n                  var = new\n\n    o \"mfence\" - mfence:\n          memory barrier for load and store, used for smp_mb() in Linux kernel.\n\n    o \"sfence\" - sfence:\n          memory barrier for store, used for smp_wmb() in Linux kernel.\n\n    o \"lfence\" - lfence:\n          memory barrier for load, used for smp_rmb() in Linux kernel.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frouming%2Fccont","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frouming%2Fccont","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frouming%2Fccont/lists"}