大网数据广告活动
服务器运维问答

How do I manage last level cache among virtual machines?

· 52CE 我爱测

Let's say I am gonna run a server to lend virtual machines to clients, like other CSP vendors do. My server has 20 cores, so there will be a total of 5 instances with 4 cores. What I am worried about is sharing the last level cac…

问题原文

原帖链接 · HyeongTak.Ji · CC BY-SA 4.0

Let's say I am gonna run a server to lend virtual machines to clients, like other CSP vendors do. My server has 20 cores, so there will be a total of 5 instances with 4 cores.

What I am worried about is sharing the last level cache. I want all instances to nicely share the LLC but there must be some workloads such as streaming that trying to consume almost all capacity, resulting in undermining other workloads' performance.

In this case, or in the usual cases of famous CSP vendors, what can the manager do? Is there any solution other than Intel CAT? Or the situation that I'm concerned about won't happen?

I might have violated some asking rules of this site. Sorry for your inconvenience in advance.

已采纳解答

原帖链接 · John Mahowald · CC BY-SA 4.0

Test your workload on the hardware and software environments you are considering. Ideally actual production work, but short of that simulate what clients would be doing: transactional, file transfer, encoding media, whatever. Find technical blogs for inspiration. For example, Cloudflare's "Gen X" hardware selection is lacking in scientific discipline, but they are right to consider caches in their Intel Xeon Platinum 6162 vs AMD EPYC 7642 competition.

Several vendors can deliver 20+ core CPUs, and they differ on L3 cache. AMD EPYC has L3 in each 4 core complex. IBM POWER9 has L3 dedicated per 2 cores. Intel Xeon Cascade Lake has L3 shared across all cores. Locating caches as close to the core as possible shaves off cycles of latency, possibly making a difference to performance.

CPU caches tend to be less shared system wide than memory. In designs where the cache is dedicated to a core complex, a remote VM's 4 cores is not going to steal from some other cores. Yes, if something is churning the L3 cache that will hurt the hit ratio and need to go to memory more, but that depends on workload.

First test with an unaware scheduler and no QoS, as in don't explicitly manage L3. Even a naïve assignment to cores should give cores a roughly equal share of cache. Find where the bottlenecks truly are, could equally be storage or network or a hundred other places.

Should you need fine control of cache, ask your vendors how to do that on your chosen CPU and hypervisor. Intel has Resource Director. AMD has Platform Quality of Service. Both are showing up in the Linux kernel, AMD more recently. But do this after testing, so you are informed with how hard your workload hits the cache.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2020-10-28)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。