lhotari commented on PR #24623: URL: https://github.com/apache/pulsar/pull/24623#issuecomment-3207584881
I fixed the test case and improved many things. I now limited the producer rate to 50000 msg/s which doesn't show large differences other than with the current default Pulsar caching ``` ❯ { cat pulsar-broker/target/rolling_restarts_result_header.txt; cat pulsar-broker/target/rolling_restarts_result_*.csv } | duckdb -c "select * from read_csv('/dev/stdin') " |cat ┌────────────────────────────────────┬──────────┬──────────┬───────────┬──────────┬─────────────────┬────────┬────────┬──────────┬─────────────────────────┐ │ description │ produced │ consumed │ consumers │ bk_reads │ bk_read_entries │ hits │ misses │ restarts │ ts │ │ varchar │ int64 │ int64 │ int64 │ int64 │ int64 │ double │ double │ int64 │ timestamp │ ├────────────────────────────────────┼──────────┼──────────┼───────────┼──────────┼─────────────────┼────────┼────────┼──────────┼─────────────────────────┤ │ cacheEvictionByMarkDeletedPosition │ 1543862 │ 15441210 │ 10 │ 384 │ 34854 │ 99.77 │ 0.23 │ 3 │ 2025-08-20 18:14:11.686 │ │ cacheEvictionByMarkDeletedPosition │ 1548990 │ 15492905 │ 10 │ 351 │ 32690 │ 99.79 │ 0.21 │ 3 │ 2025-08-20 18:14:44.988 │ │ cacheEvictionByMarkDeletedPosition │ 1549232 │ 15495122 │ 10 │ 402 │ 37587 │ 99.76 │ 0.24 │ 3 │ 2025-08-20 18:15:18.296 │ │ cacheEvictionByMarkDeletedPosition │ 1549294 │ 15493818 │ 10 │ 501 │ 47815 │ 99.69 │ 0.31 │ 3 │ 2025-08-20 18:15:51.536 │ │ cacheEvictionByMarkDeletedPosition │ 1549246 │ 15493923 │ 10 │ 131 │ 11050 │ 99.93 │ 0.07 │ 3 │ 2025-08-20 18:16:24.953 │ │ PR12258 │ 1549252 │ 15493791 │ 10 │ 1668 │ 160977 │ 98.96 │ 1.04 │ 3 │ 2025-08-20 18:17:08.902 │ │ PR12258 │ 1549504 │ 15495547 │ 10 │ 2345 │ 231477 │ 98.51 │ 1.49 │ 3 │ 2025-08-20 18:17:42.184 │ │ PR12258 │ 1548921 │ 15490641 │ 10 │ 1389 │ 134948 │ 99.13 │ 0.87 │ 3 │ 2025-08-20 18:18:15.442 │ │ PR12258 │ 1549688 │ 15498335 │ 10 │ 1167 │ 113205 │ 99.27 │ 0.73 │ 3 │ 2025-08-20 18:18:48.691 │ │ PR12258 │ 1549431 │ 15497793 │ 10 │ 357 │ 33297 │ 99.79 │ 0.21 │ 3 │ 2025-08-20 18:19:21.974 │ │ PIP430 │ 1548842 │ 15493125 │ 10 │ 40 │ 2520 │ 99.98 │ 0.02 │ 3 │ 2025-08-20 18:20:05.814 │ │ PIP430 │ 1549053 │ 15492250 │ 10 │ 10 │ 415 │ 100.0 │ 0.0 │ 3 │ 2025-08-20 18:20:39.107 │ │ PIP430 │ 1549018 │ 15492753 │ 10 │ 22 │ 1351 │ 99.99 │ 0.01 │ 3 │ 2025-08-20 18:21:12.426 │ │ PIP430 │ 1549107 │ 15495958 │ 10 │ 24 │ 1651 │ 99.99 │ 0.01 │ 3 │ 2025-08-20 18:21:45.727 │ │ PIP430 │ 1549488 │ 15497040 │ 10 │ 26 │ 1634 │ 99.99 │ 0.01 │ 3 │ 2025-08-20 18:22:19.238 │ │ PIP430disabled │ 1549357 │ 15497773 │ 10 │ 16477 │ 1209798 │ 92.19 │ 7.81 │ 3 │ 2025-08-20 18:23:03.076 │ │ PIP430disabled │ 1549292 │ 15496202 │ 10 │ 6400 │ 488367 │ 96.85 │ 3.15 │ 3 │ 2025-08-20 18:23:36.331 │ │ PIP430disabled │ 1549296 │ 15496974 │ 10 │ 12276 │ 949362 │ 93.87 │ 6.13 │ 3 │ 2025-08-20 18:24:09.67 │ │ PIP430disabled │ 1549546 │ 15497515 │ 10 │ 11759 │ 892362 │ 94.24 │ 5.76 │ 3 │ 2025-08-20 18:24:42.965 │ ├────────────────────────────────────┴──────────┴──────────┴───────────┴──────────┴─────────────────┴────────┴────────┴──────────┴─────────────────────────┤ │ 19 rows 10 columns │ └──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ ``` The PIP430 caching is very close to 100%. PIP430disabled (similar to current default caching) is about 94%. cacheEvictionByMarkDeletedPosition and PR12258 (with a slight fix to activate the cursor) performs also very well when producer rate is capped. ``` ❯ { cat pulsar-broker/target/rolling_restarts_result_header.txt; cat pulsar-broker/target/rolling_restarts_result_*.csv } | duckdb -c "select description, avg(produced), avg(consumed), avg(bk_reads), avg(bk_read_entries), avg(hits), avg(misses) from read_csv('/dev/stdin') group by description order by 5" |cat ┌────────────────────────────────────┬───────────────┬───────────────┬───────────────┬──────────────────────┬───────────────────┬─────────────────────┐ │ description │ avg(produced) │ avg(consumed) │ avg(bk_reads) │ avg(bk_read_entries) │ avg(hits) │ avg(misses) │ │ varchar │ double │ double │ double │ double │ double │ double │ ├────────────────────────────────────┼───────────────┼───────────────┼───────────────┼──────────────────────┼───────────────────┼─────────────────────┤ │ PIP430 │ 1549101.6 │ 15494225.2 │ 24.4 │ 1514.2 │ 99.99000000000001 │ 0.01 │ │ cacheEvictionByMarkDeletedPosition │ 1548124.8 │ 15483395.6 │ 353.8 │ 32799.2 │ 99.788 │ 0.21200000000000002 │ │ PR12258 │ 1549359.2 │ 15495221.4 │ 1385.2 │ 134780.8 │ 99.132 │ 0.8680000000000001 │ │ PIP430disabled │ 1549275.0 │ 15496128.0 │ 11860.4 │ 900982.0 │ 94.184 │ 5.816000000000001 │ └────────────────────────────────────┴───────────────┴───────────────┴───────────────┴──────────────────────┴───────────────────┴─────────────────────┘ ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@pulsar.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org