WCF Throttle Settings

I am working on a proof of concept using WCF and MSMQ. I played with throttle settings using the default values โ€‹โ€‹of This Article , and also adding my own settings to the configuration file. I have 2 Quad Core Xeon processors working with this application. No matter what settings I apply, it always appears only to capture 8 messages at a time (which corresponds to my processing kernels). I want each of the messages to be processed in one transaction, so that this could be part of the problem ... not sure. I believe that it will process much more messages at the same time than it is.

Service Behavior:

[ServiceBehavior(UseSynchronizationContext = true, ReleaseServiceInstanceOnTransactionComplete=true, ConcurrencyMode = ConcurrencyMode.Single, InstanceContextMode = InstanceContextMode.PerCall)] 

Endpoint behavior:

  <endpointBehaviors> <behavior name="endpointBehavior"> <transactedBatching maxBatchSize="1" /> </behavior> </endpointBehaviors> 

My own throttling service:

 <serviceThrottling maxConcurrentCalls="128" maxConcurrentSessions="800" /> 

Am I missing something? Maybe I just don't quite understand the default settings / user settings of the throttle (probably).

EDIT

I changed the ConcurrencyMode parameter (changed by several) along with the ReleaseServiceInstanceOnTransactionComplete parameter. Changing to Multiple didn't change anything?

EDIT Perhaps this is a TransactionBatch parameter? I have it set to one ...?

Thanks,

S

+6
source share
2 answers

I found a blog that pointed me to good WCF throttling / performance documentation. I added some more metadata to my processing application and was able to get the performance I was looking for. By adding more information to my process (ManagedThreadID, etc.), I could see that I was getting a lot more bandwidth than I originally thought. I also found some of the blog tips below to help.

Blog

Thanks,

S

+4
source

Since you are running PerCall instancing, you must increase MaxConcurrentInstances . Even in .Net 4, the default value is 26. In 4.5 "The default value is the sum of the default value of MaxConcurrentSessions and the default value of MaxConcurrentCalls .."

BTW ... WCF will call your instance on multiple threads if you are not using InstanceContextMode.PerCall. InstanceContextMode.PerCall + Any ConcurrencyMode = N simultaneous method calls in N service instances, where N is determined by the service throttle Link

0
source

Source: https://habr.com/ru/post/905216/


All Articles