Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1362340
  • 博文数量: 343
  • 博客积分: 13098
  • 博客等级: 上将
  • 技术积分: 2862
  • 用 户 组: 普通用户
  • 注册时间: 2005-07-06 00:35
文章存档

2012年(131)

2011年(31)

2010年(53)

2009年(23)

2008年(62)

2007年(2)

2006年(36)

2005年(5)

分类:

2012-09-25 01:19:18

Zram creates a block device backed by compressed ram. You can use that block device for swap. Normally memory pressure first results in the cache being discarded, and only after most of the cache has been freed up and memory is still tight does the system start swapping.

CleanCache allows pages from the page cache to be migrated to a back end, such as xen tmem, which is memory managed by the hypervisor and shared between multiple VM guests. The goal of this is to allow multiple VM guests caching the same data to do so using the same ram, instead of each having their own cache with their own copy of the same data.

ZCache is another CleanCache back end. Instead of passing the memory to the hypervisor to hold ( which only applies if you are using a Xen VM environment ), it stores the cache pages compressed in ram, similar to Zram. The difference is that ZCache transparently stores cache pages, but Zram creates a block device that you can use for swap.

If you have memory hungry applications, then you will need swap space to support them, so you will still want to use zram ( likely with a very high swappiness value ). This is because CleanCache only compresses cache pages; application memory has to be sent to swap. If you aren't using all of your memory on applications, then you can use CleanCache with the ZCache backend to make more effective use of the remaining memory for disk caching by compressing the disk cache. You might even use a mix of the two techniques.

阅读(789) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~