Skip to content

Commit

Permalink
[Dataflow Streaming] Increase windmill state cache concurrency level (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
arunpandianp authored Jan 22, 2025
1 parent cdad92b commit c761112
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,15 +79,17 @@ public class WindmillStateCache implements StatusDataProvider {

WindmillStateCache(long sizeMb, boolean supportMapViaMultimap) {
this.workerCacheBytes = sizeMb * MEGABYTES;
int stateCacheConcurrencyLevel =
Math.max(STATE_CACHE_CONCURRENCY_LEVEL, Runtime.getRuntime().availableProcessors());
this.stateCache =
CacheBuilder.newBuilder()
.maximumWeight(workerCacheBytes)
.recordStats()
.weigher(Weighers.weightedKeysAndValues())
.concurrencyLevel(STATE_CACHE_CONCURRENCY_LEVEL)
.concurrencyLevel(stateCacheConcurrencyLevel)
.build();
this.keyIndex =
new MapMaker().weakValues().concurrencyLevel(STATE_CACHE_CONCURRENCY_LEVEL).makeMap();
new MapMaker().weakValues().concurrencyLevel(stateCacheConcurrencyLevel).makeMap();
this.supportMapViaMultimap = supportMapViaMultimap;
}

Expand Down

0 comments on commit c761112

Please sign in to comment.