MCPcopy Create free account
hub / github.com/apache/impala / _compute_defaults

Function _compute_defaults

docker/test-with-docker.py:224–269  ·  view source on GitHub ↗

Compute default config options based on memory. The goal is to work reasonably on machines with about 60GB of memory, like Amazon's c4.8xlarge (36 CPUs, 60GB) or c5.9xlarge (36 CPUs, 72GB) or m4.4xlarge (16 CPUs, 64 GB). Based on some experiments, we set up defaults for different machine

()

Source from the content-addressed store, hash-verified

222
223
224def _compute_defaults():
225 """Compute default config options based on memory.
226
227 The goal is to work reasonably on machines with
228 about 60GB of memory, like Amazon's c4.8xlarge (36 CPUs, 60GB)
229 or c5.9xlarge (36 CPUs, 72GB) or m4.4xlarge (16 CPUs, 64 GB).
230
231 Based on some experiments, we set up defaults for different
232 machine sizes based on memory, with an eye towards
233 having reasonable runtimes as well.
234
235 Experiments on memory usage:
236
237 suite parallelism usage
238 Xmx memlimit
239 ee-test-parallel 4GB 8 5GB 33GB
240 ee-test-parallel 4GB 16 7GB 37GB
241 ee-test-serial 4GB - 5GB 18GB
242 cluster-test 4GB - - 13GB
243 be-test 4GB - 10GB 19GB
244 fe-test 4GB - 10GB 9GB
245 """
246 total_memory_gb = monitor.total_memory()
247 cpus = multiprocessing.cpu_count()
248 logging.info("CPUs: %s Memory (GB): %s", cpus, total_memory_gb)
249
250 parallel_test_concurrency = min(cpus, 8)
251 memlimit_gb = 8
252
253 if total_memory_gb >= 140:
254 suite_concurrency = 6
255 memlimit_gb = 11
256 parallel_test_concurrency = min(cpus, 12)
257 elif total_memory_gb >= 95:
258 suite_concurrency = 5
259 memlimit_gb = 11
260 parallel_test_concurrency = min(cpus, 12)
261 elif total_memory_gb >= 65:
262 suite_concurrency = 3
263 elif total_memory_gb >= 35:
264 suite_concurrency = 2
265 else:
266 logging.warning("This tool should be run on a machine with more memory.")
267 suite_concurrency = 1
268
269 return parallel_test_concurrency, suite_concurrency, memlimit_gb * 1024 * 1024 * 1024
270
271class Suite(object):
272 """Encapsulates a test suite.

Callers 1

mainFunction · 0.85

Calls 1

minFunction · 0.85

Tested by

no test coverage detected