Implement simple random spillback policy. (#1493)

* spillback policy implementation: global + local scheduler

* modernize global scheduler policy state; factor out random number engine and generator

* Minimal version.

* Fix test.

* Make load balancing test less strenuous.
This commit is contained in:
Alexey Tumanov
2018-02-13 00:09:35 -08:00
committed by Robert Nishihara
parent f2b6a7b58d
commit 844a6afcdd
9 changed files with 162 additions and 32 deletions
+7 -1
View File
@@ -80,6 +80,8 @@ class RayConfig {
int64_t L3_cache_size_bytes() const { return L3_cache_size_bytes_; }
int64_t max_tasks_to_spillback() const { return max_tasks_to_spillback_; }
private:
RayConfig()
: ray_protocol_version_(0x0000000000000000),
@@ -105,7 +107,8 @@ class RayConfig {
redis_db_connect_retries_(50),
redis_db_connect_wait_milliseconds_(100),
plasma_default_release_delay_(64),
L3_cache_size_bytes_(100000000) {}
L3_cache_size_bytes_(100000000),
max_tasks_to_spillback_(10) {}
~RayConfig() {}
@@ -179,6 +182,9 @@ class RayConfig {
/// TODO(rkn): These constants are currently unused.
int64_t plasma_default_release_delay_;
int64_t L3_cache_size_bytes_;
/// Constants for the spillback scheduling policy.
int64_t max_tasks_to_spillback_;
};
#endif // RAY_CONFIG_H