igbinary PHP extension cuts Redis memory use by up to 68% with one config change
igbinary is a PHP extension that replaces PHP's default text-based serialization with a compact binary format, requiring just a single configuration line and no code changes. Benchmarks on a Laravel app using PHP 8.4, phpredis 6.3, and Redis 7 showed memory savings of 47–68% depending on payload size. While igbinary's deserialization was marginally slower on small, unique data like session payloads due to a fixed per-call setup cost, it was up to 94% faster on larger, repetitive data structures thanks to string deduplication. End-to-end Redis round-trip tests showed net speed gains of around 5–6% even for session data, as smaller payloads reduce bytes transferred and stored. JSON serialization performed worse than igbinary in both size and decode speed across all tested payloads.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in