Skip to content

Commit

Permalink
Make fuse max reader concurrency configurable
Browse files Browse the repository at this point in the history
Make fuse max reader concurrency configurable. The default value was 64 and it was unchangeable.
			pr-link: #18129
			change-id: cid-9c55821622329bd1e608da2e7445e8ab591df38a
  • Loading branch information
JiamingMai authored Sep 12, 2023
1 parent 3c41091 commit 71f5708
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
9 changes: 9 additions & 0 deletions dora/core/common/src/main/java/alluxio/conf/PropertyKey.java
Original file line number Diff line number Diff line change
Expand Up @@ -6214,6 +6214,13 @@ public String toString() {
.setConsistencyCheckLevel(ConsistencyCheckLevel.IGNORE)
.setScope(Scope.CLIENT)
.build();
public static final PropertyKey FUSE_MAX_READER_CONCURRENCY =
intBuilder(Name.FUSE_MAX_READER_CONCURRENCY)
.setDefaultValue(128)
.setDescription("Max number of concurrent readers per file in FUSE")
.setConsistencyCheckLevel(ConsistencyCheckLevel.WARN)
.setScope(Scope.ALL)
.build();
public static final PropertyKey FUSE_MOUNT_ALLUXIO_PATH =
stringBuilder(Name.FUSE_MOUNT_ALLUXIO_PATH)
.setAlias(Name.WORKER_FUSE_MOUNT_ALLUXIO_PATH)
Expand Down Expand Up @@ -8267,6 +8274,8 @@ public static final class Name {
public static final String FUSE_DEBUG_ENABLED = "alluxio.fuse.debug.enabled";
public static final String FUSE_FS_NAME = "alluxio.fuse.fs.name";
public static final String FUSE_LOGGING_THRESHOLD = "alluxio.fuse.logging.threshold";
public static final String FUSE_MAX_READER_CONCURRENCY =
"alluxio.max.fuse.reader.concurrency";
public static final String FUSE_MOUNT_ALLUXIO_PATH =
"alluxio.fuse.mount.alluxio.path";
public static final String FUSE_MOUNT_OPTIONS =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
import alluxio.Constants;
import alluxio.concurrent.ClientRWLock;
import alluxio.concurrent.LockMode;
import alluxio.conf.Configuration;
import alluxio.conf.PropertyKey;
import alluxio.exception.runtime.CancelledRuntimeException;
import alluxio.exception.runtime.DeadlineExceededRuntimeException;
import alluxio.resource.CloseableResource;
Expand All @@ -34,7 +36,8 @@
public class FuseReadWriteLockManager {
private static final long TRY_LOCK_TIMEOUT = 20 * Constants.SECOND_MS;
// Maximum readers allowed for each file
private static final int MAX_READER_CONCURRENCY = 64;
private static final int MAX_READER_CONCURRENCY = Configuration.global()
.getInt(PropertyKey.FUSE_MAX_READER_CONCURRENCY);

private final LoadingCache<String, ClientRWLock> mLockCache
= CacheBuilder.newBuilder().weakValues()
Expand Down

0 comments on commit 71f5708

Please sign in to comment.