Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add config option beat.max_procs #969

Merged
merged 2 commits into from
Feb 11, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ https://github.com/elastic/beats/compare/v1.1.0...master[Check the HEAD diff]
- Add option to elasticsearch output to pass http parameters in index operations {issue}805[805]
- Improve logstash and elasticsearch backoff behavior. {pull}927[927]
- Add experimental Kafka output. {pull}942[942]
- Add config file option to configure GOMAXPROCS. {pull}969[969]

*Packetbeat*
- Change the DNS library used throughout the dns package to github.com/miekg/dns. {pull}803[803]
Expand Down
4 changes: 4 additions & 0 deletions filebeat/filebeat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,10 @@ shipper:
# Internal queue size for single events in processing pipeline
#queue_size: 1000

# Sets the maximum number of CPUs that can be executing simultaneously. The
# default is the number of logical CPUs available in the system.
#max_procs:

# Configure local GeoIP database support.
# If no paths are not configured geoip is disabled.
#geoip:
Expand Down
7 changes: 7 additions & 0 deletions libbeat/beat/beat.go
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,13 @@ func (b *Beat) LoadConfig() error {

logp.Debug("beat", "Initializing output plugins")

if b.Config.Shipper.MaxProcs != nil {
maxProcs := *b.Config.Shipper.MaxProcs
if maxProcs > 0 {
runtime.GOMAXPROCS(maxProcs)
}
}

pub, err := publisher.New(b.Name, b.Config.Output, b.Config.Shipper)
if err != nil {
return fmt.Errorf("error Initialising publisher: %v\n", err)
Expand Down
5 changes: 5 additions & 0 deletions libbeat/docs/shipperconfig.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,11 @@ value is 1000.

(DO NOT TOUCH) The internal queue size for bulk events in the processing pipeline. The default value is 0.

===== max_procs

Sets the maximum number of CPUs that can be executing simultaneously. The
default is the number of logical CPUs available in the system.

===== geoip.paths

This configuration option is currently used by Packetbeat only.
Expand Down
4 changes: 4 additions & 0 deletions libbeat/etc/libbeat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,10 @@ shipper:
# Internal queue size for single events in processing pipeline
#queue_size: 1000

# Sets the maximum number of CPUs that can be executing simultaneously. The
# default is the number of logical CPUs available in the system.
#max_procs:

# Configure local GeoIP database support.
# If no paths are not configured geoip is disabled.
#geoip:
Expand Down
2 changes: 2 additions & 0 deletions libbeat/publisher/publish.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ type ShipperConfig struct {
// internal publisher queue sizes
QueueSize *int `yaml:"queue_size"`
BulkQueueSize *int `yaml:"bulk_queue_size"`

MaxProcs *int `yaml:"max_procs"`
}

type Topology struct {
Expand Down
9 changes: 6 additions & 3 deletions metricbeat/metricbeat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ metricbeat:
# expvar:
# period: 10s
apache:
hosts:
- "http://192.168.99.100/"
hosts: "http://127.0.0.1/"
metricsets:
status:
period: 1s
Expand Down Expand Up @@ -40,7 +39,7 @@ output:
# Scheme and port can be left out and will be set to the default (http and 9200)
# In case you specify and additional path, the scheme is required: http://localhost:9200/path
# IPv6 addresses should always be defined as: https://[2001:db8::1]:9200
hosts: ["192.168.99.100:9200"]
hosts: ["localhost:9200"]

# Optional protocol and basic auth credentials.
#protocol: "https"
Expand Down Expand Up @@ -231,6 +230,10 @@ shipper:
# Internal queue size for single events in processing pipeline
#queue_size: 1000

# Sets the maximum number of CPUs that can be executing simultaneously. The
# default is the number of logical CPUs available in the system.
#max_procs:

# Configure local GeoIP database support.
# If no paths are not configured geoip is disabled.
#geoip:
Expand Down
4 changes: 4 additions & 0 deletions packetbeat/packetbeat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,10 @@ shipper:
# Internal queue size for single events in processing pipeline
#queue_size: 1000

# Sets the maximum number of CPUs that can be executing simultaneously. The
# default is the number of logical CPUs available in the system.
#max_procs:

# Configure local GeoIP database support.
# If no paths are not configured geoip is disabled.
#geoip:
Expand Down
4 changes: 4 additions & 0 deletions topbeat/topbeat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,10 @@ shipper:
# Internal queue size for single events in processing pipeline
#queue_size: 1000

# Sets the maximum number of CPUs that can be executing simultaneously. The
# default is the number of logical CPUs available in the system.
#max_procs:

# Configure local GeoIP database support.
# If no paths are not configured geoip is disabled.
#geoip:
Expand Down
4 changes: 4 additions & 0 deletions winlogbeat/winlogbeat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,10 @@ shipper:
# Internal queue size for single events in processing pipeline
#queue_size: 1000

# Sets the maximum number of CPUs that can be executing simultaneously. The
# default is the number of logical CPUs available in the system.
#max_procs:

# Configure local GeoIP database support.
# If no paths are not configured geoip is disabled.
#geoip:
Expand Down