Skip to content

Multi-Socket Performance

February 26, 2016

I did some logic analyzer traces of the server with no connections, with a telnet character mode session, and with a browser session.  I’m preserving the results here but the upshot is that the telnet performance is not any sort of issue compared to the mess that happens in a browser session.

The no-connection sequece shows the Z80 polling the five sockets with a 5 ms delay between them.  The total time for one poll round was about 30 ms with essentially all the time accounted for by the 5ms delays.

16-02-26 fullpoll

Looking at one of the socket polls, it takes about .12 ms with the bulk of that being a lag between setting up the address to read the status and actually reading it.

16-02-26 onepoll

I then started a character mode telnet session and entered a 16 character line without hitting enter.  This means on each poll pass the Z80 has to notice there’s a session, check for data, read it in, and decide to move on.  This added about 3 ms to the poll loop.

16-02-26 telcharpoll

Within that telnet sequence there’s one sequence where we’re reading those 16 characters as fast as we can.  The total time was about .3 ms most of which is overhead between reads.

16-02-26 rxvn

I then started a browser session and I notice that there are delays of as much as a second dealing with protocol issues.  I’ve been sort of ignoring these but i’ll have to pay more attention.

16-02-26 browser

--Part of Putty Log Follows
**sock=0, rsz=397
GET / HTTP/1.1

secret=507
IP: 192.168.1.93,slot 0,secret 507
flushing 397
done
>
re-size re-size re-size re-size re-size re-size re-size re-size re-size re-size **sock=0, rsz=0
flushing 0
done
>
SOCK_FIN_WAIT: ignoring
SOCK_FIN_WAIT: ignoring
SOCK_FIN_WAIT: lost patience, closing
Advertisements

From → telnet, web server

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: