36
Best Practices for AppServers & WebSpeed Operation Dan Foreman Progress Expert, BravePoint

Best Practices for AppServers & WebSpeed Operation Dan Foreman Progress Expert, BravePoint

Embed Size (px)

Citation preview

Page 1: Best Practices for AppServers & WebSpeed Operation Dan Foreman Progress Expert, BravePoint

Best Practices for AppServers & WebSpeed

Operation

Dan ForemanProgress Expert, BravePoint

Page 2: Best Practices for AppServers & WebSpeed Operation Dan Foreman Progress Expert, BravePoint

Introduction – Dan Foreman

• Progress User since 1984• Author of several publications & utilities• Publications

– Progress Performance Tuning Guide– Progress Database Administration Guide– Progress Virtual System Tables– Progress V10 DBA Jumpstart

• Utilities– ProMonitor – Database monitoring– ProCheck – AppServer/WebSpeed monitoring– Pro Dump&Load – Dump/load with minimum downtime– Balanced Benchmark – Load testing tool

Page 3: Best Practices for AppServers & WebSpeed Operation Dan Foreman Progress Expert, BravePoint

Glossary/Terminology

• AS = AppServer• WS = WebSpeed Agent• Progress Explorer – the original graphical

tool for managing AS, WS, and other processes

• OpenEdge Explorer – replacement for Progress Explorer starting in V10.2; shares the same interface as OpenEdge Management

Page 4: Best Practices for AppServers & WebSpeed Operation Dan Foreman Progress Expert, BravePoint

Starting & Stopping – Command Line or GUI

• Advantages of GUI (i.e. Progress/OpenEdge Explorer)– Easy to use– Can easily access resources on multiple

servers– Safer way to edit the ubroker.properties

file although using mergeprop is a safe way to manually edit the properties files

Page 5: Best Practices for AppServers & WebSpeed Operation Dan Foreman Progress Expert, BravePoint

Starting & Stopping – Command Line or GUI

• Disadvantages of GUI– Some attributes are not ‘visible’ (no

check box or fill in) although they can be referenced by using a parameter (.pf) file

– In Progress Explorer right-clicking can be dangerous if your finger or mouse slips

Page 6: Best Practices for AppServers & WebSpeed Operation Dan Foreman Progress Expert, BravePoint

Starting & Stopping – Command Line or GUI

• Advantages of Command Line– Scriptable– Repeatable– Better logging

• Disadvantages of Command Line– Sometimes not as easy to talk someone

through on the phone– Primitive method (in the eyes of some)

Page 7: Best Practices for AppServers & WebSpeed Operation Dan Foreman Progress Expert, BravePoint

Mode of Operation

• StateAware• StateReset• Stateless• StateFree

Page 8: Best Practices for AppServers & WebSpeed Operation Dan Foreman Progress Expert, BravePoint

StateAware & StateReset

• The Advantage of StateAware/StateReset is that the AppServer maintains application context. This is because each user of an application is bound to and locks a single Appserver for the duration an "Application Session". This binding is also the main disadvantage since it means that it is necessary to spawn one AppServer for each active user, which leads to the consumption of more OS resources and potentially more licenses

Page 9: Best Practices for AppServers & WebSpeed Operation Dan Foreman Progress Expert, BravePoint

Stateless & StateFree

• Stateless and StateFree are shared by multiple Clients and should only be locked by a Client for a very short period of time. Since a single AS/WS can service many Clients (with well written code), this mode of operation is very scalable and the most widely used; The disadvantage is that the Application must be written to maintain user context

Page 10: Best Practices for AppServers & WebSpeed Operation Dan Foreman Progress Expert, BravePoint

Performance Tuning

• AS & WS are Progress Clients just like GUI and CHUI 4GL/ABL Clients and use the same tuning parameters

Page 11: Best Practices for AppServers & WebSpeed Operation Dan Foreman Progress Expert, BravePoint

Performance Tuning

• Quick Request (-q)– Trim all AppServers when implementing

