advancedxy commented on code in PR #445:
URL: https://github.com/apache/incubator-uniffle/pull/445#discussion_r1055996354
##########
server/src/main/java/org/apache/uniffle/server/buffer/ShuffleBufferManager.java:
##########
@@ -431,20 +436,28 @@ private Map<String, Set<Integer>> pickFlushedShuffle() {
long expectedFlushSize = highWaterMark - lowWaterMark;
long pickedFlushSize = 0L;
int printIndex = 0;
+ int printIgnoreIndex = 0;
int printMax = 10;
for (Map.Entry<String, AtomicLong> entry : sizeList) {
long size = entry.getValue().get();
- pickedFlushSize += size;
String appIdShuffleIdKey = entry.getKey();
- addPickedShuffle(appIdShuffleIdKey, pickedShuffle);
- // print detail picked info
- if (printIndex < printMax) {
- LOG.info("Pick application_shuffleId[{}] with {} bytes",
appIdShuffleIdKey, size);
- printIndex++;
- }
- if (pickedFlushSize > expectedFlushSize) {
- LOG.info("Finish flush pick with {} bytes", pickedFlushSize);
- break;
+ if (size > this.shuffleFlushThreshold) {
Review Comment:
> Yes. More shuffle-servers could distribute small IO pressure from discrete
usage of memory, especially if too much partitions are in one shuffle-server.
In practice there won't be too much partitions in one shuffle-server. The
coordinator shall control that. More shuffle server could definitely help, but
it may hard to provision shuffle servers elastically if rss is not deployed on
K8S yet, and we should consider the ROI.
The shuffleFlushThreshold is intended to blocking too small data flushed, so
it reduces small I/Os and also the shuffleServer **has a chance to accumulate
more data and becomes a larger buffer**.
> If having this feature, possibly the small partition memory could be not
flushed to persistent storage, and then all client will be back pressured.
For a typical RSS server setup: 32GB - 96GB are typical? For a shuffle
server, I expected 1000 shuffleIds concurrently at most? Suppose each 1000
shuffle has small buffer, say 1M. Then the total memoryUsed is 1000 * 1M = 1G,
compared 1G to 32G/96, I think it's not possible to back pressure clients.
Besides, this is optional, you can opt-out this feature. In next commit, I
will set the default value to 0.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]