Search code examples
performancewcfwcf-bindingnetnamedpipebinding

Optimizing WCF NetNamedPipeBinding performance


I have a WCF named pipe service that receives a byte array and writes it into an SQLite DB. When I moved the SQLite insert logic into the WCF service the write performance decreased almost by half. I went through various recommendation online but nothing seems to help. My current configuration looks like this:

 pipeBinding.MaxBufferPoolSize = 5000000;
 pipeBinding.MaxBufferSize = 5000000;
 pipeBinding.MaxReceivedMessageSize = 5000000;
 pipeBinding.ReaderQuotas.MaxArrayLength = 5000000;
 pipeBinding.Security.Transport.ProtectionLevel = ProtectionLevel.None;             

More tweaking recommendations would be more than welcome.


Solution

  • Using protobuf helped increasing the speed however most consuming action was a sum action on the SQLite table so I had change the structure of my db.