首页
社区
课程
招聘
[旧帖] 视窗7内存使用 0.00雪花
发表于: 2010-2-27 22:54 1526

[旧帖] 视窗7内存使用 0.00雪花

2010-2-27 22:54
1526
February 25th, 2010 2010年2月25日
Windows 7 memory usage: What's the best way to measure?视窗7内存使用:什么是最好的方法来衡量?
Posted by Ed Bott @ 6:59 pm由Ed博特张贴@下午6点59分

Categories: Performance , Uncategorized , Windows 7 分类: 性能, 未归类, 视窗7

Tags: Memory , Physical Memory , RAM , Tool , Memory Usage ..., Windows Memory Management , Committed Bytes , Microsoft Windows , Microsoft Windows 7 , Flash Memory 标签: 内存, 物理内存, 内存, 工具, 内存使用情况 ,Windows内存管理, 承诺字节, 微软的Windows, 微软Windows 7, 快闪记忆体

208 TalkBacksPrintEmailThumbs UpThumbs Down+3743
Windows memory management is rocket science. Windows内存管理是火箭科学。 And don't believe anyone who tells you otherwise.不相信任何人,否则谁告诉你。

Since Windows 7 was released last October I've read lots of articles about the right and wrong way to measure and manage the physical memory on your system.由于Windows 7发布去年10月,我读过有关的权利和错误的方法来衡量和管理系统上的物理内存的文章很多。 Much of it is well-meaning but just wrong.而在很大程度上是善良的,但绝对错误的。

It doesn't help that the topic is filled with jargon and technical terminology that you literally need a CS degree to understand.它不能帮助这个题目与技术名词术语,填写你需要一个CS字面上理解程度。 Even worse, web searches turn up mountains of misinformation, some of it on Microsoft's own web sites.更糟的是,网络搜索露面的错误山,其中有一些在微软自己的网站。 And then there's the fact that Windows memory management has evolved, radically, over the past decade.此外,还有的认为,Windows的内存管理的演变其实,从根本上在过去十年中,。 Someone who became an expert on measuring memory usage using Windows 2000 might have been able to muddle through with Windows XP, but he would be completely flummoxed by the changes that began in Windows Vista (and its counterpart, Windows Server 2008) and have continued in Windows 7 (and its counterpart, Windows Server 2008 R2).有人谁成为衡量内存的使用使用Windows 2000的专家可能已经可以蒙混过关,通过使用Windows XP,但我将完全的改变,在Windows Vista开始搞得狼狈不堪,手足无措(及其对应的Windows Server 2008),并继续在视窗7(及其对应的Windows服务器2008 R2)。

To help cut through the confusion, I've taken a careful look at memory usage on a handful of Windows 7 systems here, with installed RAM ranging from 1 GB to 10 GB.为了帮助削减通过混淆,我已经采取了在极少数的Windows内存使用在仔细研究7系统在这里,安装了1 GB到10 GB的各种规格的内存。 The behavior in all cases is strikingly similar and consistent, although you can get a misleading picture depending on which of three built-in performance monitoring tools you use.在所有情况下的行为是惊人的相似和一致的,尽管你可以得到一个误解,这取决于三个内置性能监视工具使用。 What helped me understand exactly what was going on with Windows 7 and RAM was to arrange all three of these tools side by side and then begin watching how each one responded as I increased and decreased the workload on the system.是什么使我了解什么是在与Windows 7和RAM是去安排所有这些工具的方方3,然后开始观看每一个怎样的反应,因为我增加,减少了对系统的工作量。

To see all three memory-monitoring tools at work, 要看到这3个内存在工作的监测工具,
be sure to step through the screen shot gallery I created here: 一定要加强 , 通过屏幕快照画廊我创建的位置:
How to measure Windows 7 memory usage . 如何测量视窗7的内存使用。

Here are the three tools I used:下面是三个工具我使用:

Task Manager You can open Task Manager by pressing Ctrl+Shift+Esc (or press Ctrl+Alt+Delete, then click Start Task Manager).您可以通过按Ctrl + Shift + Esc键(或按Ctrl + Alt +删除任务管理器任务管理器,然后单击启动任务管理器)。 For someone who learned how to read memory usage in Windows XP, the Performance tab will be familiar, but the data is presented very differently.对于有人谁知道如何读取内存在Windows XP中,在性能选项卡将是熟悉的,但数据的使用提出非常不同。 The most important values to look at are under the Physical Memory heading, where Total tells you how much physical memory is installed (minus any memory in use by the BIOS or devices) and Available tells you how much memory you can immediately use for a new process.最重要的价值看标题下的物理内存,在总告诉你多少物理内存是安装在使用(减去任何内存的BIOS或设备)和可告诉你多少内存,你可以立即使用新的过程。

