Under some conditions you may need to test
the network performance between a Citect client and Citect server
to find any network setup problems. There is a low level debug
function which will allow you to test the raw network performance
on Citect. This function will transmit data packets using the
existing session between the Citect client and server. You may send
data packets from the client to the server or from the server to
any client. You should be very careful when using this function on
a running plant as it can disrupt normally network communication
due to its high loading on the server, client and network.
This procedure is has not been polished for general use as it
has been designed for use by Citect Support and Citect QA testing
only. This procedure is a little complex and messy however advanced
users do find it useful.
To test the network performance follow this procedure.
- Startup a Citect Server and Citect Client.
- On the Citect Client or the Citect Server display the Citect
kernel.
- You first need to check the size of the Write buffer pool which
is set by the parameter [LAN]WritePool. The default for this
parameter has changed in various versions. So the best way to check
the correct size is to display the PAGE TABLE BUFFERPOOL in the
kernel and check the Size on the "lan.write.pool". Typically it
could be 16 on version 1.x to 3.x 4.10 and 256 on 3.40 4.20 or
greater. Note the value and close the Bufferpool page by pressing
ESC. It is 256 on my version.
- Open the PAGE TABLE TRAN window in the kernel. This window
shows all the sessions between the Citect client and the Citect
server. The debug function will transmit data on the session you
choose. You should select a session from this page. To select a
session make sure that the Mode is set to Remote as some of the
sessions are local to the server. Also make sure that the Node name
is set and don't use the sessions with <listen> or
<call> as they are not connected yet. On my system the first
line shows:
IOServer MARTIN ROBERTSL Server Remote 0 1 1234 1234 0 0
Which is a session between this I/O server and a client. To
check with transaction handle this session is you should scroll the
session to the top of the page with the cursor up/down keys and
note the Offset (0 in my case). The offset on this table is the
session or transaction handle. You may close the window after
noting the transaction handle.
- Open the cicode window to call the
DEBUG() function. The DEBUG function is a cicode function as
apposed to the kernel command DEBUG which is used in the kernel
window. As the DEBUG() function is a cicode function you must call
it from the cicode window. The syntax of the DEBUG() function is as
follows:
Debug(sCmd, nArg1, nArg2, nArg3)
The command we want is called "TRAN". The other debug commands
are not documented. When using the TRAN command the arguments have
the following values:
nArg1 Transaction handle (found using PAGE TABLE
TRAN)
nArg2 Number of packets to send
nArg3 Size of data to send in bytes
Due to optimisations in Citect you should send large data
packets to get a true indication of network performance. I
recommend setting the size (nArg3) = 400 bytes. The Debug function
will send data packets by writing them into the lan write pool. The
debug function does not know exactly when the packets were actually
transmitted, only when it put them into the queue. Because of this
you should always send more packets than the size of the queue. The
number of packets to send (nArg2) should be greater than the size
of the Write Pool Buffer we found in the earlier step. The greater
the number of packets the more accurate the rate. I use around
double the size so 500 for 256 buffers, which gives a figure which
is around 30% faster than the true figure.
When the debug function has finished writing to the write pool
it will display the time and the calculated rate. For example when
I entered the command:
Debug("TRAN", 0, 500, 400)
The debug function would transmit 500 packets and then following
network rate was displayed:
Time 1211 (ms) Rate 412 (pkt/sec)
If I send 5000 packets the Rate drops to around 315 which is
closer to the true throughput. So 412 - 30% is quite close. If you
open the kernel on the Citect you are sending to you will see the
message "Received 499 messages". This way you know for sure that
the message actually got their (it says 1 less than
transmitted).
If you send too few packets you will see the rate as 0 or a very
high value. For example
Time 0 (ms) Rate 0 (pkt/sec)
Time 10 (ms) Rate 10000 (pkt/sec)
If this is the case then increase the number of packets.
You may also see the message "Out Of Buffers lan.write.pool"
when you use the debug command to show that the write pool is
filling up. This is OK and can be ignored.
The actual rate of your network will vary depending on the speed
of the network, the speed of your computers, the network
configuration and network protocol you are using. You should expect
to get around 150-300 packets per second for a 486 class computer
running on 10Mb Ethernet. See the following for KB articles for
protocol problems Q1711 Q1721 Q1874 or search for
"network slow".
|