惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

W
WeLiveSecurity
The GitHub Blog
The GitHub Blog
Engineering at Meta
Engineering at Meta
Microsoft Azure Blog
Microsoft Azure Blog
The Register - Security
The Register - Security
Stack Overflow Blog
Stack Overflow Blog
博客园 - 三生石上(FineUI控件)
T
Threat Research - Cisco Blogs
S
SegmentFault 最新的问题
V2EX - 技术
V2EX - 技术
Hacker News: Ask HN
Hacker News: Ask HN
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
P
Proofpoint News Feed
J
Java Code Geeks
Microsoft Security Blog
Microsoft Security Blog
M
MIT News - Artificial intelligence
AI
AI
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
P
Proofpoint News Feed
Hacker News - Newest:
Hacker News - Newest: "LLM"
B
Blog
N
News and Events Feed by Topic
N
News | PayPal Newsroom
Google DeepMind News
Google DeepMind News
酷 壳 – CoolShell
酷 壳 – CoolShell
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
WordPress大学
WordPress大学
C
Cybersecurity and Infrastructure Security Agency CISA
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
博客园 - 【当耐特】
U
Unit 42
腾讯CDC
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
The Cloudflare Blog
H
Help Net Security
Recent Announcements
Recent Announcements
P
Privacy & Cybersecurity Law Blog
IT之家
IT之家
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Security Archives - TechRepublic
Security Archives - TechRepublic
L
LINUX DO - 热门话题
Martin Fowler
Martin Fowler
MongoDB | Blog
MongoDB | Blog
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
H
Heimdal Security Blog
博客园 - 聂微东
S
Securelist
大猫的无限游戏
大猫的无限游戏
Cloudbric
Cloudbric
Cisco Talos Blog
Cisco Talos Blog

博客园 - redfox

apns 服务 新的开始,新的起点 心情笔记 最简便的清空memcache的方法 MYSQL慢查询日志(转) 实现linux和时间服务器的时间同步 Windows 远程桌面不能连接解决办法 常用的adodb使用方法 六个经典的英语面试问题 php curl 下载文件 向访客和爬虫显示不同的内容 我的新博客地址! apache日志分割专题 uptime查看linux负载及数值的意义 linux 下的服务 /etc/xinetd.d ajax 跨域 XAMPP 配置虚拟机 ie下js调试超级爽的工具IE WebDeveloper V2 (附注册码) www.qian14.cn 终于解决了这个问题
二级缓存伪优化揭秘(转)
redfox · 2009-08-30 · via 博客园 - redfox

对于处理器(CPU)二级缓存(L2 Cache)的作用,想必大家都多多少少有一定了解,即使不完全明白其中道理,至少也可以从Pentium 4和Celeron的差价判断出其重要性,256KB二级缓存的Celeron D 2.4GHz比512KB二级缓存的Pentium 4 2.4C便宜近一半。如果这时候有人说Windows XP操作系统并没有充分利用CPU的二级缓存,你会怎么想?这简直就是在浪费用户的投资嘛!

事实上,有一种广为流传的说法是Windows XP没有对CPU进行优化,理由就是它默认状态下并没有打开CPU的二级缓存。如果你打开注册表编辑器,找到“HKEY_LOCAL_MACHINE\SYSTEM\ CurrentControlSet\Control\Session Manager\Memory Management”,在其中可以看到一个名为“SecondLevelDataCache”的项,它的默认值为“0”。再明显不过了,“SecondLevelDataCache”就是二级数据缓存的意思,既然被设置为“0”,那就是关闭了二级缓存。

正是基于以上论断,才出现了优化二级缓存的技巧,也就是把“SecondLevelDataCache”的值设置为CPU的二级缓存容量(单位KB)。在众多的优化软件中也包含了优化CPU二级缓存的设置。

事实上,修改“SecondLevel DataCache”的值没有任何优化作用,这是为什么呢?
我们在微软的知识库中找到了如下的内容:“HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management”中的SecondLevelDataCache键的值只有在Windows XP系统从硬件抽象层(Hardware Abstraction Layer )读取CPU二级缓存(L2)失败时才会读取SecondLevelDataCache键的数据。而且SecondLevelDataCache键值=0的意义是二级缓存为256KB。

在一篇知识库文章中我们还找到了“Do not change the SecondLevelDataCache entry ”这样的话,在文章中指出一些第三方资料宣称修改SecondLevelDataCache键的值可以提高系统性能是不正确的。二级缓存的数值是由操作系统检测并且完全不受SecondLevelDataCache值的影响。

从微软知识库的文章中我们可以看到,所谓的Windows用户需要用户手动打开二级缓存这种说法是错误的。Windows系统是根据硬件抽象层读取CPU的二级缓存数值。只有在读取失败时才会读取SecondLevelDataCache的值,而且SecondLevelDataCache的默认数值0所代表的意义就是二级缓存为256KB,而不是表示关闭。所以CPU的二级缓存在任何时候都是开启的,用户没有必要再自行修改。

因此,无论是WindowsXP还是Vista都无需对此项进行优化,纯粹是自欺欺人。