楼主: jacob2007
收起左侧

[讨论] 私以为所有内存清理工具都没用。求有理反驳

  [复制链接]
旷月108
发表于 2015-1-8 21:00:47 | 显示全部楼层
yfdyh000
发表于 2015-1-8 21:07:41 | 显示全部楼层
jacob2007 发表于 2015-1-8 20:42
只有。。。数据库之类的应用会这么来写吧。但这样预分配内存的作用也是和这些软件的使用场景相对应的。
...

内存清理工具都是调用的系统API,SetProcessWorkingSetSize与EmptyWorkingSet。应用软件使用的都是系统分配的虚拟内存,而具体这个内存页位于RAM还是页面文件是由系统管理和决定的,对于应用程序透明,不会引发错误,只会引发很多Page fault(硬错误/换页错误/缺页错误。其实就是内存交换,将页从页面文件交换到RAM)引发I/O增高和性能下降。
如36楼所说,网游等不少游戏软件就有这个问题,预读很多东西用满RAM,真正需要时又要等待它压到页面文件,还不如提前压一下。
剑圣TORRES
发表于 2015-1-8 22:56:17 来自手机 | 显示全部楼层
玩大型单机游戏这个效果比较明显……
jacob2007
 楼主| 发表于 2015-1-9 09:06:44 | 显示全部楼层
   好吧,除了玩游戏,不管是网友还是单机以外,,,这个功能还有意义么?
jacob2007
 楼主| 发表于 2015-1-9 09:42:20 | 显示全部楼层
本帖最后由 jacob2007 于 2015-1-9 09:45 编辑

感谢“旷月108”提供的连接,我大概看了下:

Many companies want to sell you “memory optimizers,” often as part of “PC optimization” programs. These programs are worse than useless — not only will they not speed up your computer, they’ll slow it down.
许多公司会向你推销内存优化器软件。而这些程序却只能起到反作用——会让你的电脑更慢

Such programs take advantage of inexperienced users, making false promises about boosting performance. In reality, your computer knows how to manage RAM on its own. It will use RAM to increase your computer’s performance — there’s no point in having RAM sit empty.

Is Your Computer’s RAM Filling Up? That’s Good!
你电脑的内存快满了?这是一件好事

Memory optimizers are based on a misunderstanding. You may look at your computer’s RAM and see it filling up — for example, you may have 4 GB of RAM and see that 3 GB is full with only 1 GB to spare. That can be surprising to some people — look how bloated modern versions of Windows are! How are you ever going to run additional programs with so little memory available?

In reality, modern operating systems are pretty good at managing memory on their own. That 3 GB of used RAM doesn’t necessarily indicate waste. Instead, your computer uses your RAM to cache data for faster access. Whether it’s copies of web pages you had open in your browser, applications you previously opened, or any other type of data you might need again soon, your computer hangs onto it in its RAM. When you need the data again, your computer doesn’t have to hit your hard drive — it can just load the files from RAM.

Crucially, there’s no point in having RAM empty. Even if your RAM is completely full and your computer needs more of it to run an application, your computer can instantly discard the cached data from your RAM and use that space for the application. There’s no point in having RAM sit empty — if it’s empty, it’s being wasted. If it’s full, there’s a good chance it can help speed up program loading times and anything else that would use your computer’s hard drive.

Notice that very little RAM is actually “free” in the screenshot below. The RAM is being used as a cache, but it’s still marked as available for any program that needs to use it.

In the past, full RAM did indicate a problem. If you were running Windows Vista on a computer with half a gig of RAM, you could feel the computer constantly slowing down — it had to constantly read and write to the hard drive, using the hard drive’s page file as an inefficient replacement for RAM. However,  modern computers generally have enough RAM for most users. Even low-end computers generally ship with 4GB of RAM, which should be more than enough unless you’re doing intensive gaming, running multiple virtual machines, or editing videos.

Even if RAM was a problem for you, there’s no reason to use a memory optimizer. Memory optimizers are snake oil that are useless at best and harmful at worst.
即使使用时有内存(不足)的问题,也没有理由使用内存优化软件。内存优化软件是无用+有害的。


How Memory Optimizers Work

When you use a memory optimizer, you’ll see your computer’s RAM usage go down. This may seem like an easy win — you’ve decreased RAM usage just be pressing a button, after all. But it’s not that simple.

Memory optimizers actually work in one of two ways:
•They call the EmptyWorkingSet Windows API function, forcing running applications to write their working memory to the Windows page file.
•They quickly allocate a large amount of memory to themselves, forcing Windows to discard cached data and write application data to the page file. They then deallocate the memory, leaving it empty.

Both of these tricks will indeed free up RAM, making it empty. However, all this does is slow things down — now the applications you use will have to get the data they need from the page file, reading from the hard drive and taking longer to work. Any memory being used for cache may be discarded, so Windows will have to get the data it needs from the hard drive.

In other words, these programs free up fast memory by forcing data you need onto slower memory, where it will have to be moved back to fast memory again. This makes no sense! All it accomplishes is selling you another system optimization program you don’t need.
换句话说,这些程序强制转移了缓存数据到慢速存储设备中,而这些数据将会在需要时再次被加载到快速(物理)内存。这没有任何意义。。。
jacob2007
 楼主| 发表于 2015-1-9 09:42:49 | 显示全部楼层
旷月108 发表于 2015-1-8 21:00
我就留个链接不说话

TKS。。。
jacob2007
 楼主| 发表于 2015-1-9 19:26:47 | 显示全部楼层
剑圣TORRES 发表于 2015-1-8 22:56
玩大型单机游戏这个效果比较明显……

求详细案例
剑圣TORRES
发表于 2015-1-10 12:14:28 来自手机 | 显示全部楼层
jacob2007 发表于 2015-1-9 19:26
求详细案例

恶灵附身,如果不清理那读条啊,而且硬盘灯啊!常亮!一清理,快了一点点,最重要硬盘灯不是常亮。
jacob2007
 楼主| 发表于 2015-1-10 13:09:49 | 显示全部楼层
剑圣TORRES 发表于 2015-1-10 12:14
恶灵附身,如果不清理那读条啊,而且硬盘灯啊!常亮!一清理,快了一点点,最重要硬盘灯不是常亮。

这么说还是娱乐功能哇...  关电脑硬盘灯就不亮了
jacob2007
 楼主| 发表于 2015-1-11 16:04:54 | 显示全部楼层
。。。。。。。没反馈的就出结论了
您需要登录后才可以回帖 登录 | 快速注册

本版积分规则

手机版|杀毒软件|软件论坛| 卡饭论坛

Copyright © KaFan  KaFan.cn All Rights Reserved.

Powered by Discuz! X3.4( 沪ICP备2020031077号-2 ) GMT+8, 2024-11-25 23:00 , Processed in 0.088097 second(s), 14 queries .

卡饭网所发布的一切软件、样本、工具、文章等仅限用于学习和研究,不得将上述内容用于商业或者其他非法用途,否则产生的一切后果自负,本站信息来自网络,版权争议问题与本站无关,您必须在下载后的24小时之内从您的电脑中彻底删除上述信息,如有问题请通过邮件与我们联系。

快速回复 客服 返回顶部 返回列表