aurora-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject aurora git commit: Documenting dedicated job & quota relationship.
Date Mon, 21 Sep 2015 22:38:57 GMT
Repository: aurora
Updated Branches:
  refs/heads/master 88a6f249e -> 5627611d2


Documenting dedicated job & quota relationship.

Bugs closed: AURORA-1462

Reviewed at https://reviews.apache.org/r/38385/


Project: http://git-wip-us.apache.org/repos/asf/aurora/repo
Commit: http://git-wip-us.apache.org/repos/asf/aurora/commit/5627611d
Tree: http://git-wip-us.apache.org/repos/asf/aurora/tree/5627611d
Diff: http://git-wip-us.apache.org/repos/asf/aurora/diff/5627611d

Branch: refs/heads/master
Commit: 5627611d2f122737c4459ce4e96f8cc72d33ec6a
Parents: 88a6f24
Author: Maxim Khutornenko <maxim@apache.org>
Authored: Mon Sep 21 15:38:30 2015 -0700
Committer: Maxim Khutornenko <maxim@apache.org>
Committed: Mon Sep 21 15:38:30 2015 -0700

----------------------------------------------------------------------
 docs/README.md                     |   2 +-
 docs/client-commands.md            |   3 +-
 docs/configuration-reference.md    |   4 +-
 docs/configuration-tutorial.md     |   7 +-
 docs/deploying-aurora-scheduler.md |   3 +
 docs/resource-isolation.md         | 147 ----------------------------
 docs/resources.md                  | 164 ++++++++++++++++++++++++++++++++
 7 files changed, 173 insertions(+), 157 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/aurora/blob/5627611d/docs/README.md
----------------------------------------------------------------------
diff --git a/docs/README.md b/docs/README.md
index fe115dc..fdea212 100644
--- a/docs/README.md
+++ b/docs/README.md
@@ -23,7 +23,7 @@ We encourage you to ask questions on the [Aurora developer list](http://aurora.a
  * [Scheduler Storage](storage.md)
  * [Scheduler Storage and Maintenance](storage-config.md)
  * [SLA Measurement](sla.md)
- * [Resource Isolation and Sizing](resource-isolation.md)
+ * [Resource Isolation and Sizing](resources.md)
  * [Generating test resources](test-resource-generation.md)
 
 ## Developers

http://git-wip-us.apache.org/repos/asf/aurora/blob/5627611d/docs/client-commands.md
----------------------------------------------------------------------
diff --git a/docs/client-commands.md b/docs/client-commands.md
index f91e5df..9977b49 100644
--- a/docs/client-commands.md
+++ b/docs/client-commands.md
@@ -332,7 +332,8 @@ configuration file, and displays the parsed configuration.
     aurora quota get CLUSTER/ROLE
 
   Prints the production quota allocated to the role's value at the given
-cluster.
+cluster. Only non-[dedicated](deploying-aurora-scheduler.md#dedicated-attribute)
+[production](configuration-reference.md#job-objects) jobs consume quota.
 
 ### Finding a Job on Web UI
 

http://git-wip-us.apache.org/repos/asf/aurora/blob/5627611d/docs/configuration-reference.md
----------------------------------------------------------------------
diff --git a/docs/configuration-reference.md b/docs/configuration-reference.md
index 8d50c45..ba0dc86 100644
--- a/docs/configuration-reference.md
+++ b/docs/configuration-reference.md
@@ -294,7 +294,7 @@ ordering constraints.
 ### Resource Object
 
 Specifies the amount of CPU, Ram, and disk resources the task needs. See the
-[Resource Isolation document](resource-isolation.md) for suggested values and to understand
how
+[Resource Isolation document](resources.md) for suggested values and to understand how
 resources are allocated.
 
   param      | type    | description
@@ -325,7 +325,7 @@ Job Schema
   ```service``` | Boolean | If True, restart tasks regardless of success or failure. (Default:
False)
   ```max_task_failures``` | Integer | Maximum number of failures after which the task is
considered to have failed (Default: 1) Set to -1 to allow for infinite failures
   ```priority``` | Integer | Preemption priority to give the task (Default 0). Tasks with
higher priorities may preempt tasks at lower priorities.
-  ```production``` | Boolean |  Whether or not this is a production task backed by quota
(Default: False). Production jobs may preempt any non-production job, and may only be preempted
by production jobs in the same role and of higher priority. To run jobs at this level, the
job role must have the appropriate quota. To grant quota to a particular role in production,
operators use the ``aurora_admin set_quota`` command.
+  ```production``` | Boolean |  Whether or not this is a production task that may [preempt](resources.md#task-preemption)
other tasks (Default: False). Production job role must have the appropriate [quota](resources.md#resource-quota).
   ```health_check_config``` | ```heath_check_config``` object | Parameters for controlling
a task's health checks via HTTP. Only used if a  health port was assigned with a command line
wildcard.
   ```container``` | ```Container``` object | An optional container to run all processes inside
of.
   ```lifecycle``` | ```LifecycleConfig``` object | An optional task lifecycle configuration
that dictates commands to be executed on startup/teardown.  HTTP lifecycle is enabled by default
if the "health" port is requested.  See [LifecycleConfig Objects](#lifecycleconfig-objects)
for more information.

http://git-wip-us.apache.org/repos/asf/aurora/blob/5627611d/docs/configuration-tutorial.md
----------------------------------------------------------------------
diff --git a/docs/configuration-tutorial.md b/docs/configuration-tutorial.md
index d6e7c35..bbb1684 100644
--- a/docs/configuration-tutorial.md
+++ b/docs/configuration-tutorial.md
@@ -581,12 +581,7 @@ Three attributes deal with configuring the Job's Task:
     values.
 
 -   `production`: a Boolean, defaulting to `False`, specifying that this
-    is a production job backed by quota. Tasks from production Jobs may
-    preempt tasks from any non-production job, and may only be preempted
-    by tasks from production jobs in the same role with higher
-    priority. **WARNING**: To run Jobs at this level, the Job role must
-    have the appropriate quota. To grant quota to a particular role in
-    production, operators use the ``aurora_admin set_quota`` command.
+    is a [production](configuration-reference.md#job-objects) job.
 
 The final three Job attributes each take an object as their value.
 

http://git-wip-us.apache.org/repos/asf/aurora/blob/5627611d/docs/deploying-aurora-scheduler.md
----------------------------------------------------------------------
diff --git a/docs/deploying-aurora-scheduler.md b/docs/deploying-aurora-scheduler.md
index 2a46d2f..22a27f8 100644
--- a/docs/deploying-aurora-scheduler.md
+++ b/docs/deploying-aurora-scheduler.md
@@ -225,6 +225,9 @@ constraints are arbitrary and available for custom use.  There is one
exception,
 `dedicated` attribute.  Aurora treats this specially, and only allows matching jobs to run
on these
 machines, and will only schedule matching jobs on these machines.
 
+See the [section](resources.md#resource-quota) about resource quotas to learn how quotas
apply to
+dedicated jobs.
+
 ##### Syntax
 The dedicated attribute has semantic meaning. The format is `$role(/.*)?`. When a job is
created,
 the scheduler requires that the `$role` component matches the `role` field in the job

http://git-wip-us.apache.org/repos/asf/aurora/blob/5627611d/docs/resource-isolation.md
----------------------------------------------------------------------
diff --git a/docs/resource-isolation.md b/docs/resource-isolation.md
deleted file mode 100644
index 7e8d88d..0000000
--- a/docs/resource-isolation.md
+++ /dev/null
@@ -1,147 +0,0 @@
-Resource Isolation and Sizing
-=============================
-
-**NOTE**: Resource Isolation and Sizing is very much a work in progress.
-Both user-facing aspects and how it works under the hood are subject to
-change.
-
-- [Introduction](#introduction)
-- [CPU Isolation](#cpu-isolation)
-- [CPU Sizing](#cpu-sizing)
-- [Memory Isolation](#memory-isolation)
-- [Memory Sizing](#memory-sizing)
-- [Disk Space](#disk-space)
-- [Disk Space Sizing](#disk-space-sizing)
-- [Other Resources](#other-resources)
-
-## Introduction
-
-Aurora is a multi-tenant system; a single software instance runs on a
-server, serving multiple clients/tenants. To share resources among
-tenants, it implements isolation of:
-
-* CPU
-* memory
-* disk space
-
-CPU is a soft limit, and handled differently from memory and disk space.
-Too low a CPU value results in throttling your application and
-slowing it down. Memory and disk space are both hard limits; when your
-application goes over these values, it's killed.
-
-Let's look at each resource type in more detail:
-
-## CPU Isolation
-
-Mesos uses a quota based CPU scheduler (the *Completely Fair Scheduler*)
-to provide consistent and predictable performance.  This is effectively
-a guarantee of resources -- you receive at least what you requested, but
-also no more than you've requested.
-
-The scheduler gives applications a CPU quota for every 100 ms interval.
-When an application uses its quota for an interval, it is throttled for
-the rest of the 100 ms. Usage resets for each interval and unused
-quota does not carry over.
-
-For example, an application specifying 4.0 CPU has access to 400 ms of
-CPU time every 100 ms. This CPU quota can be used in different ways,
-depending on the application and available resources. Consider the
-scenarios shown in this diagram.
-
-![CPU Availability](images/CPUavailability.png)
-
-* *Scenario A*: the application can use up to 4 cores continuously for
-every 100 ms interval. It is never throttled and starts processing
-new requests immediately.
-
-* *Scenario B* : the application uses up to 8 cores (depending on
-availability) but is throttled after 50 ms. The CPU quota resets at the
-start of each new 100 ms interval.
-
-* *Scenario C* : is like Scenario A, but there is a garbage collection
-event in the second interval that consumes all CPU quota. The
-application throttles for the remaining 75 ms of that interval and
-cannot service requests until the next interval. In this example, the
-garbage collection finished in one interval but, depending on how much
-garbage needs collecting, it may take more than one interval and further
-delay service of requests.
-
-*Technical Note*: Mesos considers logical cores, also known as
-hyperthreading or SMT cores, as the unit of CPU.
-
-## CPU Sizing
-
-To correctly size Aurora-run Mesos tasks, specify a per-shard CPU value
-that lets the task run at its desired performance when at peak load
-distributed across all shards. Include reserve capacity of at least 50%,
-possibly more, depending on how critical your service is (or how
-confident you are about your original estimate : -)), ideally by
-increasing the number of shards to also improve resiliency. When running
-your application, observe its CPU stats over time. If consistently at or
-near your quota during peak load, you should consider increasing either
-per-shard CPU or the number of shards.
-
-## Memory Isolation
-
-Mesos uses dedicated memory allocation. Your application always has
-access to the amount of memory specified in your configuration. The
-application's memory use is defined as the sum of the resident set size
-(RSS) of all processes in a shard. Each shard is considered
-independently.
-
-In other words, say you specified a memory size of 10GB. Each shard
-would receive 10GB of memory. If an individual shard's memory demands
-exceed 10GB, that shard is killed, but the other shards continue
-working.
-
-*Technical note*: Total memory size is not enforced at allocation time,
-so your application can request more than its allocation without getting
-an ENOMEM. However, it will be killed shortly after.
-
-## Memory Sizing
-
-Size for your application's peak requirement. Observe the per-instance
-memory statistics over time, as memory requirements can vary over
-different periods. Remember that if your application exceeds its memory
-value, it will be killed, so you should also add a safety margin of
-around 10-20%. If you have the ability to do so, you may also want to
-put alerts on the per-instance memory.
-
-## Disk Space
-
-Disk space used by your application is defined as the sum of the files'
-disk space in your application's directory, including the `stdout` and
-`stderr` logged from your application. Each shard is considered
-independently. You should use off-node storage for your application's
-data whenever possible.
-
-In other words, say you specified disk space size of 100MB. Each shard
-would receive 100MB of disk space. If an individual shard's disk space
-demands exceed 100MB, that shard is killed, but the other shards
-continue working.
-
-After your application finishes running, its allocated disk space is
-reclaimed. Thus, your job's final action should move any disk content
-that you want to keep, such as logs, to your home file system or other
-less transitory storage. Disk reclamation takes place an undefined
-period after the application finish time; until then, the disk contents
-are still available but you shouldn't count on them being so.
-
-*Technical note* : Disk space is not enforced at write so your
-application can write above its quota without getting an ENOSPC, but it
-will be killed shortly after. This is subject to change.
-
-## Disk Space Sizing
-
-Size for your application's peak requirement. Rotate and discard log
-files as needed to stay within your quota. When running a Java process,
-add the maximum size of the Java heap to your disk space requirement, in
-order to account for an out of memory error dumping the heap
-into the application's sandbox space.
-
-## Other Resources
-
-Other resources, such as network bandwidth, do not have any performance
-guarantees. For some resources, such as memory bandwidth, there are no
-practical sharing methods so some application combinations collocated on
-the same host may cause contention.

http://git-wip-us.apache.org/repos/asf/aurora/blob/5627611d/docs/resources.md
----------------------------------------------------------------------
diff --git a/docs/resources.md b/docs/resources.md
new file mode 100644
index 0000000..27a2678
--- /dev/null
+++ b/docs/resources.md
@@ -0,0 +1,164 @@
+Resources and Sizing
+=============================
+
+- [Introduction](#introduction)
+- [CPU Isolation](#cpu-isolation)
+- [CPU Sizing](#cpu-sizing)
+- [Memory Isolation](#memory-isolation)
+- [Memory Sizing](#memory-sizing)
+- [Disk Space](#disk-space)
+- [Disk Space Sizing](#disk-space-sizing)
+- [Other Resources](#other-resources)
+- [Resource Quota](#resource-quota)
+- [Task Preemption](#task-preemption)
+
+## Introduction
+
+Aurora is a multi-tenant system; a single software instance runs on a
+server, serving multiple clients/tenants. To share resources among
+tenants, it implements isolation of:
+
+* CPU
+* memory
+* disk space
+
+CPU is a soft limit, and handled differently from memory and disk space.
+Too low a CPU value results in throttling your application and
+slowing it down. Memory and disk space are both hard limits; when your
+application goes over these values, it's killed.
+
+Let's look at each resource type in more detail:
+
+## CPU Isolation
+
+Mesos uses a quota based CPU scheduler (the *Completely Fair Scheduler*)
+to provide consistent and predictable performance.  This is effectively
+a guarantee of resources -- you receive at least what you requested, but
+also no more than you've requested.
+
+The scheduler gives applications a CPU quota for every 100 ms interval.
+When an application uses its quota for an interval, it is throttled for
+the rest of the 100 ms. Usage resets for each interval and unused
+quota does not carry over.
+
+For example, an application specifying 4.0 CPU has access to 400 ms of
+CPU time every 100 ms. This CPU quota can be used in different ways,
+depending on the application and available resources. Consider the
+scenarios shown in this diagram.
+
+![CPU Availability](images/CPUavailability.png)
+
+* *Scenario A*: the application can use up to 4 cores continuously for
+every 100 ms interval. It is never throttled and starts processing
+new requests immediately.
+
+* *Scenario B* : the application uses up to 8 cores (depending on
+availability) but is throttled after 50 ms. The CPU quota resets at the
+start of each new 100 ms interval.
+
+* *Scenario C* : is like Scenario A, but there is a garbage collection
+event in the second interval that consumes all CPU quota. The
+application throttles for the remaining 75 ms of that interval and
+cannot service requests until the next interval. In this example, the
+garbage collection finished in one interval but, depending on how much
+garbage needs collecting, it may take more than one interval and further
+delay service of requests.
+
+*Technical Note*: Mesos considers logical cores, also known as
+hyperthreading or SMT cores, as the unit of CPU.
+
+## CPU Sizing
+
+To correctly size Aurora-run Mesos tasks, specify a per-shard CPU value
+that lets the task run at its desired performance when at peak load
+distributed across all shards. Include reserve capacity of at least 50%,
+possibly more, depending on how critical your service is (or how
+confident you are about your original estimate : -)), ideally by
+increasing the number of shards to also improve resiliency. When running
+your application, observe its CPU stats over time. If consistently at or
+near your quota during peak load, you should consider increasing either
+per-shard CPU or the number of shards.
+
+## Memory Isolation
+
+Mesos uses dedicated memory allocation. Your application always has
+access to the amount of memory specified in your configuration. The
+application's memory use is defined as the sum of the resident set size
+(RSS) of all processes in a shard. Each shard is considered
+independently.
+
+In other words, say you specified a memory size of 10GB. Each shard
+would receive 10GB of memory. If an individual shard's memory demands
+exceed 10GB, that shard is killed, but the other shards continue
+working.
+
+*Technical note*: Total memory size is not enforced at allocation time,
+so your application can request more than its allocation without getting
+an ENOMEM. However, it will be killed shortly after.
+
+## Memory Sizing
+
+Size for your application's peak requirement. Observe the per-instance
+memory statistics over time, as memory requirements can vary over
+different periods. Remember that if your application exceeds its memory
+value, it will be killed, so you should also add a safety margin of
+around 10-20%. If you have the ability to do so, you may also want to
+put alerts on the per-instance memory.
+
+## Disk Space
+
+Disk space used by your application is defined as the sum of the files'
+disk space in your application's directory, including the `stdout` and
+`stderr` logged from your application. Each shard is considered
+independently. You should use off-node storage for your application's
+data whenever possible.
+
+In other words, say you specified disk space size of 100MB. Each shard
+would receive 100MB of disk space. If an individual shard's disk space
+demands exceed 100MB, that shard is killed, but the other shards
+continue working.
+
+After your application finishes running, its allocated disk space is
+reclaimed. Thus, your job's final action should move any disk content
+that you want to keep, such as logs, to your home file system or other
+less transitory storage. Disk reclamation takes place an undefined
+period after the application finish time; until then, the disk contents
+are still available but you shouldn't count on them being so.
+
+*Technical note* : Disk space is not enforced at write so your
+application can write above its quota without getting an ENOSPC, but it
+will be killed shortly after. This is subject to change.
+
+## Disk Space Sizing
+
+Size for your application's peak requirement. Rotate and discard log
+files as needed to stay within your quota. When running a Java process,
+add the maximum size of the Java heap to your disk space requirement, in
+order to account for an out of memory error dumping the heap
+into the application's sandbox space.
+
+## Other Resources
+
+Other resources, such as network bandwidth, do not have any performance
+guarantees. For some resources, such as memory bandwidth, there are no
+practical sharing methods so some application combinations collocated on
+the same host may cause contention.
+
+## Resource Quota
+
+Aurora requires resource quotas for
+[production non-dedicated jobs](configuration-reference.md#job-objects). Quota is enforced
at
+the job role level and when set, defines a non-preemptible pool of compute resources within
+that role.
+
+To grant quota to a particular role in production use `aurora_admin set_quota` command.
+
+NOTE: all job types (service, adhoc or cron) require role resource quota unless a job has
+[dedicated constraint set](deploying-aurora-scheduler.md#dedicated-attribute).
+
+## Task preemption
+
+Under a particular resource shortage pressure, tasks from
+[production](configuration-reference.md#job-objects) jobs may preempt tasks from any non-production
+job. A production task may only be preempted by tasks from production jobs in the same role
with
+higher [priority](configuration-reference.md#job-objects).
\ No newline at end of file


Mime
View raw message