Performance Monitor This is the old-school Windows geek's favorite tool. 性能监视器 ,这是老派的Windows怪胎最喜欢的工具。 (One big advantage it has over the others is that you can save To run it, click start, type perfmon , and press Enter. To use it, you must create a custom layout by adding “counters” that track resource usage over time. The number of available counters, broken into more than 100 separate categories, is enormous; in Windows 7 you can choose from more than 35 counters under the Memory heading alone, measuring things like Transition Pages RePurposed/sec. For this exercise, I configured Perfmon to show Committed Bytes and Available Bytes. The latter is the same as the Available figure in Task Manager. I'll discuss Committed Bytes in more detail later. (一大优势,它比其他的是,你可以保存要运行它,单击开始, 键入perfmon,然后按Enter。要使用它,你必须创建在“自定义布局计数器”经过一段时间的跟踪资源使用情况。可用的柜位,为100多个不同类别的破碎,是巨大的,在Windows 7中,您可以选择来自超过35个柜台单独的标题下,记忆,象衡量过渡页另作它用/秒。对于本练习,我的事情配置性能监视器显示所犯字节和可用字节。后者是在可用的任务管理器中列出的相同。所犯字节我将在稍后更详细地讨论。

Resource Monitor The easy way to open this tool is by clicking the button at the bottom of the Performance tab in Task Manager. 资源监视器最简单的办法是打开通过点击在任务管理器性能选项卡底部的按钮,这个工具。 Resource Manager was introduced in Windows Vista, but it has been completely overhauled for Windows 7 and displays an impressive amount of data, drawn from the exact same counters as Perfmon without requiring you to customize anything.资源管理器在Windows Vista中引入,但它已经完全适用于Windows 7检修和显示的数据令人印象深刻的量,引起了完全相同的,而不需要您自定义任何Perfmon计数器。 The Memory tab shows how your memory is being used, with detailed information for each process and a colorful Physical Memory bar graph to show exactly what's happening with your memory.内存选项卡显示您正在使用的内存的详细资料,为每个进程和丰富多彩的物理内存条形图,显示正是与你的记忆情况。 I believe this is by far the best tool for understanding at a glance where your memory is being used.我相信这是迄今为止最好的工具的理解是在您的记忆正在使用一目了然。

You can go through the entire gallery to see exactly how each tool works.您可以通过整个画廊,看看每个工具到底是如何工作。 I ran these tests on a local virtual machine, using 1 GB of RAM as a worst-case scenario.我跑在本地虚拟机这些测试的,以最坏的情况下1 GB的RAM。 If you have more RAM than that, the basic principles will be the same, but you'll probably see more Available memory under normal usage scenarios.如果您有比内存,基本原则将是相同的,但你可能会看到更多的可在正常使用情况下的内存。 As you'll see in the gallery, I went from an idle system to one running a dozen or so processes, then added in some intensive file operations, a software installation, and some brand-new processes before shutting everything down and going back to an idle system.正如您将看到在旁听席上,我从一个空闲的系统到一个运行中的10多个进程,然后加入一些密集的文件操作,安装一个软件,和一些品牌关机前都记录下来,并可以追溯到新工艺一个空闲的系统。

Even on a system with only 1 GB of RAM, I found it difficult to exhaust all physical memory.即使在同一个系统只有1 GB的RAM,我发现很难用尽所有的物理内存。 At one point I had 13 browser tabs open, including one playing a long Flash video clip); at the same time I had opened a 1000-page PDF file in Acrobat Reader and a 30-page graphically intense document in Word 2010, plus Outlook 2010 downloading mail from my Exchange account, a few open Explorer windows, and a handful of background utilities running.有一点我有13个浏览器标签打开,其中一个很长的闪存播放视频剪辑),同时我开了1000页的Acrobat Reader开启PDF格式文件和一个图形密集型30页在Word 2010文档,以及展望2010下载邮件从我的Exchange帐户,一些浏览器窗口打开,以及少数后台运行的工具。 And, of course, three memory monitoring tools. ,当然,3个内存监视工具。 Even with that workload, I still had roughly 10% of physical RAM available.即使是工作,我仍然有大约10%的物理内存可用。

