mirror of
https://github.com/wassname/ray.git
synced 2026-06-29 03:37:20 +08:00
Add option to evict keys LRU from the sharded redis tables (#3499)
* wip * wip * format * wip * note * lint * fix * flag * typo * raise timeout * fix * optional get * fix flag * increase timeout in test * update docs * format
This commit is contained in:
committed by
Philipp Moritz
parent
0136af5aac
commit
cffe8f9806
@@ -116,6 +116,22 @@ def cli(logging_level, logging_format):
|
||||
type=int,
|
||||
help="the maximum amount of memory (in bytes) to allow the "
|
||||
"object store to use")
|
||||
@click.option(
|
||||
"--redis-max-memory",
|
||||
required=False,
|
||||
type=int,
|
||||
help=("The max amount of memory (in bytes) to allow redis to use, or None "
|
||||
"for no limit. Once the limit is exceeded, redis will start LRU "
|
||||
"eviction of entries. This only applies to the sharded "
|
||||
"redis tables (task and object tables)."))
|
||||
@click.option(
|
||||
"--collect-profiling-data",
|
||||
default=True,
|
||||
type=bool,
|
||||
help=("Whether to collect profiling data. Note that "
|
||||
"profiling data cannot be LRU evicted, so if you set "
|
||||
"redis_max_memory then profiling will also be disabled to prevent "
|
||||
"it from consuming all available redis memory."))
|
||||
@click.option(
|
||||
"--num-workers",
|
||||
required=False,
|
||||
@@ -202,11 +218,11 @@ def cli(logging_level, logging_format):
|
||||
def start(node_ip_address, redis_address, redis_port, num_redis_shards,
|
||||
redis_max_clients, redis_password, redis_shard_ports,
|
||||
object_manager_port, node_manager_port, object_store_memory,
|
||||
num_workers, num_cpus, num_gpus, resources, head, no_ui, block,
|
||||
plasma_directory, huge_pages, autoscaling_config,
|
||||
no_redirect_worker_output, no_redirect_output,
|
||||
plasma_store_socket_name, raylet_socket_name, temp_dir,
|
||||
internal_config):
|
||||
redis_max_memory, collect_profiling_data, num_workers, num_cpus,
|
||||
num_gpus, resources, head, no_ui, block, plasma_directory,
|
||||
huge_pages, autoscaling_config, no_redirect_worker_output,
|
||||
no_redirect_output, plasma_store_socket_name, raylet_socket_name,
|
||||
temp_dir, internal_config):
|
||||
# Convert hostnames to numerical IP address.
|
||||
if node_ip_address is not None:
|
||||
node_ip_address = services.address_to_ip(node_ip_address)
|
||||
@@ -262,6 +278,8 @@ def start(node_ip_address, redis_address, redis_port, num_redis_shards,
|
||||
redis_port=redis_port,
|
||||
redis_shard_ports=redis_shard_ports,
|
||||
object_store_memory=object_store_memory,
|
||||
redis_max_memory=redis_max_memory,
|
||||
collect_profiling_data=collect_profiling_data,
|
||||
num_workers=num_workers,
|
||||
cleanup=False,
|
||||
redirect_worker_output=not no_redirect_worker_output,
|
||||
|
||||
Reference in New Issue
Block a user