Skip to content
This repository has been archived by the owner on Feb 18, 2025. It is now read-only.

cmd: allow file descriptor limit to be set via CLI (#24477) #400

Merged
merged 1 commit into from
Feb 1, 2024

Conversation

minh-bq
Copy link
Collaborator

@minh-bq minh-bq commented Jan 29, 2024

  • eth, cmd: allow FdLimit to be set in config/command line (#24148)

  • eth/ethconfig: format code

  • cmd, eth/ethconfig: simplify fdlimit arg, disallow toml

  • cnd/utils: make fdlimit setting nicer on the logs


Currently, we set the OpenFilesCacheCapacity leveldb's option to system fd limit / 2

// OpenFilesCacheCapacity defines the capacity of the open files caching.
OpenFilesCacheCapacity int

This can be the reason for high memory in page cache (high active_file in /sys/fs/cgroup/memory/memory.stat). We cherry-pick this commit to allow setting fdlimit through CLI to reduce the cache capacity in leveldb.

* eth, cmd: allow FdLimit to be set in config/command line (#24148)

* eth/ethconfig: format code

* cmd, eth/ethconfig: simplify fdlimit arg, disallow toml

* cnd/utils: make fdlimit setting nicer on the logs

Co-authored-by: Gary Rong <[email protected]>
Co-authored-by: Péter Szilágyi <[email protected]>
@minh-bq minh-bq merged commit 7a34f4b into axieinfinity:master Feb 1, 2024
1 check passed
@minh-bq minh-bq deleted the feat/limit-file-handle branch February 1, 2024 03:03
Francesco4203 pushed a commit to Francesco4203/ronin that referenced this pull request Jun 18, 2024
…nity#400)

* eth, cmd: allow FdLimit to be set in config/command line (#24148)

* eth/ethconfig: format code

* cmd, eth/ethconfig: simplify fdlimit arg, disallow toml

* cnd/utils: make fdlimit setting nicer on the logs
-----
Currently, we set the OpenFilesCacheCapacity leveldb's option to system fd limit / 2
```
// OpenFilesCacheCapacity defines the capacity of the open files caching.
OpenFilesCacheCapacity int
```
This can be the reason for high memory in page cache (high active_file in /sys/fs/cgroup/memory/memory.stat). We cherry-pick this commit to allow setting fdlimit through CLI to reduce the cache capacity in leveldb.

Co-authored-by: Olivier H <[email protected]>
Co-authored-by: Gary Rong <[email protected]>
Co-authored-by: Péter Szilágyi <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants