mirror of
https://github.com/minio/minio.git
synced 2025-11-09 13:39:46 -05:00
azure: Use default upload parameters to avoid consuming too much memory (#11251)
A lot of memory is consumed when uploading small files in parallel, use the default upload parameters and add MINIO_AZURE_UPLOAD_CONCURRENCY for users to tweak.
This commit is contained in:
11
pkg/env/env.go
vendored
11
pkg/env/env.go
vendored
@@ -18,6 +18,7 @@
|
||||
package env
|
||||
|
||||
import (
|
||||
"strconv"
|
||||
"strings"
|
||||
"sync"
|
||||
)
|
||||
@@ -75,6 +76,16 @@ func Get(key, defaultValue string) string {
|
||||
return defaultValue
|
||||
}
|
||||
|
||||
// GetInt returns an integer if found in the environment
|
||||
// and returns the default value otherwise.
|
||||
func GetInt(key string, defaultValue int) (int, error) {
|
||||
v := Get(key, "")
|
||||
if v == "" {
|
||||
return defaultValue, nil
|
||||
}
|
||||
return strconv.Atoi(v)
|
||||
}
|
||||
|
||||
// List all envs with a given prefix.
|
||||
func List(prefix string) (envs []string) {
|
||||
for _, env := range Environ() {
|
||||
|
||||
Reference in New Issue
Block a user