I'm using semaphore to avoid AggregateException (Task was cancelled) and using processors count as a maxCount.
int processorCount = Environment.ProcessorCount;
var semaphore = new SemaphoreSlim(maxCount: processorCount, initialCount: processorCount);
But in this case it's running slowly (I'm making 1000 of I/O requests, but number of requests could increase up to 10 000 so need to be sure that I will don't have error, and I'm reading data from Redis and it takes 4,5 seconds with all side work), should I use available threads from threadpool or what value is a good practice to use as a maxCount when making asynchronous I/O requests?