-
Notifications
You must be signed in to change notification settings - Fork 10
Run benchmarks against APCu and Relay\Table #186
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
base: main
Are you sure you want to change the base?
Conversation
tillkruss
left a comment
There was a problem hiding this 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.
tillkruss
left a comment
There was a problem hiding this 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; |
There was a problem hiding this comment.
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.
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 |
+------------+--------+---------+---------+---------+-------------+--------+--------+--------+ |
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 |
8518057 to
4f788c2
Compare
|
@tillkruss with 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 |
+------------+--------+---------+---------+-------+-------------+--------+--------+--------+ |
See https://github.com/cachewerk/relay-core/issues/1202