但我需要更多缓存…

但我需要更多缓存…

Neil Cameron          

       这个话题是我永恒的最爱。行内有些RAID厂商总是宣称他们的控制卡比其他家的缓存更多,所以更好;也有若干系统开发商坚决相信更多缓存真的就意味着更高的性能。不过当然了,我讲的是控制器上的缓存,而不是SSD缓存(虽然这也不无影响)。

       话说回来,对旋转介质而言,缓存确实很重要。开启写缓存能够戏剧性地改善写速度,因为操作系统就无需再等着往硬盘写数据了——数据可以放在控制器上的缓存中,以后再丢到硬盘上……因此基于超级电容的缓存保护技术变得很重要,因为数据在等待被写入到硬盘的期间是在DRAM的缓存中存放着。

       但是,事关SSD又会如何呢?

       如果用PMC的控制卡连接成一个SSD阵列,控制器会提醒你“关掉缓存”(对读写两种操作均是如此)。这样做真的有意义么——说到底,为什么不用缓存呢?

       我因而去找我们公司产品营销部门去问个究竟——得到的回复是经典的市场部的腔调(恕不详述)。看起来,有些情形下,缓存是有用的,此时启动缓存的性能会更好。但大多数配置都属于第二类——对多数数据种类及配置而言,在全SSD的环境下,不启动缓存的性能反而会更好。

       在极其少有的情形下——主要是当涉及到大量非常非常小尺寸的读操作时,启动缓存才会有所帮助。那么,现在问题来了……如何才能确定是否启动缓存呢?我们作为解决方案供应商,实在无法完全确定针对特定系统的最佳配置——需要的其实是在实际应用中进行测试。一旦阵列组好后,再将缓存开启或关闭都非常便捷,所以这个问题并不严重——客户只需要进行实际情况下的测试,即可晓得最理想的配置方案。

       注意到我特别强调了“实际情况下的测试”?虽然我经常使用IO测试软件,也乐此不疲地创造出了种种匪夷所思的负载——但这些负载几乎完全不能代表现实生活中运行在服务器上的真实负载。

      因此,如果你的系统环境是全闪存,就先让缓存关着,然后再将之开启,进行若干测试。我非常希望能听到在实际应用中的任何情形下,启动缓存能改善性能的例子。

 

But I need more cache …

      This one is a perennial favourite of mine. There are certain RAID vendors around the place who promote the fact that their card has more cache than anyone else’s, and there are a multitude of system developers who believe that more cache equals more performance. Of course I’m talking here about the cache on the controller, not SSD caching etc (though that comes into play).

       Now in the case of spinning media, cache is important. Having write cache turned on can speed up the writes dramatically because the OS doesn’t have to wait for the drives to write the data – instead it gets put in the cache on the controller and dumped to the drives at a later date … now the importance of cache protection in the form of supercap technology at this point because of the data sitting in DRAM whileit’s waiting to go to the drives.

      But what about when we getto SSDs?

     When you make an array from pure SSD on ourcards, the controller will prompt you to “turn off the cache” (both read and write). Doesn’t make sense really – after all why not use the cache?

      So I asked this question of my product marketing team – and got back a marketing response (I’ll leave it at that). Seems there are situations where cache works, and where having the cache turned works better. The vast majority of installations fall into the second category here – most data types and installations works best in pure SSD environments without the cache turned on.

      In a very small number of cases – mostly where there are a large number of very, very small writes, having cache turned on will help. So the question arises … how to determine? There is no way from our side of the fence to tell what will work best for your system – it’s simply a matter of testing in real world. Since it’s easy to turn the cache on or off on the array after it has been made this is no great issue – it just requires some real-world testing by the customer to see what works best for them.

      Notice that I said “real-world testing”?While I’m a big user of iometer, and love to be able to generate all sorts of crazy workloads – they are almost never representative of the real world workload of a server.

      So if you are using pure SSD environments leave the cache off, then do some testing by turning it on. Would love to get some feedback from the real world regarding any scenarios that actually benefit from turning the cache on.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值