app/vmselect/netstorage: limit the maximum size for in-memory buffer for temporary blocks file

This should reduce memory usage on systems with more than 8GB RAM.
This commit is contained in:
Aliaksandr Valialkin 2020-01-17 16:27:16 +02:00
parent ed1d259b10
commit d21cc2d16a

View File

@ -36,6 +36,9 @@ func maxInmemoryTmpBlocksFile() int {
if maxLen < 64*1024 { if maxLen < 64*1024 {
return 64 * 1024 return 64 * 1024
} }
if maxLen > 4*1024*1024 {
return 4*1024*1024
}
return maxLen return maxLen
} }