Client network performance with a join

Posted by willer on 10-Dec-2014 12:21

Hello,

still trying to get a bit faster.

Everybody knows moving to a client network environment plugs in the tcp/ip layer between client and server.

My analyzes shows that the prefetch mechanism works very fine and quite as fast as a local "tcp/ip" connection with -Mm 16384 on one table. In the following tests I select only 1280 records.

The sample data contains for each customer exactly 357 bytes and every customer has one order record with 59 bytes. 

On a for each customer no-lock  I get  547 tcp/ip packets  with 515113 bytes transmitted. The time of 430 ms is relative here,  as all tests were over a WLAN.  Is O.K.

On a for each oder no-lock I get  167 tcp/ip packets  with 112600 bytes  (time 100 ms).

Now you guess, the for each customer no-lock, first order of customer no-lock  transmits  5700 tcp/ip packets with 1517576 bytes (13500 ms). I see between each order a packet (268 bytes) which is processed at the server for about 3ms.  

Is it possible to explain what happens there and how to improve that. 

Or 

Is it possible to enhance the prefetch mechanism, that the client is sending requests disregarding server replies, and the server collects the request (prefetch) until a packet is filled up with requested data?  

Or do you have a solution how to select child table, when the primary table criteria is not possible to filter on child table?

Thank you

Regards

 

All Replies

Posted by Rod Anderson on 10-Dec-2014 12:33

Willer,

Take a look at this kbase( knowledgebase.progress.com/.../p120701 ) .  I think it will explain your behavior.

R

Posted by TheMadDBA on 10-Dec-2014 12:38

See knowledgebase.progress.com/.../p120701

Basically when you do a join Progress doesn't pack as many records into a single message.

Posted by Mike Fechner on 10-Dec-2014 12:47

Hi Peter,
 
this is really one of the cases where you should convince your client to introduce an AppServer. The AppServer allows much better to transmit parent/child record I a single ProDataset.
 
Mike
Von: willer [mailto:bounce-willer@community.progress.com]
Gesendet: Mittwoch, 10. Dezember 2014 19:22
An: TU.OE.General@community.progress.com
Betreff: [Technical Users - OE General] Client network performance with a join
 
Thread created by willer

Hello,

still trying to get a bit faster.

Everybody knows moving to a client network environment plugs in the tcp/ip layer between client and server.

My analyzes shows that the prefetch mechanism works very fine and quite as fast as a local "tcp/ip" connection with -Mm 16384 on one table. In the following tests I select only 1280 records.

The sample data contains for each customer exactly 357 bytes and every customer has one order record with 59 bytes. 

On a for each customer no-lock  I get  547 tcp/ip packets  with 515113 bytes transmitted. The time of 430 ms is relative here,  as all tests were over a WLAN.  Is O.K.

On a for each oder no-lock I get  167 tcp/ip packets  with 112600 bytes  (time 100 ms).

Now you guess, the for each customer no-lock, first order of customer no-lock  transmits  5700 tcp/ip packets with 1517576 bytes (13500 ms). I see between each order a packet (268 bytes) which is processed at the server for about 3ms.  

Is it possible to explain what happens there and how to improve that. 

Or 

Is it possible to enhance the prefetch mechanism, that the client is sending requests disregarding server replies, and the server collects the request (prefetch) until a packet is filled up with requested data?  

Or do you have a solution how to select child table, when the primary table criteria is not possible to filter on child table?

Thank you

Regards

 

Stop receiving emails on this subject.

Flag this post as spam/abuse.

Posted by willer on 10-Dec-2014 12:47

Yes, I see this.

The idea was, that somebody enhance the performance in client server communication with the prerequisite that all fields needed and no appserver available.

So, remove the pause in the server code and do the prefetch better.

I don't want to copy each table separately into a temp-table on a client side and do the join there.  

Posted by Mike Fechner on 10-Dec-2014 12:54

Have you tried a smaller -Mm value already? As you are seeing many smaller packages, that might change things.

Posted by TheMadDBA on 10-Dec-2014 12:56

I wouldn't hold my breath waiting for more client-server improvements. You can enter an enhancement request here and see what happens.

SQL style server side joins that return result sets would be nice... so would 4GL stored procedures that run on the database side. I don't see either of those showing up since they haven't in the last 20 years.

Your only realistic choices are to use AppServer or remote desktops that are on the same local network as the database.

Posted by ChUIMonster on 10-Dec-2014 13:08

You could view app servers as 4gl stored procedures ;)

On 12/10/14, 1:56 PM, TheMadDBA wrote:
Reply by TheMadDBA

I wouldn't hold my breath waiting for more client-server improvements. You can enter an enhancement request here and see what happens.

SQL style server side joins that return result sets would be nice... so would 4GL stored procedures that run on the database side. I don't see either of those showing up since they haven't in the last 20 years.

Your only realistic choices are to use AppServer or remote desktops that are on the same local network as the database.

Stop receiving emails on this subject.

Flag this post as spam/abuse.



-- 
Tom Bascom
603 396 4886
tom@greenfieldtech.com

Posted by TheMadDBA on 10-Dec-2014 13:13

Progress certainly does :)

Posted by Thomas Mercer-Hursh on 10-Dec-2014 13:13

Only better because it is a full application layer which can be deployed on the DB server or replicated on multiple other servers as need be.

Posted by willer on 10-Dec-2014 13:15

Hi Mike,

I analyzed the packets myself by human reading. It is as small as possible. Smaller -Mm didn't help here. But at least with the -Mm 16384 the first table was prefetched here quite good.

Posted by willer on 10-Dec-2014 13:22

