diff options
author | 2024-01-22 09:35:23 +0000 | |
---|---|---|
committer | 2024-01-22 09:35:23 +0000 | |
commit | a858831387f5e423c855ff3c5611fc80209f44b0 (patch) | |
tree | 059dcfc37228670e1e2aa20db4a36bb3cef40ef6 /vendor/github.com/KimMachineGun/automemlimit/README.md | |
parent | [bugfix] fix array type for also_known_as_uris (#2553) (diff) | |
download | gotosocial-a858831387f5e423c855ff3c5611fc80209f44b0.tar.xz |
[chore]: Bump github.com/KimMachineGun/automemlimit from 0.4.0 to 0.5.0 (#2560)
Diffstat (limited to 'vendor/github.com/KimMachineGun/automemlimit/README.md')
-rw-r--r-- | vendor/github.com/KimMachineGun/automemlimit/README.md | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/vendor/github.com/KimMachineGun/automemlimit/README.md b/vendor/github.com/KimMachineGun/automemlimit/README.md index 192bc0b6f..c0e66d2a7 100644 --- a/vendor/github.com/KimMachineGun/automemlimit/README.md +++ b/vendor/github.com/KimMachineGun/automemlimit/README.md @@ -8,6 +8,14 @@ Automatically set `GOMEMLIMIT` to match Linux [cgroups(7)](https://man7.org/linu See more details about `GOMEMLIMIT` [here](https://tip.golang.org/doc/gc-guide#Memory_limit). +## Notice + +Version `v0.5.0` introduces a fallback to system memory limits as an experimental feature when cgroup limits are unavailable. Activate this by setting `AUTOMEMLIMIT_EXPERIMENT=system`. +You can also use system memory limits via `memlimit.FromSystem` provider directly. + +This feature is under evaluation and might become a default or be removed based on user feedback. +If you have any feedback about this feature, please open an issue. + ## Installation ```shell @@ -34,9 +42,17 @@ import "github.com/KimMachineGun/automemlimit/memlimit" func init() { memlimit.SetGoMemLimitWithOpts( memlimit.WithRatio(0.9), - memlimit.WithEnv(), memlimit.WithProvider(memlimit.FromCgroup), ) + memlimit.SetGoMemLimitWithOpts( + memlimit.WithRatio(0.9), + memlimit.WithProvider( + memlimit.ApplyFallback( + memlimit.FromCgroup, + memlimit.FromSystem, + ), + ), + ) memlimit.SetGoMemLimitWithEnv() memlimit.SetGoMemLimit(0.9) memlimit.SetGoMemLimitWithProvider(memlimit.Limit(1024*1024), 0.9) |