feat: add memlimit flags for setMaxResources (#19400)

This commit is contained in:
jiuker
2024-04-04 20:06:57 +08:00
committed by GitHub
parent 95bf4a57b6
commit 272367ccd2
3 changed files with 32 additions and 3 deletions

View File

@@ -172,6 +172,12 @@ var ServerFlags = []cli.Flag{
Hidden: true,
EnvVar: "MINIO_CROSSDOMAIN_XML",
},
cli.StringFlag{
Name: "memlimit",
Usage: "set global memory limit per server via GOMEMLIMIT",
Hidden: true,
EnvVar: "MINIO_MEMLIMIT",
},
}
var gatewayCmd = cli.Command{
@@ -731,7 +737,7 @@ func serverMain(ctx *cli.Context) {
// Set system resources to maximum.
bootstrapTrace("setMaxResources", func() {
_ = setMaxResources()
_ = setMaxResources(ctx)
})
// Verify kernel release and version.