Skip to Content.
Sympa Menu

freetds - Re: [freetds] slow freetds-sybase perfromance - thorough test

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "James K. Lowden" <jklowden AT schemamania.org>
  • To: freetds AT lists.ibiblio.org
  • Subject: Re: [freetds] slow freetds-sybase perfromance - thorough test
  • Date: Sun, 9 Feb 2003 14:39:02 -0500

On Sun, 9 Feb 2003 12:53:39 -0600, Steve Langasek <vorlon AT netexpress.net>
wrote:
> On Sun, Feb 09, 2003 at 04:52:12PM +0200, Gad Hayisraeli wrote:
> > finally i see HUGE speed boost, after setting packet size to 2048 in
> > ASE server and freetds client + ASE odbc driver:
>
> > maybe a new topic:
> > ====================
> > i did my tests on local network, so i can choose large packet sizes ,
> > but if the ASE is on another lan/wan network, could i choose the same
> > size, although the tcp packet size is less than local network ?
> > (indeed i chose 2048 on local net, where the default tcp packet size
> > is 1500 ...)
>
> 1500 is not a "default packet size", it's an MTU -- the *maximum*
> transmission size possible for a packet that fits within a single
> ethernet frame on a 10Mbps or 100Mbps ethernet.
>
> Indeed, if freetds is sending 2048-byte packets, they *will* be
> fragmented on ethernet, so I'm not sure how using such large tcp packets
> will improve performance.

Here's a theory:

1. For Gad's data, some kinds of TDS packets don't fit in FreeTDS's
default packet size (512 bytes) but are less than 1024 bytes. That leads
to two roundtrips to the server, resulting in a severe throughput
degradation. Server or client, I don't know.

2. Packet fragmentation doesn't matter, especially on local Ethernets,
because the underlying OS is good at reassembling fragmented packets.
(I'm not sure "fragmentation" is the right term, actually. We don't have
tcp packets arriving in separate ip chunks. We have TDS packets arriving
as contiguous, unfragmented, in order, tcp packets. That's a very normal
tcp duty, transparent to the underlying layers.)

Supporting data:

1. Better performance with larger packets.
2. Microsoft servers set packet size to 4096 for bcp.
3. Delays in handling TDS packets lead to still further delays by the
server.

I'm pretty sure Microsoft's documentation advises using 4- or 8- kilobyte
TDS packets for most situations.

I realize Gad uses a Sybase server. I just happen to be a little more
familiar with Microsoft servers, and there may be similarities.

--jkl




Archive powered by MHonArc 2.6.24.

Top of Page