# an Arvados node that hasn't been updated for this long.
node_stale_after = 14400
+# Scaling factor to be applied to nodes' available RAM size. Usually there's a
+# variable discrepancy between the advertised RAM value on cloud nodes and the
+# actual amount available.
+# If not set, this value will be set to 0.95
+node_mem_scaling = 0.95
+
# File path for Certificate Authorities
certs_file = /etc/ssl/certs/ca-certificates.crt
# an Arvados node that hasn't been updated for this long.
node_stale_after = 14400
+# Scaling factor to be applied to nodes' available RAM size. Usually there's a
+# variable discrepancy between the advertised RAM value on cloud nodes and the
+# actual amount available.
+# If not set, this value will be set to 0.95
+node_mem_scaling = 0.95
+
# File path for Certificate Authorities
certs_file = /etc/ssl/certs/ca-certificates.crt
# an Arvados node that hasn't been updated for this long.
node_stale_after = 14400
+# Scaling factor to be applied to nodes' available RAM size. Usually there's a
+# variable discrepancy between the advertised RAM value on cloud nodes and the
+# actual amount available.
+# If not set, this value will be set to 0.95
+node_mem_scaling = 0.95
+
# File path for Certificate Authorities
certs_file = /etc/ssl/certs/ca-certificates.crt
servlist = self.calculate(servcalc, {'min_ram_mb_per_node': 121})
self.assertEqual(1, len(servlist))
+ def test_custom_node_mem_scaling_factor(self):
+ # Simulate a custom 'node_mem_scaling' config parameter by passing
+ # the value to ServerCalculator
+ servcalc = self.make_calculator([1], node_mem_scaling=0.5)
+ servlist = self.calculate(servcalc, {'min_ram_mb_per_node': 128})
+ self.assertEqual(0, len(servlist))
+ servlist = self.calculate(servcalc, {'min_ram_mb_per_node': 64})
+ self.assertEqual(1, len(servlist))
+
def test_implicit_server_count(self):
servcalc = self.make_calculator([1])
servlist = self.calculate(servcalc, {}, {'min_nodes': 3})