diff --git a/pkg/config/configuration.go b/pkg/config/configuration.go index 721348a2f0d66..718d2e63e9854 100644 --- a/pkg/config/configuration.go +++ b/pkg/config/configuration.go @@ -162,11 +162,11 @@ var ( defaultOBBufferSize int64 = 10485760 // defaultOBCollectorCntPercent - defaultOBCollectorCntPercent = 1000 + defaultOBCollectorCntPercent = 10 // defaultOBGeneratorCntPercent - defaultOBGeneratorCntPercent = 1000 + defaultOBGeneratorCntPercent = 20 // defaultOBExporterCntPercent - defaultOBExporterCntPercent = 1000 + defaultOBExporterCntPercent = 80 // defaultPrintDebugInterval default: 30 minutes defaultPrintDebugInterval = 30 diff --git a/pkg/util/export/batch_processor.go b/pkg/util/export/batch_processor.go index ded37139f3ce6..3aa63f37ae2f3 100644 --- a/pkg/util/export/batch_processor.go +++ b/pkg/util/export/batch_processor.go @@ -442,8 +442,6 @@ func NewMOCollector( return c } -const maxPercentValue = 1000 - // calculateDefaultWorker // totalNum = int( #cpu * 0.1 + 0.5 ) // default collectorCntP : generatorCntP : exporterCntP = 10 : 20 : 80. @@ -483,17 +481,6 @@ func (c *MOCollector) calculateDefaultWorker(numCpu int) { if c.exporterCnt > numCpu { c.exporterCnt = numCpu } - - // last check: disable calculation - if c.collectorCnt >= maxPercentValue { - c.collectorCnt = numCpu - } - if c.generatorCntP >= maxPercentValue { - c.generatorCnt = numCpu - } - if c.exporterCnt >= maxPercentValue { - c.generatorCnt = numCpu - } } func WithCollectorCntP(p int) MOCollectorOption { diff --git a/pkg/util/export/batch_processor_test.go b/pkg/util/export/batch_processor_test.go index 92e9273f19c4b..7bed427cfd5ed 100644 --- a/pkg/util/export/batch_processor_test.go +++ b/pkg/util/export/batch_processor_test.go @@ -370,9 +370,9 @@ func Test_newBufferHolder_AddAfterStop(t *testing.T) { func getDummyOBCollectorConfig() *config.OBCollectorConfig { cfg := &config.OBCollectorConfig{} cfg.SetDefaultValues() - cfg.ExporterCntPercent = maxPercentValue - cfg.GeneratorCntPercent = maxPercentValue - cfg.CollectorCntPercent = maxPercentValue + cfg.ExporterCntPercent = 100 + cfg.GeneratorCntPercent = 100 + cfg.CollectorCntPercent = 100 return cfg }