igbinary在序列化和反序列化的效率要比Php自带的高

1.下载安装包

https://launchpad.net/ubuntu/+source/php-igbinary/3.0.0-1

wget https://launchpad.net/ubuntu/+archive/primary/+sourcefiles/php-igbinary/3.0.0-1/php-igbinary_3.0.0.orig.tar.gz
2、安装扩展

phpize
./configure CFLAGS="-O2 -g" --with-php-config=/www/server/php/72/bin/php-config --enable-igbinary
make
make install
3.配置
修改php.ini,添加

# Load igbinary extension
extension=__PATH__/igbinary.so
# Use igbinary as session serializer
session.serialize_handler=igbinary
4.测试phpinfo()