[
https://issues.apache.org/jira/browse/KAFKA-21241?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18140939#comment-18140939
]
이선민 commented on KAFKA-21241:
-----------------------------
[~muralibasani] Here are the ShareSessionCache numbers. I estimated the
live-heap footprint of a single broker's ShareSessionCache in an isolated JVM,
using the actual cache implementation and reproducing the initial-session
construction in SharePartitionManager.newContext, with P cached partitions per
session over up to 10 topics (trunk 8f4cc1d800, JDK 17, compressed oops; MB =
10^6 bytes):
||Sessions||Partitions per session||Live heap||Per session||
|1,000|1|0.53 MB|526 B|
|1,000|10|1.33 MB|1,327 B|
|1,000|100|6.37 MB|6,366 B|
|10,000|1|5.18 MB|518 B|
|10,000|10|13.2 MB|1,318 B|
|10,000|100|63.6 MB|6,358 B|
|30,000|1|15.7 MB|522 B|
|30,000|10|39.7 MB|1,322 B|
|30,000|100|191 MB|6,362 B|
The cost per session stays approximately constant from 1k to 30k sessions, so
the total grows linearly. For freshly created sessions it is roughly 410 bytes
per session plus about 56 bytes per cached partition and 32 bytes per distinct
topic. These figures include connection-id strings; on a real broker those
strings are shared with the network layer, accounting for roughly 80 bytes per
session in this setup.
I also checked the assumptions against a real broker with real share consumers
(one broker, one group, up to 800 members):
* For a homogeneous group with more members than subscribed partitions, the
default assignor gives each member one or two partitions after assignment
settles. The low-P cases are therefore relevant to that scenario. Larger P can
occur with more partitions per member or with multiple groups contributing
sessions to the same broker.
* A separate exploratory check showed substantially more live-heap growth
outside the cache. Those whole-process measurements had not converged and
should not be extrapolated to 20-30k members; details are in summary.md.
This is an initial footprint, not an upper bound for a long-running cache, and
it doesn't cover how many sessions one broker holds when there are several
brokers. The method, assumptions and checks are in the attached summary.md,
with the harnesses.
> Increase the number of consumers in the share consumer group
> ------------------------------------------------------------
>
> Key: KAFKA-21241
> URL: https://issues.apache.org/jira/browse/KAFKA-21241
> Project: Kafka
> Issue Type: Improvement
> Reporter: Prakhar Kulshrestha
> Priority: Major
> Attachments: BrokerHeapPerMember.java, MapBench.java,
> RealBrokerCheck.java, SessionCacheFootprint.java, ShareClients.java,
> WorkingSetBench.java, assignor-gc-G1.json, assignor-gc-Parallel.json,
> assignor-sweep-pretouch.json, hashmap-isolated.json, notes.txt,
> printcp.gradle, printtestcp.gradle, run.sh, summary.md, working-set.json
>
>
> Currently the max number of consumers in a share consumer group is default
> to 200 and max to 1000. In bigger platforms where batch processing along
> with slow consumer use cases limiting to just 1000 consumer is very
> restrictive.{*}{*}
> One of the scenario is a batch processing of millions of records and having
> to parallel process 20-30k records in parallel using spring kafka concurrency
> feature would mean we would need at least 20-30k consumers in a consumer
> groups with around 1k pods. Current 1000 limit just let it have ~60pods.
> Request this to be reevaluated and increase the number of consumers that a
> share group can have.
> *group.share.max.size*
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)