So why do people get confused over memory usage?那么,为什么人们弄糊涂了内存使用情况? One of the biggest sources of confusion, in my experience, is the whole concept of virtual memory compared to physical memory.混乱的一个最大的来源,我的经验,是整个虚拟内存的概念比物理内存。 Windows organizes memory, physical and virtual, into pages .视窗组织成网页的内存,物理和虚拟。 Each page is a fixed size (typically 4 KB on a Windows system).每一页是一个固定的大小在Windows系统上(通常是4 KB的)。 To make things more confusing, there's also a page file (sometimes referred to as a paging file) .为了使事情更加混乱,但也是一个页面文件 (有时被称为分页文件)。 Many Windows users still think of this as a swap file, a bit of disk storage that is only called into play when you absolutely run out of physical RAM.许多Windows用户仍然认为这是一个交换文件,磁盘存储,只有发挥绝对时调用运行的物理内存出位。 In modern versions of Windows, that is no longer the case.在现代版本的Windows,这已不再是如此。 The most important thing to realize is that physical memory and the page file added together equal the commit limit , which is the total amount of virtual memory that all processes can reserve and commit.最重要的是要意识到的是,物理内存和页面文件加起来等于犯下的限制,这是虚拟内存总量各项程序可以保留和提交。 You can learn more about virtual memory and page files by reading Mark Russinovich's excellent article Pushing the Limits of Windows: Virtual Memory .您可以通过阅读马克表示的优秀文章推进了Windows的限制:虚拟内存有关虚拟内存和页面文件的。