Don't move away from the Problem 8-) .

I need "only"  1280 customers with their first order. Do I need to wait 13 seconds or do I have to by an AppServer, Replication and NameServer Loadbalancer to get it in 1 second?

Posted by TheMadDBA on 10-Dec-2014 13:23

Thomas I agree that AppServers provide additional functionality that pure stored procedures do not.

I would still love to have 4GL stored procedures and true database level triggers (not run on the client), but I have mostly given up on Progress implementing them.

Posted by Mike Fechner on 10-Dec-2014 13:24

Well Peter, you should discuss an enhancement request with your folks in Bedford ;-)
Von: willer [mailto:bounce-willer@community.progress.com]
Gesendet: Mittwoch, 10. Dezember 2014 20:23
An: TU.OE.General@community.progress.com
Betreff: RE: [Technical Users - OE General] Client network performance with a join
 
Reply by willer

Don't move away from the Problem 8-) .

I need "only"  1280 customers with their first order. Do I need to wait 13 seconds or do I have to by an AppServer, Replication and NameServer Loadbalancer to get it in 1 second?

Stop receiving emails on this subject.

Flag this post as spam/abuse.

Posted by TheMadDBA on 10-Dec-2014 13:29

>> Don't move away from the Problem 8-) .

:-)

We aren't moving away from the problem... just trying to tell you the current solutions that are available through the 4GL.

With proper code and design you can get excellent performance with AppServers even across a WAN.

Running client server across a WAN will be painful at best.

Posted by Thomas Mercer-Hursh on 10-Dec-2014 13:30

While there are things that I want from AppServers that I haven't gotten yet, triggers is not one of them.  Triggers were a sop to try to boost performance back in the days before layered applications.  These days, we want the layers and it is far better to put all of the data access logic for any given table in one place so that one can tell what is happening.

Posted by TheMadDBA on 10-Dec-2014 13:38

I agree that some people misuse triggers and put way too much business logic into the triggers. This happens much less often in Oracle because the triggers can't just be overridden at the session level. It is either enabled or disabled for everyone.

There are still valid uses of table and field level triggers that you just want to happen all of the time no matter who is doing the update and how they are connected to the database. You can make the argument that a properly designed application with data layers would do the same thing.... but you and I know that the vast majority of applications (especially written in Progress) do not fit that mold.

Posted by Thomas Mercer-Hursh on 10-Dec-2014 13:42

I see triggers as another way for someone to do it wrong...

Posted by willer on 10-Dec-2014 14:00

Thank you all for the comments,

I of course know the current "workarounds", but I hope someone get touched to solve this piece of performance problem.

My preferred way (remember, No AppServer, all fields needed) currently would be to copy each table individualy to temp-tables on the client and join it there. This is faster, than the server process. Funny isn't it?

Posted by tbergman on 10-Dec-2014 14:15

13 seconds for a join like that seems very slow to me. I did a similar CS query (limited to 1300 records, two tables) on one of our development databases and it took about 2 seconds the first time, less than a second each time after that.

I don't consider this environment to be particularly fast.

Is there something unusual about these tables? The indexes? The network?

Posted by TheMadDBA on 10-Dec-2014 14:21

The Good Doctor: Just because people can use things improperly doesn't mean that they are bad. I have seen more mangled where clauses than I care to remember... I would not like to get rid of where clauses though ;-)

The 13 seconds were across a WLAN (which I took to mean WAN) as it not a network local to the server. Latency across a WAN is going to be much worse than a local network.

Posted by Mike Fechner on 10-Dec-2014 14:26

“I see triggers as another way for someone to do it wrong...”

 
Aren’t you always seeing that someone is doing it wrong? ;-)

Posted by willer on 10-Dec-2014 14:29

That's right,

I took WLAN to see the difference more easy. At least it was not too bad with 10MBit/s. But don't forget all data could be delivered within 1 second separately, but it takes 13 s in a join.

Posted by willer on 10-Dec-2014 14:34

Oh the triggers,

yes these test's with the trigger were also funny. But these tests are without triggers, after I removed them.

Posted by Thomas Mercer-Hursh on 10-Dec-2014 16:27

To be sure, just because something can be misused is no reason to eliminate the feature ... statics, for example.  The point is that I see no reason to use the triggers here at all, so I don't want people to even think about the possibility.

Posted by TheMadDBA on 10-Dec-2014 16:35

Indeed... Got a little off topic talking about triggers. Stored procedures could be a nice solution for his network issues though.

AppServer obviously works but the pricing scares off some shops.

Posted by Marko Myllymäki on 15-Dec-2014 03:34

I have also struggled with client/server performance issues and logged enhancement requests for better networking performance, stored procedures and real database triggers among others:

community.progress.com/.../add_server-side_joins__better_networking_performance.aspx

community.progress.com/.../real_database_triggers_and_stored_procedures_abl.aspx

I have also talked directly with Progress people trying to convince them to implement these things but they have not given me much hope. I always get the same answer: use AppServer.  In our case with a large existing application, it is practically impossible to make it fully AppServer-enabled. And another fact is that most of our customers are small or medium sized companies, for them the additional cost of AppServer is often too much.

If we can't get better client/server performance without AppServer, I think we should at least have an easier way to adopt AppServer. Ideally, programs would be AppServer-enabled without changing code. So, when you have "for each customer, each order of customer" in your code, the client automatically sends the query to AppServer (if it's available) and gets resulting data in a temp-table/prodataset. 

Posted by Thomas Mercer-Hursh on 15-Dec-2014 10:21

Note that AppServer + WebClient would end less than the cost of Client Networking.

This thread is closed