Adjust series file size and partitions

pull/9150/head
Edd Robinson 2017-12-17 22:40:00 +00:00
parent 38af43d5eb
commit bde66f19bc
7 changed files with 8 additions and 8 deletions

View File

@ -258,7 +258,7 @@ type LocalServer struct {
// the size of series files so that they can all be addressable in the process.
func (s *LocalServer) Open() error {
if runtime.GOARCH == "386" {
s.Server.TSDBStore.SeriesFileMaxSize = 100000000 // 100M bytes
s.Server.TSDBStore.SeriesFileMaxSize = 1 << 27 // 128MB
}
return s.Server.Open()
}

View File

@ -1694,7 +1694,7 @@ func NewEngine(index string) (*Engine, error) {
// If we're running on a 32-bit system then reduce the SeriesFile size, so we
// can address is in memory.
if runtime.GOARCH == "386" {
sfile.MaxSize = 100000000 // 100M bytes
sfile.MaxSize = 1 << 27 // 128MB
}
if err = sfile.Open(); err != nil {
@ -1739,7 +1739,7 @@ func NewSeriesFile() *SeriesFile {
// If we're running on a 32-bit system then reduce the SeriesFile size, so we
// can address is in memory.
if runtime.GOARCH == "386" {
s.SeriesFile.MaxSize = 100000000 // 100M bytes
s.SeriesFile.MaxSize = 1 << 27 // 128MB
}
return s
}

View File

@ -46,7 +46,7 @@ func init() {
// NOTE: Currently, this must not be change once a database is created. Further,
// it must also be a power of 2.
//
var DefaultPartitionN uint64 = 16
var DefaultPartitionN uint64 = 8
// An IndexOption is a functional option for changing the configuration of
// an Index.

View File

@ -300,7 +300,7 @@ func NewSeriesFile() *SeriesFile {
// If we're running on a 32-bit system then reduce the SeriesFile size, so we
// can address is in memory.
if runtime.GOARCH == "386" {
s.SeriesFile.MaxSize = 100000000 // 100M bytes
s.SeriesFile.MaxSize = 1 << 27 // 128MB
}
return s
}

View File

@ -157,7 +157,7 @@ func MustNewIndex(index string) *Index {
// If we're running on a 32-bit system then reduce the SeriesFile size, so we
// can address is in memory.
if runtime.GOARCH == "386" {
sfile.MaxSize = 100000000 // 100M bytes
sfile.MaxSize = 1 << 27 // 128MB
}
if err := sfile.Open(); err != nil {

View File

@ -68,7 +68,7 @@ func NewSeriesFile() *SeriesFile {
// If we're running on a 32-bit system then reduce the SeriesFile size, so we
// can address is in memory.
if runtime.GOARCH == "386" {
s.SeriesFile.MaxSize = 100000000 // 100M bytes
s.SeriesFile.MaxSize = 1 << 27 // 128MB
}
return s
}

View File

@ -225,7 +225,7 @@ func NewTempShard(index string) *TempShard {
// If we're running on a 32-bit system then reduce the SeriesFile size, so we
// can address is in memory.
if runtime.GOARCH == "386" {
sfile.MaxSize = 100000000 // 100M bytes
sfile.MaxSize = 1 << 27 // 128MB
}
if err := sfile.Open(); err != nil {