Benchmarking Network Data Transfers Paul Koufalis – White Star Software.

Slides:



Advertisements
Similar presentations
20.1 Chapter 20 Network Layer: Internet Protocol Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Advertisements

Some More Database Performance Knobs North American PUG Challenge
ProTop version 3 – An open source Progress database performance monitor ProTop is a free, Open Source database monitor for Progress OpenEdge databases.
ProTop version 3 – An open source Progress database performance monitor ProTop is a free, Open Source database monitor for Progress OpenEdge databases.
Numbers, We don’t need no stinkin’ numbers Adam Backman Vice President DBAppraise, Llc.
Internet Networking Spring 2003
CMPE 80N - Introduction to Networks and the Internet 1 CMPE 80N Winter 2004 Lecture 13 Introduction to Networks and the Internet.
Chapter 23: ARP, ICMP, DHCP IS333 Spring 2015.
Understanding Networks Charles Zangla. Network Models Before I can explain how connections are made from across the country, I would like to provide you.
Welcome To. Improving Remote File Transfer Speeds By The Solution For: %
© 2011 IBM Corporation 11 April 2011 IDS Architecture.
CS 6401 Internet Protocol Outline Introduction to Internet Protocol Header and address formats ICMP Tools.
Petrozavodsk State University, Alex Moschevikin, 2003NET TECHNOLOGIES Internet Control Message Protocol ICMP author -- J. Postel, September The purpose.
ICMP (Internet Control Message Protocol) Computer Networks By: Saeedeh Zahmatkesh spring.
1 Internetworking : Internet architecture and TCP/IP Protocol TK3133 Computer Networking Technology.
Lecture 2 TCP/IP Protocol Suite Reference: TCP/IP Protocol Suite, 4 th Edition (chapter 2) 1.
Web application architecture
Strength. Strategy. Stability.. Progress Performance Monitoring and Tuning Dan Foreman Progress Expert BravePoint BravePoint
Lecture#1 on Internet. Internet Addressing IP address: pattern of 32 or 128 bits often represented in dotted decimal notation IP address: pattern of 32.
Jozef Goetz, Application Layer PART VI Jozef Goetz, Position of application layer The application layer enables the user, whether human.
Transport Layer: TCP and UDP. Overview of TCP/IP protocols Comparing TCP and UDP TCP connection: establishment, data transfer, and termination Allocation.
TCP1 Transmission Control Protocol (TCP). TCP2 Outline Transmission Control Protocol.
© Jörg Liebeherr (modified by M. Veeraraghavan) 1 ICMP: A helper protocol to IP The Internet Control Message Protocol (ICMP) is the protocol used for error.
DONE-08 Sizing and Performance Tuning N-Tier Applications Mike Furgal Performance Manager Progress Software
1 Internet Control Message Protocol (ICMP) Used to send error and control messages. It is a necessary part of the TCP/IP suite. It is above the IP module.
Network Programming Eddie Aronovich mail:
Operating Systems Lecture 14 Segments Adapted from Operating Systems Lecture Notes, Copyright 1997 Martin C. Rinard. Zhiqing Liu School of Software Engineering.
Networking Basics CCNA 1 Chapter 11.
Lecture 4 Overview. Ethernet Data Link Layer protocol Ethernet (IEEE 802.3) is widely used Supported by a variety of physical layer implementations Multi-access.
1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Dynamic Host Configuration Protocol (DHCP)
IP addresses IPv4 and IPv6. IP addresses (IP=Internet Protocol) Each computer connected to the Internet must have a unique IP address.
Unit III Bandwidth Utilization: Multiplexing and Spectrum Spreading In practical life the bandwidth available of links is limited. The proper utilization.
Using Progress® Analytical Tools Adam Backman White Star Software DONE-05:
1 Connectivity with ARP and RARP. 2 There needs to be a mapping between the layer 2 and layer 3 addresses (i.e. IP to Ethernet). Mapping should be dynamic.
Internet Flow By: Terry Hernandez. Getting from the customers computer onto the internet Internet Browser
UDP : User Datagram Protocol 백 일 우
Ch. 23, 25 Q and A (NAT and UDP) Victor Norman IS333 Spring 2015.
Chapter 11 User Datagram Protocol
TCP - Part II.
Block 5: An application layer protocol: HTTP
Cleveland SQL Saturday Catch-All or Sometimes Queries
Chapter 19 Network Layer Protocols
Lecture 16: Data Storage Wednesday, November 6, 2006.
OpenEdge Standard Storage Areas
Packet Switching Datagram Approach Virtual Circuit Approach
Internet Networking Spring 2002
TCP/IP Transmission Control Protocol / Internet Protocol
Vocabulary Prototype: A preliminary sketch of an idea or model for something new. It’s the original drawing from which something real might be built or.
CT1303 LAN Rehab AlFallaj.
Lecture 2 Overview.
Encapsulation/Decapsulation
Internet Control Message Protocol (ICMP)
Topic 5: Communication and the Internet
Chapter 20 Network Layer: Internet Protocol
Optimizing Malloc and Free
Internet Control Message Protocol (ICMP)
TCP/IP Networking An Example
Multimedia and Networks
Chapter 20 Network Layer: Internet Protocol
Process-to-Process Delivery:
CS4470 Computer Networking Protocols
Direct Memory Access Disk and Network transfers: awkward timing:
Net 323 D: Networks Protocols
PART 5 Transport Layer.
Internet Control Message Protocol
CSE 313 Data Communication
Process-to-Process Delivery: UDP, TCP
ITIS 6167/8167: Network and Information Security
COMP755 Advanced Operating Systems
Cache writes and examples
Presentation transcript:

Benchmarking Network Data Transfers Paul Koufalis – White Star Software

2 Why listen to me? Progress DBA and UNIX admin since 1994 Expert consulting related to technical aspects of Progress and OpenEdge Wide range of experience Small 10 person offices to concurrent users AIX, HPUX, Linux, Windows…if Progress runs on it, I’ve worked on it Single malts and American bourbons

3  The oldest and most respected independent DBA consulting firm in the world  Four of the world’s top OpenEdge DBAs  Author of ProTop, the #1 FREE OpenEdge Database Monitoring Tool

4 Agenda  a little theory  tweakables  stupid programming tricks  numbers

5 a little bit of theory  Two basic database connection types Shared memory or self-service Client server  Shared memory is always going to be faster Self-service clients reach into shared memory and get the data themselves C/S clients have to ask a proxy process to do this for them –AND transport the data across a slow connection  Most legacy Progress code was written back in the ChUI days All shared memory Doesn’t necessarily port well to C/S

6 the (simplified) process  Progress 4GL client connects to the database broker through a service port (_mprosrv)  The broker assigns the client to a new or existing server (_mprosrv –m1)  Client submits query to server  Server executes query A server is a fancy shared memory client  Server returns data to client  Client does post-processing on data Ex.: Filtering and sorting  Data becomes available to program/user

7 the 4gl server process  OK – a little more than just a fancy shared memory client  Single-threaded process  Uses a polling mechanism to determine which connected clients need servicing  Uses a round-robin allocation algorithm to determine which client to service  Note: _sqlsrv2 is multi-threaded

8 tweakable parameters MTU -prefetch* -Mm

9 new –prefetch* parameters  No-lock queries  Forward only or scrolling  10.2B06 + and  -prefetchPriority: server defers poll for other requests while filling message Current suggested value 100 records added before next poll  -prefetchDelay: Fills first message. By default first message contains one record In theory this is better. In practice the difference is not significant  -prefetchNumRecs : How many records are stuffed in a message 100 records is a good start (default is 16)  -prefetchFactor: How full (%-wise) to fill a message %

10 message buffer size (-Mm)  Default 1024 is too small  Max doesn’t seem to be warranted  8192 is a nice sweet spot  Pre-11.6: clients and databases all had to have the same –Mm  11.6+: Client uses –Mm from database server: i.e. no more client-side –Mm required

11 maximum transmission unit (MTU)  A network parameter set at the NIC level  Enable on the routing infrastructure  Default is 1500  “Jumbo Frames” is 9000 bytes  The advantage lies in the relative size of network header data 1500 byte MTU: 1460 byte payload / 1538 byte total = 95% efficient 9000 byte MTU: 8960 byte payload / 9038 byte total = 99% efficient  Use ping to test Windows: ping –l 8900 –f Linux: ping –s 8900 –M do

12 Mm – MTU interaction  Progress generates a message of size –Mm  The message is submitted to the TCP/IP stack  Stack breaks the message up into MTU-sized bytes to ship across the network  Even if the originating NIC has an MTU of 9000, every switch and router between the client and server must support jumbo frames Otherwise the jumbo frame will be broken down into 1500 byte (or whatever MTU-size) packets

13 other parameters  -Mi / -Ma: min/max users per server  The more users per server, the less time the server can dedicate to any one user  -Mi 1 -Ma 5 is a good start  -Mi 1 -Ma 1 if you have heavy duty users AppServer agents  Note: _sqlsrv2 is multi-threaded

14 stupid programming tricks  Field lists: fields that are sent to the client  Why send the whole record if you don’t need it for each order fields (order-num terms) no-lock: for each order except (instructions) no-lock:  No-lock is the most important part of this  Without “no-lock” the server returns one record per message

15 stupid programming tricks  Thank Progress doesn’t send the LOB across the wire unless you ask for it  The LOB field is really a separate entity to the record  The real record only contains a pointer to the LOB  The LOB may be in another storage area (and should be)  When you access the LOB, the client requests it from the server

16 Monitoring Server Messages  _ActServer VST Key: _server-ID Interesting fields: _Server-ByteSent, _ServerMsgSent, _ServerRecSent Calculate send size (Bytes sent / messages sent) and compare to –Mm  Bug: When a record is larger than –Mm, only the first msg is counted I.e. if you send a 4K record and –Mm is 1024, only 1 msg and 1024 bytes sent recorded Blobs sent in 32,000 byte chunks – each chunk increments msgSent by 1 and byteSent by -Mm  ProTop Free:

17 enough already – you promised some numbers! A little info about the test DB:  Order table: 61K records (142K fragments) w/ mean size 5500 bytes Most of it in the instructions field  Customer table: 83 records w/ mean size 174 bytes Field custPDF is a 4.7 MB blob (a pdf)

18 baseline  _mprosrv sports –S 5000 –B –Mi 1 –Ma 15 –Mn 2 –Mpb 1 All users on the same server -B big enough so that all data is in memory – i.e. disk does not come into play  10 concurrent _progres connections running “for each customer” 10K times  Our goal is to minimize network messages  Using ProTop Free to monitor server activity (

19 baseline  for each customer: 3m30s  for each customer no-lock: 2 min

20 Using field lists  for each customer fields (cust-num name) no-lock: 1m15s  -Mm 8192: 1m15s

21 adding prefetch  -prefetchDelay: 1m15s  + -prefetchNumRecs 100: 55s

22 …prefetch  -prefetchNumRecs 300: 55s  -prefetchFactor 100 –prefetchNumrecs 16: 1m15s

23 increasing -Mm  -Mm (no prefetch params): 1m15s  -prefetchNumRecs 100: 59s

24 adding prefetchDelay  + -prefetchDelay  Notice the reduced message count: 3272 msg/sec vs msgs/sec Why?  So why didn’t average message size change with –Mm ?

25 send the whole 174 byte record  Same 57 seconds:  But now sending 15K per message  83 records X 174 bytes = 14.5K

26 using order (61K records)…  No prefetch  One single user running “for each order no-lock …” 10 times  29 sec  With prefetch: 29 sec – WAIT ? WHAT ?

27 lobs  -Mm makes a difference for lobs  Send 83 customer 4.7 MB each  -prefetchDelay –prefetchNumRecs 100  -Mm 1024: 11 sec  -Mm 16384: 4 sec  -Mm 32600: 3.5 sec  With lobs, the prefetch params didn’t make much difference Server sends bytes at a time