Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

特性咨询 #2

Open
gouchaoer opened this issue Jan 10, 2017 · 5 comments
Open

特性咨询 #2

gouchaoer opened this issue Jan 10, 2017 · 5 comments

Comments

@gouchaoer
Copy link

1,基于共享内存的缓存目前已经有鸟哥的yac和apcu,实际上稳定性都存在一些问题,这个库和yac/apcu有何区别呢,benchmark可否和yac/apcu进行比较?

2,扩展对于windows是否支持,zts/nts版本是都支持么?

@happyfish100
Copy link
Owner

  1. 稳定性应该还可以吧,我们公司内部项目很快会使用。
    贴下最近刚整理的几点特性:
    1) 支持非亲缘关系进程(即非父子进程)间共享cache;
    2) 因写是加锁的,多进程并发写时,数据不会出现错乱现象;
    3) 提供了配套工具,可以查看cache状态,依此可以计算cache命中率等等;
    4) 精心设计内部数据结构和锁机制,性能卓越。
    我可以抽空和apcu做下性能对比。
  2. libshmcache仅支持Linux和FreeBSD等Unix系统,不支持windows。

@breath-co2
Copy link

breath-co2 commented Jan 11, 2017

@happyfish100 我开发的一个统计系统正需要这样的功能,见 https://github.com/xindong/easy-total , 不过我Mac系统好像装不上(系统10.12.1),顺便帖下错误。

在 libfastcommon 里./make.sh 报错:

./make.sh: line 103: src/_os_define.h: Permission denied
cp: Makefile: Permission denied
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -DDARWIN -c -o shared_func.o shared_func.c
shared_func.c:1353:18: error: use of undeclared identifier 'RLIMIT_MSGQUEUE'
            case RLIMIT_MSGQUEUE:
                 ^
1 error generated.
make: *** [shared_func.o] Error 1
mkdir -p /usr/lib64
mkdir: /usr/lib64: Operation not permitted
make: *** [install] Error 1

sudo ./make.sh 安装报错:

cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -DDARWIN -c -o hash.o hash.c
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -DDARWIN -c -o chain.o chain.c
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -DDARWIN -c -o shared_func.o shared_func.c
shared_func.c:1353:18: error: use of undeclared identifier 'RLIMIT_MSGQUEUE'
            case RLIMIT_MSGQUEUE:
                 ^
1 error generated.
make: *** [shared_func.o] Error 1

@happyfish100
Copy link
Owner

昨天和apcu做了一下benchmark对比测试,发现二者性能相当。看来apcu性能也还不错呢。
注:单进程读写压力测试,没有做并发压力测试。

@happyfish100
Copy link
Owner

happyfish100 commented Jan 12, 2017

感谢反馈,我已经修复了这个问题。

@zhwentao
Copy link

zhwentao commented Mar 7, 2017

@happyfish100 如果共享内存被ipcrm掉,有没有什么方法可以在未释放共享内存的进程里知道是否被rm?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants