Skip to content

Conversation

@yatsukhnenko
Copy link
Contributor

See https://github.com/cachewerk/relay-core/issues/1202

php run --warmup 0 --workers 1 --filter RelayTable\|APCu BenchmarkGet.php 
Setting up on AMD Ryzen 7 4700U with Radeon Graphics (8 cores/8 threads x86_64)
Using PHP 8.3.27 (OPcache: Off, Xdebug: Off, New Relic: Off)
Connected to Redis (8.2.2) at tcp://127.0.0.1:6379


 GET  Executing 5 iterations (0 warmup) for 1.00s seconds

+------------+--------+---------+---------+--------+-------------+--------+--------+--------+
| Client     | Memory | Network | Workers | IOPS   | IOPS/Worker | rstdev | Change | Factor |
+------------+--------+---------+---------+--------+-------------+--------+--------+--------+
| APCu       | 1.41mb |    181b |       1 | 13.01M |      13.01M | ±0.28% |  0.00% |  1.00x |
| RelayTable | 1.41mb |    181b |       1 | 21.01M |      21.01M | ±1.80% | 61.49% |  1.61x |
+------------+--------+---------+---------+--------+-------------+--------+--------+--------+

Copy link
Member

@tillkruss tillkruss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yatsukhnenko can we move this into a dedicated case/scenario, feels wrong to merge this with GET.

Copy link
Member

@tillkruss tillkruss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tests and linters are failing.

{
public static function flags(): int
{
return self::STRING | self::READ | self::DEFAULT;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's NOT run these by default.

But add a README entry on how to run them.

@yatsukhnenko
Copy link
Contributor Author

pyatsukhnenko@localhost~/code/cachewerk/relay/benchmarks (feature/apcu-vs-table)$ php run --warmup 0 --workers 1 --filter RelayTable\|APCu BenchmarkInMemoryGet.php
Setting up on AMD Ryzen AI 9 HX 370 w/ Radeon 890M (12 cores/24 threads x86_64)
Using PHP 8.4.16 (OPcache: Off, Xdebug: Off, New Relic: Off)
Connected to Redis (8.2.2) at tcp://127.0.0.1:6379


 InMemoryGet  Executing 5 iterations (0 warmup) for 1.00s seconds

+------------+--------+---------+---------+---------+-------------+--------+--------+--------+
| Client     | Memory | Network | Workers | IOPS    | IOPS/Worker | rstdev | Change | Factor |
+------------+--------+---------+---------+---------+-------------+--------+--------+--------+
| APCu       | 1.76mb |    181b |       1 | 470.33K |     470.33K | ±0.15% |  0.00% |  1.00x |
| RelayTable | 1.76mb |    181b |       1 | 521.32K |     521.32K | ±2.81% | 10.84% |  1.11x |
+------------+--------+---------+---------+---------+-------------+--------+--------+--------+

@yatsukhnenko
Copy link
Contributor Author

pyatsukhnenko@localhost~/code/cachewerk/relay/benchmarks (feature/apcu-vs-table)$ php run --warmup 0 --workers 12 --filter RelayTable\|APCu BenchmarkInMemoryGet.php
Setting up on AMD Ryzen AI 9 HX 370 w/ Radeon 890M (12 cores/24 threads x86_64)
Using PHP 8.4.16 (OPcache: Off, Xdebug: Off, New Relic: Off)
Connected to Redis (8.2.2) at tcp://127.0.0.1:6379


 InMemoryGet  Executing 2 iterations (0 warmup) for 1.00s seconds

PHP Warning:  zend_signal: shutdown with non-zero blocking depth (1) in Unknown on line 0
PHP Warning:  zend_signal: shutdown with non-zero blocking depth (1) in Unknown on line 0
PHP Warning:  zend_signal: shutdown with non-zero blocking depth (1) in Unknown on line 0
PHP Warning:  zend_signal: shutdown with non-zero blocking depth (1) in Unknown on line 0
PHP Warning:  zend_signal: shutdown with non-zero blocking depth (1) in Unknown on line 0
PHP Warning:  zend_signal: shutdown with non-zero blocking depth (1) in Unknown on line 0
PHP Warning:  zend_signal: shutdown with non-zero blocking depth (1) in Unknown on line 0
PHP Warning:  zend_signal: shutdown with non-zero blocking depth (1) in Unknown on line 0
PHP Warning:  zend_signal: shutdown with non-zero blocking depth (1) in Unknown on line 0
PHP Warning:  zend_signal: shutdown with non-zero blocking depth (1) in Unknown on line 0
PHP Warning:  zend_signal: shutdown with non-zero blocking depth (1) in Unknown on line 0
PHP Warning:  zend_signal: shutdown with non-zero blocking depth (1) in Unknown on line 0
PHP Warning:  zend_signal: shutdown with non-zero blocking depth (1) in Unknown on line 0
PHP Warning:  zend_signal: shutdown with non-zero blocking depth (1) in Unknown on line 0
PHP Warning:  zend_signal: shutdown with non-zero blocking depth (1) in Unknown on line 0
PHP Warning:  zend_signal: shutdown with non-zero blocking depth (1) in Unknown on line 0
PHP Warning:  zend_signal: shutdown with non-zero blocking depth (1) in Unknown on line 0
PHP Warning:  zend_signal: shutdown with non-zero blocking depth (1) in Unknown on line 0
PHP Warning:  zend_signal: shutdown with non-zero blocking depth (1) in Unknown on line 0
PHP Warning:  zend_signal: shutdown with non-zero blocking depth (1) in Unknown on line 0
PHP Warning:  zend_signal: shutdown with non-zero blocking depth (1) in Unknown on line 0
PHP Warning:  zend_signal: shutdown with non-zero blocking depth (1) in Unknown on line 0
PHP Warning:  zend_signal: shutdown with non-zero blocking depth (1) in Unknown on line 0
PHP Warning:  zend_signal: shutdown with non-zero blocking depth (1) in Unknown on line 0
PHP Warning:  zend_signal: shutdown with non-zero blocking depth (2) in Unknown on line 0
PHP Warning:  zend_signal: shutdown with non-zero blocking depth (2) in Unknown on line 0
PHP Warning:  zend_signal: shutdown with non-zero blocking depth (2) in Unknown on line 0
PHP Warning:  zend_signal: shutdown with non-zero blocking depth (2) in Unknown on line 0
PHP Warning:  zend_signal: shutdown with non-zero blocking depth (2) in Unknown on line 0
PHP Warning:  zend_signal: shutdown with non-zero blocking depth (2) in Unknown on line 0
PHP Warning:  zend_signal: shutdown with non-zero blocking depth (2) in Unknown on line 0
PHP Warning:  zend_signal: shutdown with non-zero blocking depth (2) in Unknown on line 0
PHP Warning:  zend_signal: shutdown with non-zero blocking depth (2) in Unknown on line 0
PHP Warning:  zend_signal: shutdown with non-zero blocking depth (2) in Unknown on line 0
PHP Warning:  zend_signal: shutdown with non-zero blocking depth (2) in Unknown on line 0
PHP Warning:  zend_signal: shutdown with non-zero blocking depth (2) in Unknown on line 0
PHP Warning:  zend_signal: shutdown with non-zero blocking depth (2) in Unknown on line 0
PHP Warning:  zend_signal: shutdown with non-zero blocking depth (2) in Unknown on line 0
PHP Warning:  zend_signal: shutdown with non-zero blocking depth (2) in Unknown on line 0
PHP Warning:  zend_signal: shutdown with non-zero blocking depth (2) in Unknown on line 0
PHP Warning:  zend_signal: shutdown with non-zero blocking depth (2) in Unknown on line 0
PHP Warning:  zend_signal: shutdown with non-zero blocking depth (2) in Unknown on line 0
PHP Warning:  zend_signal: shutdown with non-zero blocking depth (2) in Unknown on line 0
PHP Warning:  zend_signal: shutdown with non-zero blocking depth (2) in Unknown on line 0
PHP Warning:  zend_signal: shutdown with non-zero blocking depth (2) in Unknown on line 0
PHP Warning:  zend_signal: shutdown with non-zero blocking depth (2) in Unknown on line 0
PHP Warning:  zend_signal: shutdown with non-zero blocking depth (2) in Unknown on line 0
PHP Warning:  zend_signal: shutdown with non-zero blocking depth (2) in Unknown on line 0
+------------+--------+---------+---------+-------+-------------+--------+--------+--------+
| Client     | Memory | Network | Workers | IOPS  | IOPS/Worker | rstdev | Change | Factor |
+------------+--------+---------+---------+-------+-------------+--------+--------+--------+
| APCu       | 5.08mb |    33kb |      12 | 3.78M |     315.14K | ±0.18% |  0.00% |  1.00x |
| RelayTable | 5.06mb |    39kb |      12 | 4.28M |     356.91K | ±5.80% | 13.26% |  1.13x |
+------------+--------+---------+---------+-------+-------------+--------+--------+--------+
PHP Warning:  zend_signal: shutdown with non-zero blocking depth (2) in Unknown on line 0

@tillkruss tillkruss force-pushed the feature/apcu-vs-table branch from 8518057 to 4f788c2 Compare January 20, 2026 20:11
@yatsukhnenko
Copy link
Contributor Author

@tillkruss with igbinary serializer enabled for both APCu and Relay\Table benchmark results almost the same

php run --warmup 0 --workers 1 --filter RelayTable\|APCu BenchmarkInMemoryGet.php
Setting up on AMD Ryzen AI 9 HX 370 w/ Radeon 890M (12 cores/24 threads x86_64)
Using PHP 8.4.16 (OPcache: Off, Xdebug: Off, New Relic: Off)
Connected to Redis (8.2.2) at tcp://127.0.0.1:6379


 InMemoryGet  Executing 5 iterations (0 warmup) for 1.00s seconds

+------------+--------+---------+---------+---------+-------------+--------+--------+--------+
| Client     | Memory | Network | Workers | IOPS    | IOPS/Worker | rstdev | Change | Factor |
+------------+--------+---------+---------+---------+-------------+--------+--------+--------+
| RelayTable | 1.76mb |    181b |       1 | 514.90K |     514.90K | ±3.38% |  0.00% |  1.00x |
| APCu       | 1.76mb |    181b |       1 | 523.93K |     523.93K | ±0.98% |  1.75% |  1.02x |
+------------+--------+---------+---------+---------+-------------+--------+--------+--------+
php run --warmup 0 --workers 12 --filter RelayTable\|APCu BenchmarkInMemoryGet.php
Setting up on AMD Ryzen AI 9 HX 370 w/ Radeon 890M (12 cores/24 threads x86_64)
Using PHP 8.4.16 (OPcache: Off, Xdebug: Off, New Relic: Off)
Connected to Redis (8.2.2) at tcp://127.0.0.1:6379


 InMemoryGet  Executing 2 iterations (0 warmup) for 1.00s seconds
+------------+--------+---------+---------+-------+-------------+--------+--------+--------+
| Client     | Memory | Network | Workers | IOPS  | IOPS/Worker | rstdev | Change | Factor |
+------------+--------+---------+---------+-------+-------------+--------+--------+--------+
| APCu       | 5.08mb |    27kb |      12 | 4.16M |     347.00K | ±0.22% |  0.00% |  1.00x |
| RelayTable | 5.06mb |    17kb |      12 | 4.27M |     355.63K | ±4.96% |  2.49% |  1.02x |
+------------+--------+---------+---------+-------+-------------+--------+--------+--------+

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

Successfully merging this pull request may close these issues.

3 participants