简体   繁体   English

热键内存缓存问题

[英]Problems with hot key memcached

I have memcached keys that are as large as 2 MB and I can't reduce it, as the data has been already minified. 我有2 MB的Memcached键,由于数据已经缩小,我无法减少它。 It does go hot with many web servers accessing that key again and again. 许多Web服务器一次又一次地访问该密钥时,它的确很热。 Is APC or shared memory a better solution? APC或共享内存是更好的解决方案吗?

Especially over slow network connections memcached could be significantly slower than local caches. 尤其是在网络连接速度慢的情况下,memcached的速度可能会比本地缓存慢得多。 Local caches can be significantly faster because they avoid the network delay and protocol overhead. 本地缓存可以显着提高速度,因为它们避免了网络延迟和协议开销。

APC and shared memory have often quite small size limits so make sure you configure it in a right way. APC和共享内存的大小限制通常很小,因此请确保以正确的方式进行配置。

Another alternative for bigger items might be local files. 较大项目的另一种选择是本地文件。 If they are used quite often the operating system will keep them in memory and there won't be any disk access. 如果经常使用它们,则操作系统会将它们保留在内存中,并且不会有任何磁盘访问。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM