lhotari commented on PR #24623:
URL: https://github.com/apache/pulsar/pull/24623#issuecomment-3208984303
Interestingly, the results on my Dell XPS 2019 (i9-9980HK CPU @ 2.40GHz) are
very different than on MBP M3 Max:
```
┌────────────────────────────────────┬──────────┬──────────┬───────────┬──────────┬─────────────────┬────────┬────────┬──────────┬─────────────────────────┐
│ description │ produced │ consumed │ consumers │
bk_reads │ bk_read_entries │ hits │ misses │ restarts │ ts
│
│ varchar │ int64 │ int64 │ int64 │
int64 │ int64 │ double │ double │ int64 │ timestamp
│
├────────────────────────────────────┼──────────┼──────────┼───────────┼──────────┼─────────────────┼────────┼────────┼──────────┼─────────────────────────┤
│ PR12258 │ 1509385 │ 15098443 │ 10 │
18525 │ 1847641 │ 87.76 │ 12.24 │ 3 │ 2025-08-20 19:35:26.07 │
│ PR12258 │ 1693476 │ 16940269 │ 10 │
13736 │ 1368859 │ 91.92 │ 8.08 │ 3 │ 2025-08-20 19:36:00.442 │
│ PR12258 │ 1723156 │ 17237529 │ 10 │
12683 │ 1262572 │ 92.68 │ 7.32 │ 3 │ 2025-08-20 19:36:34.506 │
│ PR12258 │ 1719958 │ 17205041 │ 10 │
13614 │ 1354546 │ 92.13 │ 7.87 │ 3 │ 2025-08-20 19:37:08.873 │
│ PR12258 │ 1644804 │ 16454401 │ 10 │
11411 │ 1136525 │ 93.09 │ 6.91 │ 3 │ 2025-08-20 19:37:43.28 │
│ cacheEvictionByMarkDeletedPosition │ 1859918 │ 18607060 │ 10 │
81565 │ 8129842 │ 56.31 │ 43.69 │ 3 │ 2025-08-20 19:38:27.66 │
│ cacheEvictionByMarkDeletedPosition │ 1814244 │ 18145240 │ 10 │
81722 │ 8131713 │ 55.19 │ 44.81 │ 3 │ 2025-08-20 19:39:01.718 │
│ cacheEvictionByMarkDeletedPosition │ 1740813 │ 17412731 │ 10 │
60897 │ 6042479 │ 65.3 │ 34.7 │ 3 │ 2025-08-20 19:39:35.845 │
│ cacheEvictionByMarkDeletedPosition │ 1664006 │ 16644406 │ 10 │
38717 │ 3863385 │ 76.79 │ 23.21 │ 3 │ 2025-08-20 19:40:09.946 │
│ cacheEvictionByMarkDeletedPosition │ 1758310 │ 17593905 │ 10 │
77274 │ 7686870 │ 56.31 │ 43.69 │ 3 │ 2025-08-20 19:40:43.946 │
│ PIP430 │ 1826902 │ 18272962 │ 10 │
14760 │ 1471620 │ 91.95 │ 8.05 │ 3 │ 2025-08-20 19:41:28.689 │
│ PIP430 │ 1721983 │ 17226790 │ 10 │
8366 │ 835071 │ 95.15 │ 4.85 │ 3 │ 2025-08-20 19:42:03.198 │
│ PIP430 │ 1711848 │ 17137830 │ 10 │
1985 │ 197240 │ 98.85 │ 1.15 │ 3 │ 2025-08-20 19:42:37.248 │
│ PIP430 │ 1710176 │ 17111540 │ 10 │
4288 │ 428004 │ 97.5 │ 2.5 │ 3 │ 2025-08-20 19:43:11.528 │
│ PIP430 │ 1690152 │ 16912942 │ 10 │
1937 │ 192703 │ 98.86 │ 1.14 │ 3 │ 2025-08-20 19:43:45.748 │
│ PIP430disabled │ 1872724 │ 18734102 │ 10 │
78763 │ 7842919 │ 58.14 │ 41.86 │ 3 │ 2025-08-20 19:44:30.079 │
│ PIP430disabled │ 1793152 │ 17940620 │ 10 │
79898 │ 7936811 │ 55.76 │ 44.24 │ 3 │ 2025-08-20 19:45:04.486 │
│ PIP430disabled │ 1755762 │ 17563500 │ 10 │
77663 │ 7726275 │ 56.01 │ 43.99 │ 3 │ 2025-08-20 19:45:38.471 │
│ PIP430disabled │ 1773824 │ 17743593 │ 10 │
78873 │ 7846181 │ 55.78 │ 44.22 │ 3 │ 2025-08-20 19:46:12.815 │
│ PIP430disabled │ 1683544 │ 16839721 │ 10 │
49009 │ 4875186 │ 71.05 │ 28.95 │ 3 │ 2025-08-20 19:46:47.135 │
├────────────────────────────────────┴──────────┴──────────┴───────────┴──────────┴─────────────────┴────────┴────────┴──────────┴─────────────────────────┤
│ 20 rows
10 columns │
└──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
```
What seems to happen is that when CPU resources are scarce, differences in
caching efficiency will accumulate, as the additional overhead from cache
misses creates bottlenecks that propagate through the system, causing small
efficiency gaps to manifest as significant performance differences under
sustained load.
The test case uses a PulsarMockBookKeeper, so storage operations themselves
are fast. The test case doesn't add a penalty for reads at the moment. In
reality, each read would occur more latency. This isn't a fully realistic test
case, but it does show that PIP430 caching strategy is superior over others for
the rolling restarts use case.
One of the gaps of the test case is that it currently doesn't have a
constraint on caching since there's no other active topics that would be
filling the cache and causing it to overflow. A test where this happens would
be useful since it could demonstrate the PIP430 strategy for handling cache
overflowing.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]