Subject Re: Throttling on Intel network cards slowing Firebird down
Author hvlad
--- In firebird-support@yahoogroups.com, Maya Opperman <maya@...> wrote:
>
> Hi,
>
> (Forgive me for lack of info here, but I will try to explain as best I can, with what I know, as this is second hand information)
>
> We had a site where just one of our app's functions, on just one of the client machine's was very slow. The rest were all fine.
>
> After no luck resolving the problem ourselves, we had a technical person go out to the site, and they found some kind of a setting on the Intel network card's driver to throttle the speed, if there was too many connections. The card was apparently using the default setting.
>
> Technical person's explanation of the problem:
> "I never came across this problem before in all my years . Basically the client spawns many network requests to the server is individual requests, closing the connection and opening it again. This is almost like a connection per line of data. Somehow you need to change the behaviour to stop it opening and closing a connection for each line of data being request and rather keep using the same connection. This will reduce network overhead and most likely improve performance. "

Probably it is described here

ftp://download.intel.com/design/network/applnots/ap450.pdf

if yes, than i should say that it have nothing common with "closing the connection and opening it again". It is about huge amount of packets per second and remembers me "TCP no delay" option. In two words, network card tried to lower number of interrupts per second (i.e. generates it not for every received packet but in batches) to make less CPU load. It could result in delays in individual packets processing if HW intellect is not perfect.

> Question
>
> What I am trying to find out (so I can address the issue) is, is this:
>
> - a network card problem (ie. a bad choice of network card?)

AFAIU, it was fixed using some settings at NIC driver ?

> - a firebird design problem? (an upgrade to a newer firebird version perhaps?)

2.1 at both client and server is a best choice

> - a firebird settings / configuration problem?

No

> - a problem with the component set I am using? (FIBPlus and Delphi 2010)

I doubt it (see below)

> - a problem with my app doing something silly?

You can make your app better (see below)

> More Info
>
> Execution of a single large SQL statement that returns many rows, is perfectly fine.
>
> What is slow is this:
>
> - Start Transaction
>
> - execute SQL query to read order master
>
> - execute SQL query to read all order lines

Ok, so far

> - for each order line, execute SQL query to pick up latest cost price

This is very expensive. Since you know order you read you can read latest cost prices for every line using one common query. More, you can even combine this info with previous query, i.e. read all order lines and latest cost price together.


> Any idea of where to start looking, would be greatly appreciated.

Hope this helps,
Vlad