Skip to content

Instantly share code, notes, and snippets.

@saikpr
Created July 5, 2019 04:57
Show Gist options
  • Save saikpr/8d81cecdb762cfb1e93fa19a45ef9987 to your computer and use it in GitHub Desktop.
Save saikpr/8d81cecdb762cfb1e93fa19a45ef9987 to your computer and use it in GitHub Desktop.
diff --git a/internal/repository/packer_manager.go b/internal/repository/packer_manager.go
index 4884e088..0be8ee34 100644
--- a/internal/repository/packer_manager.go
+++ b/internal/repository/packer_manager.go
@@ -36,7 +36,7 @@ type packerManager struct {
packers []*Packer
}
-const minPackSize = 4 * 1024 * 1024
+const minPackSize = 128 * 1024 * 1024
// newPackerManager returns an new packer manager which writes temporary files
// to a temporary directory
diff --git a/internal/restorer/filerestorer.go b/internal/restorer/filerestorer.go
index c59b061b..26f34d34 100644
--- a/internal/restorer/filerestorer.go
+++ b/internal/restorer/filerestorer.go
@@ -21,13 +21,13 @@ import (
// TODO evaluate disabled debug logging overhead for large repositories
const (
- workerCount = 8
+ workerCount = 4
// max number of cached open output file handles
filesWriterCacheCap = 32
// estimated average pack size used to calculate pack cache capacity
- averagePackSize = 5 * 1024 * 1024
+ averagePackSize = 130 * 1024 * 1024
// pack cache capacity should support at least one cached pack per worker
// allow space for extra 5 packs for actual caching
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment