{"id":30,"date":"2020-04-10T19:51:54","date_gmt":"2020-04-10T18:51:54","guid":{"rendered":"https:\/\/blog.thomarite.uk\/?p=30"},"modified":"2020-05-11T23:52:23","modified_gmt":"2020-05-11T22:52:23","slug":"microarchitecture","status":"publish","type":"post","link":"https:\/\/blog.thomarite.uk\/index.php\/2020\/04\/10\/microarchitecture\/","title":{"rendered":"Microarchitecture"},"content":{"rendered":"\n<p>This week attended a webinar from Alex Blewitt about CPU microarchiteture to increase application performance. The link was sent by a work colleague but you can get pdf and see the presentation from the below source:<\/p>\n\n\n\n<p><a href=\"https:\/\/www.infoq.com\/presentations\/microarchitecture-modern-cpu\">https:\/\/www.infoq.com\/presentations\/microarchitecture-modern-cpu<\/a><\/p>\n\n\n\n<p>The presentation is obviously very interesting. You need to know your CPU to get the most of it.<\/p>\n\n\n\n<p>How can I see my CPU architecture?  &#8220;lstopo&#8221; (graphic) or &#8220;lstopo-no-graphics&#8221; is your friend. This is from my laptop. <\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code># lstopo-no-graphics<br>Machine (7934MB total)<br>Package L#0<br>NUMANode L#0 (P#0 7934MB)<br>L3 L#0 (4096KB)<br>L2 L#0 (256KB) + L1d L#0 (32KB) + L1i L#0 (32KB) + Core L#0<br>PU L#0 (P#0)<br>PU L#1 (P#2)<br>L2 L#1 (256KB) + L1d L#1 (32KB) + L1i L#1 (32KB) + Core L#1<br>PU L#2 (P#1)<br>PU L#3 (P#3)<br>HostBridge<br>PCI 00:02.0 (VGA)<br>PCIBridge<br>PCI 02:00.0 (Network)<br>Net \"wlp2s0\"<br>PCI 00:1f.2 (SATA)<br>Block(Disk) \"sda\"<br>Misc(MemoryModule)<br>Misc(MemoryModule)<br>#<\/code><\/pre>\n\n\n\n<p>As you can see, my humble laptop just have one NUMA node, with two cores\/processors, and two hyperthreads per core.<\/p>\n\n\n\n<p>But in a server, very likely you will have more NUMA nodes, more cores and more processors so you want to be sure that is used properly.<\/p>\n\n\n\n<p>I am not expert in CPU performance at all but there many important points like memory allocation, huge pages, pinning memory\/threads (isolcpu, taskset, etc), compiler strategies and tools to test the performance. Some of them ring the bell and it is nice to know that exist. You never know when you will have to dive in this type of water.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This week attended a webinar from Alex Blewitt about CPU microarchiteture to increase application performance. The link was sent by a work colleague but you can get pdf and see the presentation from the below source: https:\/\/www.infoq.com\/presentations\/microarchitecture-modern-cpu The presentation is obviously very interesting. You need to know your CPU to get the most of it. &hellip; <a href=\"https:\/\/blog.thomarite.uk\/index.php\/2020\/04\/10\/microarchitecture\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Microarchitecture&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-30","post","type-post","status-publish","format-standard","hentry","category-unix"],"_links":{"self":[{"href":"https:\/\/blog.thomarite.uk\/index.php\/wp-json\/wp\/v2\/posts\/30","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.thomarite.uk\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.thomarite.uk\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.thomarite.uk\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.thomarite.uk\/index.php\/wp-json\/wp\/v2\/comments?post=30"}],"version-history":[{"count":2,"href":"https:\/\/blog.thomarite.uk\/index.php\/wp-json\/wp\/v2\/posts\/30\/revisions"}],"predecessor-version":[{"id":139,"href":"https:\/\/blog.thomarite.uk\/index.php\/wp-json\/wp\/v2\/posts\/30\/revisions\/139"}],"wp:attachment":[{"href":"https:\/\/blog.thomarite.uk\/index.php\/wp-json\/wp\/v2\/media?parent=30"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.thomarite.uk\/index.php\/wp-json\/wp\/v2\/categories?post=30"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.thomarite.uk\/index.php\/wp-json\/wp\/v2\/tags?post=30"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}