mirror of
https://github.com/minio/minio.git
synced 2025-11-09 13:39:46 -05:00
allow pre-allocating buffers to reduce frequent GCs during growth (#18686)
This PR also increases per node bpool memory from 1024 entries to 2048 entries; along with that, it also moves the byte pool centrally instead of being per pool.
This commit is contained in:
@@ -22,8 +22,8 @@ import "testing"
|
||||
// Tests - bytePool functionality.
|
||||
func TestBytePool(t *testing.T) {
|
||||
size := 4
|
||||
width := 10
|
||||
capWidth := 16
|
||||
width := 1024
|
||||
capWidth := 2048
|
||||
|
||||
bufPool := NewBytePoolCap(size, width, capWidth)
|
||||
|
||||
@@ -43,7 +43,7 @@ func TestBytePool(t *testing.T) {
|
||||
t.Fatalf("bytepool length invalid: got %v want %v", len(b), width)
|
||||
}
|
||||
if cap(b) != capWidth {
|
||||
t.Fatalf("bytepool length invalid: got %v want %v", cap(b), capWidth)
|
||||
t.Fatalf("bytepool cap invalid: got %v want %v", cap(b), capWidth)
|
||||
}
|
||||
|
||||
bufPool.Put(b)
|
||||
|
||||
Reference in New Issue
Block a user