• RV
    • Missy – My Home
    • JBAM – Newmar Dutch Star
    • Shaneeda
    • Buying a Used RV
    • Gas vs Diesel RVs
    • Ideal Motorhome
    • Choosing the Ideal RV
  • Cycling
  • Jeep
  • About
  • Flying
    • Vans RV-4
    • Daisy – RV-3B
  • Resources
  • Subscribe

JdFinley.com

Fulltime RV Living Adventures

  • Is Solar For You?
  • Gas vs Diesel RVs
  • Buying a Used RV
  • Choosing the Ideal RV
  • Ideal Motorhome

Buffer Size

July 19, 2011

Microsoft .Net VB C# ASP Computer Software DevelopmentBuffer Size??  Really??

I have spent a large portion of the last three weeks attempting to resolve a slow TCP Socket communication slowness problem.

This particular problem was between a Windows Service and multiple Windows Forms Applications.

Lots of network troubleshooting revealed nothing – neither did code reviews, gobs of debug, multi-threading research, and so forth. I finally worked my way down to about the lowest level possible and happened to notice that my the buffer that I was passing to the System.Net.Sockets.TcpClient.GetStream.BeginRead method was rather small. 1024 BYTES to be exact.

Finally, it dawned on me that this was BYTES.

I am passing some fairly large serialized objects around (hundreds of kilobytes and sometimes megabytes large). I could easily imagine that this would be a performance issue so I increased the buffer size and ta-da! SPEED!!!

So, my tip for today?? Do not be stingy with your receive buffer size.

(Visited 111 times, 1 visits today)

Related posts:

Default ThumbnailIsolated Storage Default ThumbnailObject Serialization (binary) Default ThumbnailSo you want to be a Developer? Default ThumbnailXML Serialization

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Life is a lemon and I want my money back.

— Meatloaf

Popular Posts

  • Powermatic Model 90 Wood Lathe & VFD
  • Wood Turning on a Lathe
  • Chainsaw Review: Sportsman 20 in. 52cc
  • Cielo Grande Barbed Wire Fence Repair

Email Notification


 

Posts by Subject

3DPrinting Aircraft Airstrip Bible Bus bus boys Camping Cat Computers Cycling Development Electrical electronics Entertainment Environment Factory Five family FAQ Finances flying Food God Health Holiday Home Humor kayak Life Maintenance Nature Photography Review RV-3 RV-4 sailboat sailing self improvement Sewing solar Travel Video weather wood woodworking X-Country

Posts by Month

© Copyright © 2025 JDFinley.com · All Rights Reserved · Privacy Policy

Unauthorized use and/or duplication of this material without express and written permission from this site’s author and/or owner is strictly prohibited. Excerpts and links may be used, provided that full and clear credit is given to JD Finley and JdFinley.com with appropriate and specific direction to the original content.