locked
WCF with netNamedPipeBinding bad performance RRS feed

  • Question

  • I'm using a WCF service with netNamedPipeBinding to transfer a large amount of data (very long list of objects) to the client (which is on the same machine, off course). The problem is that it takes around 20 seconds for the entire call to transfer ~250MB of data, which is about 10+MB per second. I expected the transfer rates to be much much faster. The data is a very long list.Does anyone know how can I improve my performance and transfer rate? Here is my app.config file:

         <netNamedPipeBinding>
        <binding name="NetNamedPipeBinding_IDataService" closeTimeout="00:10:00"
          openTimeout="00:10:00" receiveTimeout="00:10:00" sendTimeout="00:10:00"
          transactionFlow="false" transferMode="Buffered" transactionProtocol="OleTransactions"
          hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="2147483647"
          maxBufferSize="2147483647" maxConnections="10" maxReceivedMessageSize="2147483647">
          <readerQuotas maxDepth="32" maxStringContentLength="2147483647" maxArrayLength="2147483647"
            maxBytesPerRead="4096" maxNameTableCharCount="2147483647" />
          <security mode="Transport">
            <transport protectionLevel="None" />
          </security>
        </binding>
      </netNamedPipeBinding>
    
    Thanks!

    Tuesday, January 31, 2012 11:45 AM

Answers

  • Omrit,

    You can use the MTOM message encoding, that will have a positive effect on performance. You can also use streaming... Which one is fater in your scenario should be tested.

    This MSDN page explains how to transfer large messages with WCF (MTOM and streaming).


    If this post answers your quenstion, please mark it as such. If this post is helpful, click 'Vote as helpful'.
    • Marked as answer by Yi-Lun Luo Friday, February 17, 2012 8:03 AM
    Wednesday, February 1, 2012 6:44 AM
  • Please take a look on this post. It shows results for various WCF bindings. The value of 20sec for 250MB is resonable. It is a bit slow, but it depends on many factors. Please take a look on this post. It will give you an idea how to tune your bindings: http://developers.de/blogs/damir_dobric/archive/2011/10/26/wcf-binding-performance-comparison-part-2.aspx.

    If all works fine you could make it faste up to 3-4 times.

     


    Damir Dobric
    developers.de
    daenet.de
    daenet.eu
    daenet.com
    • Marked as answer by Yi-Lun Luo Friday, February 17, 2012 8:03 AM
    Tuesday, January 31, 2012 9:20 PM

All replies

  • Please take a look on this post. It shows results for various WCF bindings. The value of 20sec for 250MB is resonable. It is a bit slow, but it depends on many factors. Please take a look on this post. It will give you an idea how to tune your bindings: http://developers.de/blogs/damir_dobric/archive/2011/10/26/wcf-binding-performance-comparison-part-2.aspx.

    If all works fine you could make it faste up to 3-4 times.

     


    Damir Dobric
    developers.de
    daenet.de
    daenet.eu
    daenet.com
    • Marked as answer by Yi-Lun Luo Friday, February 17, 2012 8:03 AM
    Tuesday, January 31, 2012 9:20 PM
  • Omrit,

    You can use the MTOM message encoding, that will have a positive effect on performance. You can also use streaming... Which one is fater in your scenario should be tested.

    This MSDN page explains how to transfer large messages with WCF (MTOM and streaming).


    If this post answers your quenstion, please mark it as such. If this post is helpful, click 'Vote as helpful'.
    • Marked as answer by Yi-Lun Luo Friday, February 17, 2012 8:03 AM
    Wednesday, February 1, 2012 6:44 AM