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:
Robert Nishihara
2017-11-26 18:25:55 -08:00
committed by Philipp Moritz
parent 7fc2ddbaf7
commit 0b4961b161
4 changed files with 50 additions and 6 deletions
+7 -1
View File
@@ -193,13 +193,19 @@ class StartRayScriptTest(unittest.TestCase):
"--num-gpus", "100"])
subprocess.Popen(["ray", "stop"]).wait()
# Test starting Ray with the max redis clients specified.
subprocess.check_output(["ray", "start", "--head",
"--redis-max-clients", "100"])
subprocess.Popen(["ray", "stop"]).wait()
# Test starting Ray with all arguments specified.
subprocess.check_output(["ray", "start", "--head",
"--num-workers", "20",
"--redis-port", "6379",
"--object-manager-port", "12345",
"--num-cpus", "100",
"--num-gpus", "0"])
"--num-gpus", "0",
"--redis-max-clients", "100"])
subprocess.Popen(["ray", "stop"]).wait()
# Test starting Ray with invalid arguments.