Adjust series file size and partitions
parent
38af43d5eb
commit
bde66f19bc
|
@ -258,7 +258,7 @@ type LocalServer struct {
|
||||||
// the size of series files so that they can all be addressable in the process.
|
// the size of series files so that they can all be addressable in the process.
|
||||||
func (s *LocalServer) Open() error {
|
func (s *LocalServer) Open() error {
|
||||||
if runtime.GOARCH == "386" {
|
if runtime.GOARCH == "386" {
|
||||||
s.Server.TSDBStore.SeriesFileMaxSize = 100000000 // 100M bytes
|
s.Server.TSDBStore.SeriesFileMaxSize = 1 << 27 // 128MB
|
||||||
}
|
}
|
||||||
return s.Server.Open()
|
return s.Server.Open()
|
||||||
}
|
}
|
||||||
|
|
|
@ -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
|
// If we're running on a 32-bit system then reduce the SeriesFile size, so we
|
||||||
// can address is in memory.
|
// can address is in memory.
|
||||||
if runtime.GOARCH == "386" {
|
if runtime.GOARCH == "386" {
|
||||||
sfile.MaxSize = 100000000 // 100M bytes
|
sfile.MaxSize = 1 << 27 // 128MB
|
||||||
}
|
}
|
||||||
|
|
||||||
if err = sfile.Open(); err != nil {
|
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
|
// If we're running on a 32-bit system then reduce the SeriesFile size, so we
|
||||||
// can address is in memory.
|
// can address is in memory.
|
||||||
if runtime.GOARCH == "386" {
|
if runtime.GOARCH == "386" {
|
||||||
s.SeriesFile.MaxSize = 100000000 // 100M bytes
|
s.SeriesFile.MaxSize = 1 << 27 // 128MB
|
||||||
}
|
}
|
||||||
return s
|
return s
|
||||||
}
|
}
|
||||||
|
|
|
@ -46,7 +46,7 @@ func init() {
|
||||||
// NOTE: Currently, this must not be change once a database is created. Further,
|
// NOTE: Currently, this must not be change once a database is created. Further,
|
||||||
// it must also be a power of 2.
|
// 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 IndexOption is a functional option for changing the configuration of
|
||||||
// an Index.
|
// an Index.
|
||||||
|
|
|
@ -300,7 +300,7 @@ func NewSeriesFile() *SeriesFile {
|
||||||
// If we're running on a 32-bit system then reduce the SeriesFile size, so we
|
// If we're running on a 32-bit system then reduce the SeriesFile size, so we
|
||||||
// can address is in memory.
|
// can address is in memory.
|
||||||
if runtime.GOARCH == "386" {
|
if runtime.GOARCH == "386" {
|
||||||
s.SeriesFile.MaxSize = 100000000 // 100M bytes
|
s.SeriesFile.MaxSize = 1 << 27 // 128MB
|
||||||
}
|
}
|
||||||
return s
|
return s
|
||||||
}
|
}
|
||||||
|
|
|
@ -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
|
// If we're running on a 32-bit system then reduce the SeriesFile size, so we
|
||||||
// can address is in memory.
|
// can address is in memory.
|
||||||
if runtime.GOARCH == "386" {
|
if runtime.GOARCH == "386" {
|
||||||
sfile.MaxSize = 100000000 // 100M bytes
|
sfile.MaxSize = 1 << 27 // 128MB
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := sfile.Open(); err != nil {
|
if err := sfile.Open(); err != nil {
|
||||||
|
|
|
@ -68,7 +68,7 @@ func NewSeriesFile() *SeriesFile {
|
||||||
// If we're running on a 32-bit system then reduce the SeriesFile size, so we
|
// If we're running on a 32-bit system then reduce the SeriesFile size, so we
|
||||||
// can address is in memory.
|
// can address is in memory.
|
||||||
if runtime.GOARCH == "386" {
|
if runtime.GOARCH == "386" {
|
||||||
s.SeriesFile.MaxSize = 100000000 // 100M bytes
|
s.SeriesFile.MaxSize = 1 << 27 // 128MB
|
||||||
}
|
}
|
||||||
return s
|
return s
|
||||||
}
|
}
|
||||||
|
|
|
@ -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
|
// If we're running on a 32-bit system then reduce the SeriesFile size, so we
|
||||||
// can address is in memory.
|
// can address is in memory.
|
||||||
if runtime.GOARCH == "386" {
|
if runtime.GOARCH == "386" {
|
||||||
sfile.MaxSize = 100000000 // 100M bytes
|
sfile.MaxSize = 1 << 27 // 128MB
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := sfile.Open(); err != nil {
|
if err := sfile.Open(); err != nil {
|
||||||
|
|
Loading…
Reference in New Issue