new code• Execution Buffer (-mmax <big>)

– The default of 3072k is usually too small for AS & WS

– Use a minimum of 8192-16384

Page 12: Best Practices for AppServers & WebSpeed Operation Dan Foreman Progress Expert, BravePoint

Performance Tuning

• Sorting (-TB 31 -TM 32)– The Progress documentation

recommends –TB 24 but 24 has slower performance than 31

Page 13: Best Practices for AppServers & WebSpeed Operation Dan Foreman Progress Expert, BravePoint

Performance Tuning

• Temp Table Buffers (-Bt <big>)– Most AS/WS applications make heavy use

of Temp Tables

• Temp Table DB Blocksize (-tmpbsize #)– Set explicitly because the default value has

changed multiple times

Page 14: Best Practices for AppServers & WebSpeed Operation Dan Foreman Progress Expert, BravePoint

Performance Tuning

• Message Size (-Mm)– Somewhat tricky to implement because it

must be used on both the AS/WS and the database(s) that the AS/WS connects to

– Good performance improvement with NO-LOCK reads

– Recommend 4096 or 8192

Page 15: Best Practices for AppServers & WebSpeed Operation Dan Foreman Progress Expert, BravePoint

Performance Tuning

• Message Compression (-mc)– Best gains seen over a WAN or a very slow

LAN connection

Page 16: Best Practices for AppServers & WebSpeed Operation Dan Foreman Progress Expert, BravePoint

Performance Tuning

• Shared Procedure Libraries (sometimes called Memory Mapped Procedure Libraries)– To ‘unload’ and make updates to the

library, it may be necessary to trim all of the AS & WS

– Main benefits are for large scale AS/WS sites

Page 17: Best Practices for AppServers & WebSpeed Operation Dan Foreman Progress Expert, BravePoint

Performance Tuning

• For best performance, AS and WS should normally reside on the same server as the Database

Page 18: Best Practices for AppServers & WebSpeed Operation Dan Foreman Progress Expert, BravePoint

Other Parameters

• -rereadnolock– Extremely important for AS and WS– Numerous Kbase entries describe this

parameter

Page 19: Best Practices for AppServers & WebSpeed Operation Dan Foreman Progress Expert, BravePoint

Do I want to talk to the Name Server?

• Depending upon the Mode of operation & programming model used, AS & WS calls might need to communicate with the Name Server

• Performance can be improved by stopping this ‘conversation’ by using the –DirectConnect parameter

Page 20: Best Practices for AppServers & WebSpeed Operation Dan Foreman Progress Expert, BravePoint

Do I want to talk to the Name Server?

• Disadvantages of -DirectConnect– No AS Load Balancing– No AS Failover– The Connection port is hardcoded

Page 21: Best Practices for AppServers & WebSpeed Operation Dan Foreman Progress Expert, BravePoint

Logging

• Can be set for all or individual AS/WS• Logging level can be dynamically

changed in OE 10.2B

Page 22: Best Practices for AppServers & WebSpeed Operation Dan Foreman Progress Expert, BravePoint

Logging

• Higher logging levels can – Degrade performance– Cause the logs to grow quickly– The increased ‘verbosity’ can make it

difficult to find what you are looking for when there are problems

• Lower logging levels can make it difficult to troubleshoot problems

Page 23: Best Practices for AppServers & WebSpeed Operation Dan Foreman Progress Expert, BravePoint

Logging

• In general the Server log is the first place to look when troubleshooting

Page 24: Best Practices for AppServers & WebSpeed Operation Dan Foreman Progress Expert, BravePoint

Monitoring Options

• Graphical– Progress Explorer – V10.1 and earlier– OpenEdge Explorer – V10.2 and later– OpenEdge Management – AS/WS

capabilities added in late V10

Page 25: Best Practices for AppServers & WebSpeed Operation Dan Foreman Progress Expert, BravePoint

Monitoring Options

• Command Line– asbman– wtbman

• Other– Actional – a Progress product– ProCheck – from BravePoint

Page 26: Best Practices for AppServers & WebSpeed Operation Dan Foreman Progress Expert, BravePoint

What to Monitor

• Memory utilization– Java memory utilization– Memory utilization of _progres &

_proapsv processes– Memory leaks caused by code that

doesn’t cleanup after itself are magnified on AS & WS

Page 27: Best Practices for AppServers & WebSpeed Operation Dan Foreman Progress Expert, BravePoint

What to Monitor

• WebSpeed– Should never see LOCKED– Send an Alert if there are no AVAILABLE

Agents– Average Request Duration (importance is

dependent upon the WS mode of operation)– Average Request Wait (importance is

dependent upon the WS mode of operation)

Page 28: Best Practices for AppServers & WebSpeed Operation Dan Foreman Progress Expert, BravePoint

What to Monitor

• AppServer– If an AS shows as SENDING, that is usually R-

Code execution– Send an Alert if there are no AVAILABLE

Agents– Average Request Duration (importance is

dependent upon the AS mode of operation)– Average Request Wait (importance is

dependent upon the AS mode of operation)

Page 29: Best Practices for AppServers & WebSpeed Operation Dan Foreman Progress Expert, BravePoint

Miscellaneous Tips

• Use separate AppServer Brokers for ASYNC and SYNC calls

• In proxyGen there is a choice of adding the procedure as persistent or non-persistent. In order to ensure the best performance out of WebServices, it is a good idea to configure the procedures as non-persistent. Otherwise you may find your StateFree AppServers all locked by just a few users

Page 30: Best Practices for AppServers & WebSpeed Operation Dan Foreman Progress Expert, BravePoint

New Admin Features in V10.1B

• “Smart Connections” (10.1B) – Improved connection procedure connection (e.g. failure) reporting from the connection procedure

• Life Span (10.1B) - shutdown/restart AS/WS after a specified period of time– serverLifespan=0– serverLifespanPadding=5

Page 31: Best Practices for AppServers & WebSpeed Operation Dan Foreman Progress Expert, BravePoint

New Admin Features in V10.2A

• List AppServer Connections (10.2A) – show a list of connections to an AS/WS– Examples on the next two slides

Page 32: Best Practices for AppServers & WebSpeed Operation Dan Foreman Progress Expert, BravePoint

List AppServer Connections

>asbman -i asbroker1 –listclients

ConnHdl User Rmt IP Rmt Port State ------- ---- ------ -------- ----- 2 127.0.0.1 1203 CONNECTED 4 127.0.0.1 1217 CONNECTED

Page 33: Best Practices for AppServers & WebSpeed Operation Dan Foreman Progress Expert, BravePoint

List AppServer Connections

> asbman -i asbroker1 -clientdetail 2

conn hdl= 2 user name= remote addr= 127.0.0.1 remote port= 1203 connection state= CONNECTED conn ID= 10.0.0.77::asbroker1::3090::<snip> request count= 1 agent PID= 2176 agent port= 2002

Page 34: Best Practices for AppServers & WebSpeed Operation Dan Foreman Progress Expert, BravePoint

New Admin Features in V10.2B

• ASK - AppServer KeepAlive - (10.2B)– appServerKeepaliveCapabilities=denyClien

tASK,denyServerASK– serverASKActivityTimeout=60– serverASKResponseTimeout=60

• Dynamic Properties (10.2B)• AutoStop on Timeout (10.2B) – Limit the

amount of time given to an operation

Page 35: Best Practices for AppServers & WebSpeed Operation Dan Foreman Progress Expert, BravePoint

New Admin Features in V10.2B

• Actional Monitoring (10.2B) – Use Actional to monitor AS/WS in addition to other resources in an SOA environment

Page 36: Best Practices for AppServers & WebSpeed Operation Dan Foreman Progress Expert, BravePoint

Conclusion

• Thank you for coming• Contact Info for Dan Foreman

– Telephone +1 541 754 2116– Email [email protected]