By default, overprovisioned is not enabled on docker unless it is explicitly set. I have come to believe that this is a mistake. If the user is running alone in the machine, and there are no other processes pinned anywhere - including interrupts - not running overprovisioned is the best choice. But everywhere else, it is not: even if a user runs 2 docker containers in the same machine and statically partitions CPUs with --smp (but without cpuset) the docker containers will pin themselves to the same sets of CPU, as they are totally unaware of each other. It is also very common, specially in some virtualized environments, for interrupts not to be properly distributed - being particularly keen on being delivered on CPU0, a CPU which Scylla will pin by default. Lastly, environments like Kubernetes simply don't support pinning at the moment. This patch enables the overprovisioned flag if it is explicitly set - like we did before - but also by default unless --cpuset is set. Signed-off-by: Glauber Costa <glauber@scylladb.com> Message-Id: <20180331142131.842-1-glauber@scylladb.com>
20 lines
1.3 KiB
Python
20 lines
1.3 KiB
Python
import argparse
|
|
|
|
|
|
def parse():
|
|
parser = argparse.ArgumentParser()
|
|
parser.add_argument('--developer-mode', default='1', choices=['0', '1'], dest='developerMode')
|
|
parser.add_argument('--experimental', default=0, choices=['0', '1'])
|
|
parser.add_argument('--seeds', default=None, help="specify seeds - if left empty will use container's own IP")
|
|
parser.add_argument('--cpuset', default=None, help="e.g. --cpuset 0-3 for the first four CPUs")
|
|
parser.add_argument('--smp', default=None, help="e.g --smp 2 to use two CPUs")
|
|
parser.add_argument('--memory', default=None, help="e.g. --memory 1G to use 1 GB of RAM")
|
|
parser.add_argument('--overprovisioned', default=None, choices=['0', '1'],
|
|
help="run in overprovisioned environment. By default it will run in overprovisioned mode unless --cpuset is specified")
|
|
parser.add_argument('--listen-address', default=None, dest='listenAddress')
|
|
parser.add_argument('--broadcast-address', default=None, dest='broadcastAddress')
|
|
parser.add_argument('--broadcast-rpc-address', default=None, dest='broadcastRpcAddress')
|
|
parser.add_argument('--api-address', default=None, dest='apiAddress')
|
|
parser.add_argument('--disable-version-check', default=False, action='store_true', dest='disable_housekeeping', help="Disable version check")
|
|
return parser.parse_args()
|