Tiny fix WASM test errors on machines with many cores (#15992)
This commit is contained in:
@@ -26,13 +26,13 @@ impl Default for WasmRuntimeConfig {
|
|||||||
let default_thread_pool_size = std::thread::available_parallelism()
|
let default_thread_pool_size = std::thread::available_parallelism()
|
||||||
.map(|n| n.get())
|
.map(|n| n.get())
|
||||||
.unwrap_or(4)
|
.unwrap_or(4)
|
||||||
.max(1);
|
.clamp(1, 4);
|
||||||
|
|
||||||
Self {
|
Self {
|
||||||
max_memory_pages: 1024, // 64MB
|
max_memory_pages: 1024, // 64MB
|
||||||
max_execution_time_ms: 1000, // 1 seconds
|
max_execution_time_ms: 1000, // 1 seconds
|
||||||
max_stack_size: 1024 * 1024, // 1MB
|
max_stack_size: 1024 * 1024, // 1MB
|
||||||
thread_pool_size: default_thread_pool_size, // based on cpu count
|
thread_pool_size: default_thread_pool_size, // based on cpu count and capped
|
||||||
module_cache_size: 10, // Cache up to 10 modules per worker
|
module_cache_size: 10, // Cache up to 10 modules per worker
|
||||||
max_body_size: 10 * 1024 * 1024, // 10MB
|
max_body_size: 10 * 1024 * 1024, // 10MB
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user