mirror of
https://github.com/minio/minio.git
synced 2025-01-26 06:03:17 -05:00
pre-allocate EC memory by default at startup (#18846)
This commit is contained in:
parent
e39e2306d6
commit
f78d677ab6
@ -373,7 +373,6 @@ func buildServerCtxt(ctx *cli.Context, ctxt *serverCtxt) (err error) {
|
|||||||
|
|
||||||
// Check "no-compat" flag from command line argument.
|
// Check "no-compat" flag from command line argument.
|
||||||
ctxt.StrictS3Compat = !(ctx.IsSet("no-compat") || ctx.GlobalIsSet("no-compat"))
|
ctxt.StrictS3Compat = !(ctx.IsSet("no-compat") || ctx.GlobalIsSet("no-compat"))
|
||||||
ctxt.PreAllocate = ctx.IsSet("pre-allocate") || ctx.GlobalIsSet("pre-allocate")
|
|
||||||
|
|
||||||
switch {
|
switch {
|
||||||
case ctx.IsSet("config-dir"):
|
case ctx.IsSet("config-dir"):
|
||||||
|
@ -90,13 +90,14 @@ func newErasureServerPools(ctx context.Context, endpointServerPools EndpointServ
|
|||||||
n = 2048
|
n = 2048
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if globalIsCICD {
|
||||||
|
n = 256 // 256MiB for CI/CD environments is sufficient
|
||||||
|
}
|
||||||
|
|
||||||
// Initialize byte pool once for all sets, bpool size is set to
|
// Initialize byte pool once for all sets, bpool size is set to
|
||||||
// setCount * setDriveCount with each memory upto blockSizeV2.
|
// setCount * setDriveCount with each memory upto blockSizeV2.
|
||||||
globalBytePoolCap = bpool.NewBytePoolCap(n, blockSizeV2, blockSizeV2*2)
|
globalBytePoolCap = bpool.NewBytePoolCap(n, blockSizeV2, blockSizeV2*2)
|
||||||
|
|
||||||
if globalServerCtxt.PreAllocate {
|
|
||||||
globalBytePoolCap.Populate()
|
globalBytePoolCap.Populate()
|
||||||
}
|
|
||||||
|
|
||||||
var localDrives []StorageAPI
|
var localDrives []StorageAPI
|
||||||
local := endpointServerPools.FirstLocal()
|
local := endpointServerPools.FirstLocal()
|
||||||
|
@ -143,7 +143,6 @@ type serverCtxt struct {
|
|||||||
JSON, Quiet bool
|
JSON, Quiet bool
|
||||||
Anonymous bool
|
Anonymous bool
|
||||||
StrictS3Compat bool
|
StrictS3Compat bool
|
||||||
PreAllocate bool
|
|
||||||
Addr, ConsoleAddr string
|
Addr, ConsoleAddr string
|
||||||
ConfigDir, CertsDir string
|
ConfigDir, CertsDir string
|
||||||
configDirSet, certsDirSet bool
|
configDirSet, certsDirSet bool
|
||||||
|
@ -74,12 +74,6 @@ var ServerFlags = []cli.Flag{
|
|||||||
EnvVar: "MINIO_LISTENERS",
|
EnvVar: "MINIO_LISTENERS",
|
||||||
Hidden: true,
|
Hidden: true,
|
||||||
},
|
},
|
||||||
cli.BoolFlag{
|
|
||||||
Name: "pre-allocate",
|
|
||||||
Usage: "Number of 1MiB sized buffers to pre-allocate. Default 2048",
|
|
||||||
EnvVar: "MINIO_PRE_ALLOCATE",
|
|
||||||
Hidden: true,
|
|
||||||
},
|
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "console-address",
|
Name: "console-address",
|
||||||
Usage: "bind to a specific ADDRESS:PORT for embedded Console UI, ADDRESS can be an IP or hostname",
|
Usage: "bind to a specific ADDRESS:PORT for embedded Console UI, ADDRESS can be an IP or hostname",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user