mirror of
https://github.com/Caraxi/mare.server.git
synced 2025-12-13 22:14:15 +01:00
increase available IO threads in the pool
This commit is contained in:
parent
31cf7964a4
commit
8f7b652eaa
1 changed files with 6 additions and 0 deletions
|
|
@ -18,6 +18,12 @@ namespace MareSynchronosServer
|
||||||
var hostBuilder = CreateHostBuilder(args);
|
var hostBuilder = CreateHostBuilder(args);
|
||||||
var host = hostBuilder.Build();
|
var host = hostBuilder.Build();
|
||||||
|
|
||||||
|
System.Threading.ThreadPool.GetMaxThreads(out int worker, out int io);
|
||||||
|
Console.WriteLine($"Before: Worker threads {worker}, IO threads {io}");
|
||||||
|
System.Threading.ThreadPool.SetMaxThreads(worker, 10000);
|
||||||
|
System.Threading.ThreadPool.GetMaxThreads(out int workerNew, out int ioNew);
|
||||||
|
Console.WriteLine($"After: Worker threads {workerNew}, IO threads {ioNew}");
|
||||||
|
|
||||||
using (var scope = host.Services.CreateScope())
|
using (var scope = host.Services.CreateScope())
|
||||||
{
|
{
|
||||||
var services = scope.ServiceProvider;
|
var services = scope.ServiceProvider;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue