[Progress Communities] [Progress OpenEdge ABL] Forum Post: RE: Client Server Communication / Performance over TCP/IP 4

  • Thread starter Thread starter Marcelo Pacheco
  • Start date Start date
Status
Not open for further replies.
M

Marcelo Pacheco

Guest
Hi Ezaz, Far more important than the number of packets sent back and forth is the number of network round trips. I work full time from a place 7500km (~5000 miles) from the Bedford office. My ping to Bedford is 140-170ms. In my extreme case OE client/server connections over vpn can be painfully slow. The following benchmark demonstrates it (with -Mm 16384): DEF VAR i AS INT NO-UNDO. DEF VAR msg AS CHAR NO-UNDO FORMAT 'x(20)'. i = ETIME(YES). FOR EACH orderline NO-LOCK: END. DISPLAY 'prefetch' @ msg ETIME(YES) @ i. DOWN. FOR EACH orderline FIELDS(ordernum linenum) NO-LOCK: END. DISPLAY 'prefetch fields' @ msg ETIME(YES) @ i. DOWN. FOR EACH orderline NO-LOCK NO-PREFETCH: END. DISPLAY 'no-prefetch' @ msg ETIME(YES) @ i WITH DOWN. DOWN. FOR EACH orderline FIELDS(ordernum linenum) NO-LOCK NO-PREFETCH: END. DISPLAY 'no-prefetch fields' @ msg ETIME(YES) @ i WITH DOWN. DOWN. prefetch 7786 prefetch fields 4614 no-prefetch 2073000 no-prefetch fields 2038000 The first is a simple FOR EACH orderline NO-LOCK, taking 7.8 seconds. The second is a FOR EACH orderline NO-LOCK, taking 4.6 seconds, because 2 integer fields are sent. NO-PREFETCH tells OE to send only one row at a time, waiting for the client to ask for the next one each time. Notice that using FIELDS with NO-PREFETCH barely helps at all, cause what dominates is latency rather than the volume of information sent. Notice in my extreme case it takes half an hour to read the orderline table without prefetch and still non trivial 7.8 seconds to read it with prefetch. In your case you have a sub 1 ms latency, but let's assume your network latency is exactly 1 ms, if your processing is complex enough that it needs to wait for one million round trips, it would take a minimum of 1000 seconds to execute, because that time will be spent waiting on the network layer. There are plenty of things you can do on the ABL that will need to wait for a round trip per record, the most common one is using locking. Any SHARE-LOCK or EXCLUSIVE-LOCK access will always imply NO-PREFETCH. FIND statements always execute one row at a time. Use the OpenEdge profiler to analyze execution times and find out which statement(s) are taking the longest and try to optimize those. The -Mm parameter set to 16384 means OE can send up to 16KB at a time. Sending a full 16KB as a single message will require 12 unicast packets each way, but will count as a single network round trip. I suggest running this simple benchmark using your existing client/server machine pair and see how much different PREFETCH (default) vs NO-PREFETCH makes on your environment. Best Regards, Marcelo Pacheco

Continue reading...
 
Status
Not open for further replies.
Back
Top