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

Better examples for non-preset scaling args #1037

Merged
merged 2 commits into from Feb 24, 2017
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
22 changes: 22 additions & 0 deletions cmd/emp/scale.go
Expand Up @@ -25,6 +25,28 @@ Scale changes the quantity of dynos (horizontal scale) and/or the
dyno size (vertical scale) for each process type. Note that
changing dyno size will restart all dynos of that type.

size has two different formats, the first is the raw format,
which gives you more control over the settings:

<cpu_share>:<memory>

Examples:

# Scales the web process to one process that has 512 cpu
# shares and 1 gb of memory.
$ emp scale -a acme-inc web=1:512:1024mb

# Scales the web process to three processes that have
# 256 cpu shares and 2 gb of memory.
$ emp scale -a acme-inc web=3:256:2gb

The other format is a set of preset values:

1X: 256 cpu share, 512mb of memory
2X: 512 cpu share, 1024mb of memory
PX: 1024 cpu share, 6gb of memory


Options:

-l display the current scale
Expand Down
7 changes: 7 additions & 0 deletions docs/quickstart_using.md
Expand Up @@ -190,6 +190,13 @@ v3.web.e7eff5a8-f5d0-49fd-8af9-569f5f7dbddf 1X RUNNING 3m "acme-inc serv
v3.web.f6337ad7-2a24-4c36-a8fb-9253581a816d 1X RUNNING 3m "acme-inc server"
```

You'll notice that the scale of these processes is *1X*, which is shorthand for a CPU share of 256, and memory limited to 512mb. There are other presets (*2X*, *PX*), but you don't have to use those - you can instead specify exactly how much memory and cpu each process should get:

```console
$ emp scale -a acme-inc web=3:512:1024mb
Scaled acme-inc to web=3:512:1024mb.00.
```

Finally, since we're done with acme-inc, we can destroy it - removing all tasks associated with it, as well as any load balancers and internal service discovery hostnames:

```console
Expand Down