Anda di halaman 1dari 5

Tips for Maximum Performance

First is to have at least two machines for the test. The user interface consum
es significant resources so the RPT playback engine must run on a machine (agent
) separate from the workbench (UI).
Next is memory. To access maximum heap, after one successful test of any size,
look at the location (agent) attributes. There should be one called RPT_DEFAULT
_MEMORY_SIZE. If not, you can specify a maximum heap by creating a new attribut
e: RPT_VMARGS=-Xmx1500m (for example).
Windows XP & 2003 TCP/IP Tuning Recommendations
- On Windows drivers the limit is typically 5000 ports
- Use the netstat -a command to observe port usage during run
- If the largest number you see is 5000 then you have a problem!
- You can increase it by adding a registry entry
(need to reboot for it to take effect!)
- HKEY_LOCAL_MACHINE > SYSTEM > CurrentControlSet > Services > Tcpip > Para
meters > MaxUserPort
(dword, default is 5000, max is 65534)
Windows 7, 8, 2008 and Vista TCP/IP Tuning Recommendations
- Default dynamic port range changed
- New default start port is 49152 and default end port is 65535
16,384 ports (not 5000)
- Viewing the dynamic port range
Start Command Prompt and use the netsh command
netsh int ipv4 show dynamicport tcp
- Changing the dynamic port range for maximum number of ports allowed
netsh int ipv4 set dynamicport tcp start=1025 num=64510
Minimum start port is 1025 and maximum end port cannot exceed 65535
- Reboot not required
- See http://support.microsoft.com/kb/929851
Additional TCP/IP tuning recommendations:
HKEY_LOCAL_MACHINE > SYSTEM > CurrentControlSet > Services > Tcpip > Parame
ters > PARAMETER_NAME
MaxFreeTcbs
dword:00011940 (72000)
MaxHashTableSize
dword:0000ffff (65535)
TcpTimedWaitDelay
dword:0000001e (30)
TcpWindowSize
dword:0000ffff (65535)
EnableDynamicBacklog
dword:00000001 (1)
MinimumDynamicBacklog
dword:00000020 (20)
MaximumDynamicBacklog
dword:00001000 (4096)
DynamicBacklogGrowthDelta dword:00000010 (16)
Must reboot for these changes to take effect!
MaxFreeTcbs
Determines the number of TCP control blocks (TCBs) the system creates to
support active connections. Because each connection requires a control block,
this value determines how many active connections TCP can support
simultaneously.
Normally, TCP does not release a connection or reuse its resources until the
connection has remained closed for a period specified by the value of the
TcpTimedWaitDelay entry. This interval is known as the TIME_WAIT or
2MSL (2 x maximum segment lifetime) state. However, if the system is supporting
an unusually large number of connections and is running short of connection
resources, TCP releases the connection before the value stored in the

TcpTimedWaitDelay entry has expired.


The default value for this entry is determined both by the amount of physical
memory on the computer when TCP/IP starts and by the version of Windows running
on the computer, as shown in the following table.
MaxHashTableSize
Determines the size of the hash table in which TCP control blocks (TCBs)
are stored.
TCP stores control blocks in a hash table so it can find them very quickly.
If you adjust the number of TCBs the system creates (as specified by the value
of the MaxFreeTcbs entry), you should also adjust the value of this entry
proportionately.
TcpTimedWaitDelay
Determines the time that must elapse before TCP can release a closed connection
and reuse its resources. This interval between closure and release is known as
the TIME_WAIT state or 2MSL state. During this time, the connection can be
reopened at much less cost to the client and server than establishing a new
connection.
RFC 793 requires that TCP maintains a closed connection for an interval at
least equal to twice the maximum segment lifetime (2MSL) of the network.
When a connection is released, its socket pair and TCP control block (TCB) can
be used to support another connection. By default, the MSL is defined to be
120 seconds, and the value of this entry is equal to two MSLs, or 4 minutes.
However, you can use this entry to customize the interval.
Reducing the value of this entry allows TCP to release closed connections
faster, providing more resources for new connections. However, if the value is
too low, TCP might release connection resources before the connection is
complete, requiring the server to use additional resources to reestablish
the connection.
TcpWindowSize
Determines the largest TCP receive window that the system offers. The receive
window is the number of bytes a sender can transmit without receiving an
acknowledgment. This entry overrides TCP's negotiated maximum receive window
size and replaces it with the value of this entry.
TCP uses a receive window that is four times the size of the maximum TCP
segment size (MSS) negotiated during connection setup, up to a maximum size
of 64 KB. TCP for Windows 2000 also supports windows scaling, as detailed in
RFC 1323, TCP Extensions for High Performance. Scaling enables TCP to provide
a receive window of up to 1 GB.
For Ethernet networks, the default value of this entry is 0x4470 (17,520, or
12 segments of 1,460 bytes each). For other networks, the default value is
0xFFFF (65,535) unless 0xFFFF is larger than:
*Four times the maximum TCP data size on the network; and
*0x2000 (8,192) rounded up to an even multiple of the network TCP data size.
Connection backlog. If many connection attempts are received simultaneously,
increase the default number of pending connections that are supported by the
operating system.
EnableDynamicBacklog
If many connection attempts are received simultaneously allow pending

