<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Seastar on Hammer's Blog</title><link>https://lkic1625.github.io/blog/seastar/</link><description>Recent content in Seastar on Hammer's Blog</description><generator>Hugo</generator><language>ko-kr</language><copyright>© 조원빈 - All rights reserved</copyright><lastBuildDate>Fri, 18 Sep 2026 13:40:59 +0900</lastBuildDate><atom:link href="https://lkic1625.github.io/blog/seastar/index.xml" rel="self" type="application/rss+xml"/><item><title>Cache Affinity와 Seastar</title><link>https://lkic1625.github.io/cache-affinity/</link><pubDate>Fri, 18 Sep 2026 13:40:59 +0900</pubDate><guid>https://lkic1625.github.io/cache-affinity/</guid><description>&lt;h2 id="intro">Intro&lt;/h2>
&lt;p>Cache Affinity란, 기본적으로 스케쥴링 영역에 해당하는 동작성이다. 이에 대한 정리를 practical 한 예시와 함께 정리해본다.&lt;/p>
&lt;h2 id="cache-affinity">Cache Affinity&lt;/h2>
&lt;p>CPU는 대략적으로 L1, L2, L3, DRAM으로 이루어지며 각 레벨에서의 연산은 기본적으로 단계를 넘어갈수록 매우커진다. 특히, DRAM에 있는 값을 가져오는 연산은 수백배 차이날 수 있다. 그렇기에 이러한 하드웨어 동작에서 중요한 것은 CPU cache에 실제로 해당 값이 있는지를 기반으로 동작의 판가름이 난다. 대략적인 지연시간(latency)는 아래와 같다.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-text" data-lang="text">&lt;span style="display:flex;">&lt;span>Register ~ 1 cycle
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>L1 ~ 4 cycles
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>L2 ~ 10~20 cycles
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>L3 ~ 수십 cycles
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>DRAM ~ 수백 cycles
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>기본적으로 이러한 캐시 친화성은 CPU 스케쥴링의 영역지만, 더 나아가 현대의 소프트웨어 설계 기법에서도 볼 수 있다.&lt;/p></description></item></channel></rss>