Reduce db write cache to (2*) 4 MiB
I haven't been able to reproduce any performance advantage of having it set higher and it reduces the memory footprint a bit.
This commit is contained in:
parent
e215cf6fb8
commit
8ed67fe349
@ -714,9 +714,7 @@ func syncthingMain() {
|
|||||||
func dbOpts() *opt.Options {
|
func dbOpts() *opt.Options {
|
||||||
// Calculate a suitable database block cache capacity.
|
// Calculate a suitable database block cache capacity.
|
||||||
|
|
||||||
// Default is 8 MiB. In reality, the database will use twice the amount we
|
// Default is 8 MiB.
|
||||||
// calculate here, as it also has two write buffers each sized at half the
|
|
||||||
// block cache.
|
|
||||||
blockCacheCapacity := 8 << 20
|
blockCacheCapacity := 8 << 20
|
||||||
// Increase block cache up to this maximum:
|
// Increase block cache up to this maximum:
|
||||||
const maxCapacity = 64 << 20
|
const maxCapacity = 64 << 20
|
||||||
@ -743,7 +741,7 @@ func dbOpts() *opt.Options {
|
|||||||
return &opt.Options{
|
return &opt.Options{
|
||||||
OpenFilesCacheCapacity: 100,
|
OpenFilesCacheCapacity: 100,
|
||||||
BlockCacheCapacity: blockCacheCapacity,
|
BlockCacheCapacity: blockCacheCapacity,
|
||||||
WriteBuffer: blockCacheCapacity / 2,
|
WriteBuffer: 4 << 20,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user