如何更改替代 PHP 缓存 (APC) 中的锁定机制?
我最近在 Scribd 上的一个演示中读到,Facebook 对 APC 的各种锁定机制进行了基准测试,包括文件锁(默认)、IPC 信号量锁、linux Futex 锁、pthread 互斥锁和自旋锁。您可以通过单击以下链接查看此演示文稿: APC@Facebook
我想知道是否有人知道这些源代码是否已经发布,也许在 git 或 SVN 存储库中的某个地方?从默认文件锁定切换到其他选择之一的速度优势似乎非常显着。
I recently read in a presentation on Scribd that Facebook had benchmarked a variety of locking mechanisms for APC including file locks (default), IPC semaphore locks, linux Futex locks, pthread mutex locks, and spin locks. You can view this presentation by clicking the following link: APC@Facebook
I was wondering if anybody knew off hand if any of this source code had been released, perhaps in a git or SVN repository somewhere? The speed benefits of switching from the default file locking to one of the other choices appears to be significant.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
是的,它们包含在 http://pecl.php.net/package/APC。
请注意,您必须在编译时选择此选项,更准确地说:在 ./configure 时。以下是./configure的相关选项:
如您所见,pthread互斥锁现在已经是默认值。
Yes, they are included in source code available at http://pecl.php.net/package/APC.
Note that you have to choose this at compilation time, more precisely: at ./configure time. Here are the relevant options of ./configure:
As you see, pthread mutex locking is already the default now.
然后设置:
或
等等。
then set:
or
etc.