{"id":104116,"date":"2020-08-24T07:00:00","date_gmt":"2020-08-24T14:00:00","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/oldnewthing\/?p=104116"},"modified":"2020-09-09T06:12:06","modified_gmt":"2020-09-09T13:12:06","slug":"20200824-00","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/oldnewthing\/20200824-00\/?p=104116","title":{"rendered":"How can I get the number of processors in the system, when there are more than 64?"},"content":{"rendered":"<p>A customer noted that the way their program obtains the number of processors is by calling <code>Get\u00adSystem\u00adInfo<\/code> and looking at the <code>dwNumberOfProcessors<\/code>. However, the documentation notes that this gives the number of processors in the current processor group, and that can be less than the total number of processors.<\/p>\n<p>For example, when they checked the <code>dwNumberOfProcessors<\/code> on a system with 80 processors (lucky them), they found that it reported only 40 processors.<\/p>\n<p>How can they get the total number of processors across all processor groups?<\/p>\n<p>The easy way is to call <code>Get\u00adActive\u00adProcessor\u00adCount<\/code> with the <code>ALL_<\/code><code>PROCESSOR_<\/code><code>GROUPS<\/code> parameter. This counts up all processors across all groups.<\/p>\n<p>The hard way is to call <code>Get\u00adLogical\u00adProcessor\u00adInformation\u00adEx<\/code> and ask for <code>Relation\u00adGroup<\/code>. Then go through all the active groups and add up all of the <code>Active\u00adProcessor\u00adCount<\/code>s. This is more work, but you also get to see the distribution of the processors among the groups, if that&#8217;s something you&#8217;re interested in.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>You can ask for the active processor count.<\/p>\n","protected":false},"author":1069,"featured_media":111744,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[25],"class_list":["post-104116","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-oldnewthing","tag-code"],"acf":[],"blog_post_summary":"<p>You can ask for the active processor count.<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/104116","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/users\/1069"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/comments?post=104116"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/104116\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/media\/111744"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/media?parent=104116"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/categories?post=104116"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/tags?post=104116"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}