As I was researching this post, I found a number of articles at Microsoft.com written around the time Windows 2000 and Windows XP were released.当我正在研究这个职位,我发现在Microsoft.com若干条款前后Windows 2000和Windows XP中被释放写的。 Many of them talk about using the Committed Bytes counter in Perfmon to keep an eye on memory usage.其中许多人谈论使用所犯Bytes计数器在Perfmon不断内存使用眼睛。 (In Windows 7, you can still do that, as I've done in the gallery here.) The trouble is, Committed Bytes has only the most casual relationship to actual usage of the physical memory in your PC. (在Windows 7,你仍然可以做到这一点,因为我做的画廊在这里。)麻烦的是,犯字节只有最因果关系,以在您的电脑当前使用的物理内存。 As Microsoft developer Brandon Paddock noted in his blog recently , the Committed Bytes counter represents:微软开发布兰登围场正如在他的博客说 , 最近,该承诺Bytes计数器代表:

The total amount of virtual memory which Windows has promised could be backed by either physical memory or the page file. 虚拟内存的视窗总量可保证任何一方的物理内存或者页面文件支持。

An important word there is “could.” Windows establishes a “commit limit” based on your available physical memory and page file size(s).  When a section of virtual memory is marked as “commit” – Windows counts it against that commit limit regardless of whether it's actually being used .一个重要的词有“可以。”视窗成立新的“实施限制”在您的可用物理内存和页面文件距(s)。当一个虚拟内存部分标记为“承诺”为基础 - 视窗犯有危害,限制它计数无论是实际使用。

On a typical Windows 7 system, the amount of memory represented by the Committed Bytes counter is often well in excess of the actual installed RAM, but that shouldn't have an effect on performance.在一个典型的Windows 7系统,其代表的承诺Bytes计数器往往是远在当前安装的RAM内存量过剩,但应该不会对性能的影响。 In the scenarios I demonstrate here, with roughly 1 GB of physical RAM available, the Committed Bytes counter never dropped below about 650 MB, even though physical RAM in use was as low as 283 MB at one point.情景我在这里展示,大约有1 GB的可用的物理RAM的承诺Bytes计数器从未低于650 MB的下降,即使在使用的物理内存高达283 MB的最低点1分。 And ironically, on the one occasion when Windows legitimately used almost all available physical RAM, using a little more than 950 MB of the 1023 MB available, the Committed Bytes counter remained at only 832 MB.讽刺的是,上一次当Windows合法使用的几乎所有可用的物理内存,使用了1023 MB可用950多MB,则承诺Bytes计数器仅维持在832 MB的。

So why is watching Committed Bytes important?那么,为什么在看所犯字节重要? You want to make sure that the amount of committed bytes never exceeds the commit limit.你想确保已承诺的字节数不会超过限制的承诺。 If that happens regularly, you need either a bigger page file, more physical memory, or both.如果发生这种情况,定期,或者你需要一个更大的页面文件,更多的物理内存,或两者兼而有之。

Watching the color-coded Physical Memory bar graph on the Memory tab of Resource Monitor is by far the best way to see exactly what Windows 7 is up to at any given time.看颜色,对资源监视内存的标签编码的条形图物理内存是目前的最佳途径,以便准确了解的Windows 7达到在任何特定时间。 Here, from left to right, is what you'll see:在这里,从左至右,就是你会看到:

Hardware Reserved (gray) This is physical memory that is set aside by the BIOS and other hardware drivers (especially graphics adapters). 五金版权所有(灰色)这是物理内存则是由BIOS和其他硬件驱动程序(尤其是图形适配器)一边。 This memory cannot be used for processes or system functions.该内存不能用于过程或系统的功能。

In Use (green) The memory shown here is in active use by the Windows kernel, by running processes, or by device drivers. 在使用(绿色)此处是由Windows内核积极利用正在运行的进程,或由设备驱动程序,内存。 This is the number that matters above all others.这是上述数字的所有其他问题。 If you consistently find this green bar filling the entire length of the graph, you're trying to push your physical RAM beyond its capacity.如果您觉得这绿色条坚持填充图的整个长度,你试图把你的能力超出物理RAM。

Modified (orange) This represents pages of memory that can be used by other programs but would have to be written to the page file before they can be reused. 修改(橙色)这代表了内存,可用于其他程序,但将被写入到页面文件之前,可以重复使用的网页。

Standby (blue) Windows 7 tries as hard as it can to keep this cache of memory as full as possible. 待机(蓝色)的Windows 7尝试最大努力,因为它可以使这样的记忆缓存尽可能全面。 In XP and earlier, the Standby list was basically a dumb first-in, first-out cache.在XP和更早,待命名单基本上是一个愚蠢的先入先出缓存。 Beginning with Windows Vista and continuing with Windows 7, the memory manager is much smarter about the Standby list, prioritizing every page on a scale of 0 to 7 and reusing low-priority pages ahead of high-priority ones.开始使用Windows Vista和Windows 7的持续,内存管理器是非常聪明对备用名单,优先从0级到7每一页和重用低优先级的网页之前,高优先级的。 (Another Russinovich article, Inside the Windows Vista Kernel: Part 2 , explains this well. Look for the “Memory Priorities” section.) If you start a new process that needs memory, the lowest-priority pages on this list are discarded and made available to the new process. (另一篇文章Russinovich是内部的Windows Vista内核:第2,解释了这一点。为“记忆的优先事项”部分查询。)如果您启动一个新的过程,需要记忆,在这个名单的最低优先级的页面并丢弃提供给新的进程。

Free (light blue) As you'll see if you step through the entire gallery, Windows tries its very best to avoid leaving any memory at all free. 免费(浅蓝色如您所见,如果您在整个画廊步骤),Windows会竭尽所能,以避免留下任何内存都是免费的。 If you find yourself with a big enough chunk of memory here, you can bet that Windows will do its best to fill itby copying data from the disk and adding the new pages to the Standby list, based primarily on its SuperFetch measurements.如果您发现有足够大的内存块自己在这里,你可以打赌,Windows将尽最大努力填补磁盘itby复制数据并添加新的页面待命名单,根据其SuperFetch的主要测量。 As Russinovich notes, this is done at a rate of a few pages per second with Very Low priority I/Os, so it shouldn't interfere with performance.正如Russinovich是指出,这样做是在每秒1非常低优先级的I / O几页率,因此它不应干预的性能。

In short, Windows 7 (unlike XP and earlier Windows versions) goes by the philosophy that empty RAM is wasted RAM and tries to keep it as full as possible, without impacting performance.总之,视窗7(与Windows XP和更早版本)去的空RAM是浪费RAM和试图保持它的哲学尽可能全面地,而不影响性能。

Questions?问题? Comments?评论? Leave them in the Talkback section and I'll answer them in a follow-up post or two.留在他们的对讲部分,我将回答一个后续职位或两它们。

Ed Bott is an award-winning technology writer with more than two decades' experience writing for mainstream media outlets and online publications.埃德博特是屡获殊荣超过二十年的主流媒体和网上出版物的经验编写的技术作家。 See his full profile and disclosure of his industry affiliations.见他的完整的个人资料和他的行业背景披露 。

Email Ed Bott 电子邮件埃德博特

Subscribe to Ed Bott's Microsoft Report via Email alerts or RSS .订阅通过电子邮件向埃德博特的Microsoft报告警告或的RSS。

[培训]《安卓高级研修班(网课)》月薪三万计划,掌握调试、分析还原ollvm、vmp的方法,定制art虚拟机自动化脱壳的方法

收藏
免费 0
支持
分享
最新回复 (3)
雪    币: 155
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
2
楼主的翻译大概意思是有了

还需要多多修炼啊
一是对咱母语的掌握,就是把拗口的东西怎么给它说顺溜了
二是对英语的语法好像还需加强,想说顺溜是建筑在正确理解的基础上的
2010-2-28 06:46
0
雪    币: 296
活跃值: (71)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
3
怎么看都是机翻的
2010-2-28 07:22
0
雪    币: 155
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
4
可能性之一吧

不过你也不用撞墙嘛
2010-2-28 07:26
0
游客
登录 | 注册 方可回帖
返回
//