I'm currently mining XMR on a dedicated server that has an Intel I7-4790K CPU. It has 4 cores/8 threads, and 8 MB of L3 cache. I'm using cpuminer-multi. This is a full node with the monero daemon running (I'm not sure whether this uses enough resources to decrease mining performance or not, maybe someone can tell me.)
I've been trying to figure out what the optimal number of threads is and have been researching it but can't find that much on it. Also, everyone says something different.
On some places I see that people recommend that the number of threads should ideally be the amount of L3 cache (in my case 8MB) divided by 2 (this would be 4 threads). Other people recommend that the number of threads be the same as the number of CPU cores (in my case 4).
What should I do? Does the number of threads actually make a difference? What is the default number of threads used if you don't specify it when you run cpuminer?
Just to give an idea, I have it currently running at 4 threads, with a hash rate of approximately 200 H/s. This number fluctuates quite a lot actually, but seems to mostly be between 200-300 H/s.