mirror of
https://github.com/wassname/ray.git
synced 2026-06-29 04:27:27 +08:00
Provide flag for setting redis maxclients. (#1257)
* Add flag for attempting to increase ulimit -n and the redis maxclients. * Don't bother trying to set ulimit -n. * Fix linting. * Add basic test.
This commit is contained in:
committed by
Philipp Moritz
parent
7fc2ddbaf7
commit
0b4961b161
@@ -51,6 +51,9 @@ def cli():
|
||||
@click.option("--num-redis-shards", required=False, type=int,
|
||||
help=("the number of additional Redis shards to use in "
|
||||
"addition to the primary Redis shard"))
|
||||
@click.option("--redis-max-clients", required=False, type=int,
|
||||
help=("If provided, attempt to configure Redis with this "
|
||||
"maximum number of clients."))
|
||||
@click.option("--object-manager-port", required=False, type=int,
|
||||
help="the port to use for starting the object manager")
|
||||
@click.option("--num-workers", required=False, type=int,
|
||||
@@ -75,8 +78,8 @@ def cli():
|
||||
@click.option("--huge-pages", is_flag=True, default=False,
|
||||
help="enable support for huge pages in the object store")
|
||||
def start(node_ip_address, redis_address, redis_port, num_redis_shards,
|
||||
object_manager_port, num_workers, num_cpus, num_gpus,
|
||||
num_custom_resource, head, no_ui, block, plasma_directory,
|
||||
redis_max_clients, object_manager_port, num_workers, num_cpus,
|
||||
num_gpus, num_custom_resource, head, no_ui, block, plasma_directory,
|
||||
huge_pages):
|
||||
# Note that we redirect stdout and stderr to /dev/null because otherwise
|
||||
# attempts to print may cause exceptions if a process is started inside of
|
||||
@@ -120,6 +123,7 @@ def start(node_ip_address, redis_address, redis_port, num_redis_shards,
|
||||
num_gpus=num_gpus,
|
||||
num_custom_resource=num_custom_resource,
|
||||
num_redis_shards=num_redis_shards,
|
||||
redis_max_clients=redis_max_clients,
|
||||
include_webui=(not no_ui),
|
||||
plasma_directory=plasma_directory,
|
||||
huge_pages=huge_pages)
|
||||
@@ -147,6 +151,9 @@ def start(node_ip_address, redis_address, redis_port, num_redis_shards,
|
||||
if num_redis_shards is not None:
|
||||
raise Exception("If --head is not passed in, --num-redis-shards "
|
||||
"must not be provided.")
|
||||
if redis_max_clients is not None:
|
||||
raise Exception("If --head is not passed in, --redis-max-clients "
|
||||
"must not be provided.")
|
||||
if no_ui:
|
||||
raise Exception("If --head is not passed in, the --no-ui flag is "
|
||||
"not relevant.")
|
||||
|
||||
Reference in New Issue
Block a user