December 12, 2002 at 2:29 am
Network packet size.
Default is 4096 (OLEDB and SQL server)
However in
http://www.microsoft.com/technet/treeview/default.asp?url=/technet/prodtechn
ol/sql/reskit/sql2000/part3/c1161.asp
MS says:
A packet size larger than the 4,096-byte default may improve efficiency by
lowering the network reads and writes. A packet size of 8,080 bytes is best
for performance in SQL Server 2000 and SQL Server 7.0.
Why then isnt the default 8080?
Is it really 8080 and not 8192?
Should I always set packet size = 8080 (8192) in all connections in all
applications?
Is a network packet size of 4096 bad because if an IP packet is 4096 it means that a SQLserver TDS-packet will always be split into two IPpackets because of the IPheader?
/m
December 12, 2002 at 8:00 am
quote:
Why then isnt the default 8080?
Default values are picked for situations that work in 99.99% of installations. You are allowed to override them for your specific situation. Aren't you glad you're not locked into one size fits all solutions
December 12, 2002 at 8:04 am
quote:
quote:
Why then isnt the default 8080?Default values are picked for situations that work in 99.99% of installations. You are allowed to override them for your specific situation. Aren't you glad you're not locked into one size fits all solutions
hehehehe (Just playing with the knobs on that reply.)
December 12, 2002 at 12:39 pm
This always confused me too until I started working on building my own server application. I am sure SQL is wrapped in MFC quite tightly and one method in C++ under MFC is WSASend. This completely wraps the packet in the Win OS Networking layer. I actually use a packet size of 50000 bytes to submit. WSASend will send to the driver and break into the largest packet available for my network (which is 4K). When it gets to the other end the packet is assembled and returned to me for the most part as was before (little extra to do there). I believe the suggestion of using 8080 is 1, there is header information so you don't really want to send to little or the packet is fragemented oddly and more work is done in the Network layer, but also not 8192 for reasons related to a page size. Technically the idea is you can send one page of data in a go. This is good for rows that are the full page long or datasets where the rows are smaller as it will process a page at the time worth of data. I may be slightly off on this but I am pretty sure it is close to that reasoning.
Added, just remembered. The page size is limited to 8060 (which Steve or Brian did an article on exploreing this in detail). And I believe there is a rule somewhere about 20 bytes for header information when using TCP/IP connectivity.
Edited by - antares686 on 12/12/2002 2:27:45 PM
December 12, 2002 at 11:57 pm
quote:
Added, just remembered. The page size is limited to 8060 (which Steve or Brian did an article on exploreing this in detail). And I believe there is a rule somewhere about 20 bytes for header information when using TCP/IP connectivity.
Would that mean than the default 4096 should really be (4096 - 20), otherwise I get oddly split package?
December 13, 2002 at 4:38 am
Possibly, I am trying to find that documentation to verify. It may be I am thinking of the MaxMTU units in the registry.
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply