- Issue created by @zoltanb
- 🇩🇪Germany mkalkbrenner 🇩🇪
We run PHP 8.1. We switched a file based cache from serialize to igbinary and the file size was reduced by aprox. 90%. So this was a massive improvement.
Hi
What performance results do you have after using igbinary with Drupal?
https://github.com/igbinary/igbinary
Igbinary is a drop in replacement for the standard php serializer. Instead of the time and space consuming textual representation used by PHP's serialize, igbinary stores php data structures in a compact binary form. Memory savings are significant when using memcached, APCu, or similar memory based storages for serialized data. The typical reduction in storage requirements are around 50%. The exact percentage depends on your data.
https://github.com/igbinary/igbinary/blob/master/benchmark/comparisons.php
https://speakerdeck.com/mamoot/drupal-and-php-performances?slide=14
We tried it on several sites and we didn't see any real improvement.
Details:
The sites have 100-400k nodes, all cached into Redis, Redis memory usage is between 500 MB - 4 GB. We switched the serializer for Redis, like here https://speakerdeck.com/mamoot/drupal-and-php-performances?slide=15
PHP: 8.1
igbinary version: 3.2.13
igbinary.compact_strings On On
Results
Of course the serialization depends on the respective data, but probably a high number of Drupal sites are for content (lot of nodes with long full HTML content) and might not see a benefit after using igbinary.
Maybe other people can also share their results, maybe the mentioned comparison in articles was true for PHP 7.X, but it might not have the same benefits compared to the latest PHP version.
Active
2.0
Miscellaneous
We run PHP 8.1. We switched a file based cache from serialize to igbinary and the file size was reduced by aprox. 90%. So this was a massive improvement.