connections.
MinimumDynamicBacklog
Request a minimum 20 available pending connections.
MaximumDynamicBacklog
Request a maximum 1000 available pending connections.
DynamicBacklogGrowthDelta
The number of available connections is increased by 10 each time that there are
fewer than the minimum number of available connections.
TCP/IP Acknowledgements
TCP/IP can be the source of some significant remote method delays. You can
increase TCP performance by immediately acknowledging incoming TCP segments,
in all situations.
To immediately acknowledge incoming TCP segments on a server that runs a
Microsoft Windows XP or Windows Server 2003 operating system:
1. Start the Registry Editor (regedit.exe).
2. Locate and then click the following registry subkey: [may2010]
Windows XP
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfa
ces\
Windows Server 2003
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfa
ces\Interface_GUID\
3.
4.
5.
6.

On the Edit menu, click New > DWORD Value.


Name the new value, TcpAckFrequency, and assign it a value of 1.
Close the Registry Editor.
Restart your Windows operating system.

==============================================================================
Linux
Linux boxes need per process open file limit higher than 1024.
Changing Linux settings:
- Edit /etc/sysctl.conf specifying parameters and values below.
- Run sysctl -p
net.ipv4.ip_local_port_range
net.core.rmem_default
net.core.wmem_default
net.core.wmem_max
net.core.rmem_max
net.core.netdev_max_backlog
net.ipv4.tcp_no_metrics_save
net.ipv4.tcp_rmem
net.ipv4.tcp_wmem
net.core.optmem_max
net.ipv4.ip_local_port_range
TCP/IP port range.
net.core.rmem_default
Default O/S receive buffer size.

2048 65000
262144
262144
33554432
33554432
5000
1
4096 16777216 33554432
4096 16777216 33554432
40960

net.core.wmem_default
Default O/S send buffer size.
net.core.wmem_max
Maximum O/S send buffer size.
net.core.rmem_max
Maximum O/S receive buffer size.
net.core.netdev_max_backlog
Incoming packet receive backlog queue size.
net.ipv4.tcp_no_metrics_save
Value of 1 means have the O/S optimize TCP receive
window size dynamically between tcp_rmem and tcp_wmem.
net.ipv4.tcp_rmem
Receive window memory vector.
net.ipv4.tcp_wmem
Send window memory vector.
net.core.optmem_max
Maximum buffer size per socket.
==============================================================================
AIX
Changing AIX settings:
- no -p -o <parameter>=<value>
- chdev -l sys0 -a maxuproc=<value>
sb_max
clean_partial_conns
tcp_timewait
tcp_keepidle
tcp_keepinit
tcp_nodelayack
tcp_keepintvl
maxuproc
tcp_sendspace
tcp_recvspace
tcp_ephemeral_low
rfc1323

6192000
1
1
600
40
1
10
8192
4096000
4096000
1024
1

sb_max
Upper limit for the number of socket buffers queued to an individual socket.
clean_partial_conns
Value of 1 provides some protection against SYN attacks.
tcp_timewait
Amount of time allowed in TIME_WAIT. Value of 1 means 15 seconds.
tcp_keepidle
Ensure connection stays in active/ESTABLISHED state. Value of 600 is 5 minutes.
tcp_keepinit

Initial timeout value for TCP connection.


tcp_nodelayack
Prompt TCP to send immediate ACK instead of 200ms delay.
tcp_keepintvl
Interval between packets to validate the connection.
maxuproc
Maximum processes per user.
tcp_sendspace
How much data application can buffer before block on send call.
tcp_recvspace
How much data application can buffer on receiving socket queue.
tcp_ephemeral_low
Specify starting ephemeral port value. Default is 32768
rfc1323
Value of 1 means tcp_sendspace and tcp_recvspace can exceed 64KB.
==============================================================================
General
URL to DeveloperWorks article on agent tuning:
http://www.ibm.com/developerworks/rational/library/optimize-load-handling/index.
html
Next look at looping. RPT's connection behavior is very different depending up
on whether your loop is at the schedule level or the test level. With a loop in
the schedule RPT will close connections and open new ones at each loop iteratio
n. To take advantage of keep alive and re-use connections you should place your
loop in the test instead of the schedule.
For Execution History and Problem Determination logging, once the test is sound
turn these off for maximum performance. At the very least, turn down the level
and sample a small number of users.
Increase the statistics interval to 30 or 60 seconds.
While not strictly necessary for playback performance, you can increase the work
bench. Add -Xmx1200m to the vm args section of the eclipse.ini file for a max h
eap of 1200 megabytes.

Anda mungkin juga menyukai