From 57d7457da522af3ae0c61304ed0d97eca258258f Mon Sep 17 00:00:00 2001 From: Vlad Brezae Date: Sat, 10 Jun 2017 01:33:09 +0300 Subject: [PATCH] [sgen] Use logical cpu count for number of workers It actually leads to better performance. The downside is the creation of more sgen workers. This is currently capped at 8. --- mono/sgen/sgen-gc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/mono/sgen/sgen-gc.c b/mono/sgen/sgen-gc.c index 66eb9ab194b..ed48b8eb665 100644 --- a/mono/sgen/sgen-gc.c +++ b/mono/sgen/sgen-gc.c @@ -3435,8 +3435,7 @@ sgen_gc_init (void) if (major_collector.is_concurrent || sgen_minor_collector.is_parallel) { int num_workers = 1; if (major_collector.is_parallel || sgen_minor_collector.is_parallel) { - /* FIXME Detect the number of physical cores, instead of logical */ - num_workers = mono_cpu_count () / 2; + num_workers = mono_cpu_count (); if (num_workers < 1) num_workers = 1; } -- 2.25.1