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

reduce memory required for logmon, docker_logger and executor processes #6341

Merged
merged 2 commits into from
Sep 18, 2019
Merged
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
11 changes: 9 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,15 @@ import (
"strings"
"text/tabwriter"

// These packages have init() funcs which check os.Args and drop directly
// into their command logic. This is because they are run as seperate
// processes along side of a task. By early importing them we can avoid
// additional code being imported and thus reserving memory
_ "github.com/hashicorp/nomad/client/logmon"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe add a comment explaining these lines and their utility?

_ "github.com/hashicorp/nomad/drivers/docker/docklog"
_ "github.com/hashicorp/nomad/drivers/shared/executor"

"github.com/hashicorp/nomad/command"
"github.com/hashicorp/nomad/drivers/docker/docklog"
"github.com/hashicorp/nomad/version"
"github.com/mattn/go-colorable"
"github.com/mitchellh/cli"
Expand Down Expand Up @@ -38,7 +45,7 @@ var (
"server-join",
"server-members",
"syslog",
docklog.PluginName,
"docker_logger",
}

// aliases is the list of aliases we want users to be aware of. We hide
Expand Down