views:

49

answers:

1

Hi there!

Did anyone experience or know of negative side effects from having a high service instance count like 60k? Aside from the memory consumption of course.

I am planning to increase the threshold for the maximum allowed instance count in our production environments. I am basically sick of severe production incidents just because "something" forgot to close a proxy properly.

I plan to go to something like 60k instances which will allow the service to survive using default session timeouts at a call rate average for our clients.

The throttling settings would be:

  • maxConcurrentCalls = 100
  • maxConcurrentSessions = 60000
  • maxConcurrentInstances = 60000
  • InstanceContextMode = PerSession

Thanks, Alex

+2  A: 

The default concurrent instances is Unlimited. 60k will make no difference.

When you aren't applying throttling to your service, the defaults are

•maxConcurrentCalls = 16
•maxConcurrentSessions = 10
•maxConcurrentInstances = Unlimited

There are multiple ways to apply throttling and expanding the defaults but all of that depends on your InstanceContext, Concurrency, and Session modes? Based on these answsers there are optimal configuration settings I can suggest.

I cover some of this in my article on ESB through WCF / Trottling Here

UPDATE:

Thanks for your response. Per Session is fine. There is a good article on optimizing your WCFService Here

They recommend changing your settings to slightly higher than 16 * the number of CPUs. Since you are using per session, You should set your ConcurrentCalls to 1-3% of your Concurrent Instances.

So let's say you have 8 Cores in your Server. I would recommend a starting point your settings on a per session service like so:

<serviceThrottling maxConcurrentCalls="6"
  maxConcurrentInstances="200"
  maxConcurrentSessions="200"/>

This should eliminate your problems w/ clients not closing connections, especially if you are currently using the default of 10 sessions. You server should be able to handle much much more, but 60k is probably overkill. You can test and increase as needed. It all depends on the power of the box and what else you are using it for.

Based on these settings if you need to grow further you can monitor performance and see if you can increase them, otherwise, you could easily scale out to more servers and Load balance.

Hope this helps... happy Coding

CkH
Thanks for that! My instance mode is PerSession and I would adjust my session throttle accordingly to make sense out of the whole story.
Alex
"if you need to grow further" - yes, I need to because a misbehaving client will exhaust 200 sessions in about 20seconds while the SessionIdleManager only aborts the channel every 10mins I think. "you can monitor performance" - that's specifically what I meant to ask if anybody observed performance hits etc. with high instance counts.
Alex
Sounds like you have some clients you need to disable. If they are going to lockup 200 sessions, then they will lock up any number you increase to. I have done performance tuning on services before, but without knowing what your environment is, I cannot give you the optimal numbers. If it is a powerful server and nothing else needs resources on it, then you can jack it up to the max. Sorry I was trying teach a man to fish.
CkH
You are right. This is against "bad" clients. I just want a configuration so my service survives the time until I found out who that bad guy is. Why 60k? I anticipate 10 calls per second and the idle timeout is 10min. That means that the client will not be able to fill up sessions before the idle manager starts cleaning up after him. And I should have time to hunt the bad boy. I also agree that this heavily depends on hardware etc. I was just wondering if there are experiences like "JESUS NO! This will allocate resource ABC as well!" or "If you use binding XYZ there is another throttle!" etc.
Alex
+1: anyways for the greate detail certain helping otherfolks coming along!
Alex