{"id":368,"date":"2008-12-04T23:48:30","date_gmt":"2008-12-04T22:48:30","guid":{"rendered":"http:\/\/mattiesworld.gotdns.org\/weblog\/2008\/12\/04\/setting-a-process-processor-affinity-in-linux\/"},"modified":"2008-12-04T23:48:30","modified_gmt":"2008-12-04T22:48:30","slug":"setting-a-process-processor-affinity-in-linux","status":"publish","type":"post","link":"https:\/\/mattiesworld.gotdns.org\/weblog\/2008\/12\/04\/setting-a-process-processor-affinity-in-linux\/","title":{"rendered":"Setting a process&#8217; processor affinity in linux"},"content":{"rendered":"<p>Sometimes, people like me like to run stuff on a dedicated cpu instead of using all available cpu&#8217;s. The key to success here is this nifty tool: <a href=\"http:\/\/freequaos.host.sk\/schedtool\/\">schedtool<\/a>. Unfortunately, I didn&#8217;t find it anywhere in suse&#8217;s package database, nor the build service (if you know a repo or util package, please let me know).<\/p>\n<p>But don&#8217;t worry, I guess nobody cares to make a separate package as it is such a small util. Just download the source from the website and make\/make install (configure isn&#8217;t even needed).<\/p>\n<p>Then, to run a process, in this case a dir listing, on CPU0, use:<\/p>\n<p><code>schedtool -a 0x1 -e ls -la<\/code><\/p>\n<p>-e specifies the command to execute<br \/>\n-a is followed by a bitmask in which each bit represents a CPU.<\/p>\n<p>I have found that somehow it is best to always use the hexadecimal notation, even if your number is less than 10.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Sometimes, people like me like to run stuff on a dedicated cpu instead of using all available cpu&#8217;s. The key to success here is this nifty tool: schedtool. Unfortunately, I didn&#8217;t find it anywhere in suse&#8217;s package database, nor the build service (if you know a repo or util package, please let me know). But &hellip; <a href=\"https:\/\/mattiesworld.gotdns.org\/weblog\/2008\/12\/04\/setting-a-process-processor-affinity-in-linux\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Setting a process&#8217; processor affinity in linux<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,10],"tags":[],"class_list":["post-368","post","type-post","status-publish","format-standard","hentry","category-linux","category-tweaking"],"_links":{"self":[{"href":"https:\/\/mattiesworld.gotdns.org\/weblog\/wp-json\/wp\/v2\/posts\/368","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mattiesworld.gotdns.org\/weblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mattiesworld.gotdns.org\/weblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mattiesworld.gotdns.org\/weblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mattiesworld.gotdns.org\/weblog\/wp-json\/wp\/v2\/comments?post=368"}],"version-history":[{"count":0,"href":"https:\/\/mattiesworld.gotdns.org\/weblog\/wp-json\/wp\/v2\/posts\/368\/revisions"}],"wp:attachment":[{"href":"https:\/\/mattiesworld.gotdns.org\/weblog\/wp-json\/wp\/v2\/media?parent=368"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mattiesworld.gotdns.org\/weblog\/wp-json\/wp\/v2\/categories?post=368"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mattiesworld.gotdns.org\/weblog\/wp-json\/wp\/v2\/tags?post=368"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}