Hi,
we have a performance problem with our application, a Sybase
database server and the net under linux.
The application connects via socket with the database server
(file descriptor 5).
It sends 512 Bytes, the send call takes more than 5 milliseconds
(as shown in the strace output).
But the acknowledge paket from the server comes within 22 microseconds,
you can see this at the tcpdump output.
Any hints?
strace:
14:44:07.587450 socket(PF_INET, SOCK_STREAM, IPPROTO_IP) = 5 <0.000016>
14:44:07.587501 setsockopt(5, SOL_SOCKET, SO_KEEPALIVE, [1], 4) = 0
<0.000006>
14:44:07.587539 setsockopt(5, SOL_TCP, TCP_NODELAY, [1], 4) = 0 <0.000006>
14:44:07.587575 setsockopt(5, SOL_SOCKET, SO_LINGER, [0], 8) = 0 <0.000005>
14:44:07.587629 fcntl64(5, F_GETFL) = 0x2 (flags O_RDWR) <0.000004>
14:44:07.587670 fcntl64(5, F_SETFL, O_RDWR|O_NONBLOCK) = 0 <0.000005>
14:44:07.587700 fcntl64(5, F_GETFL) = 0x802 (flags O_RDWR|O_NONBLOCK)
<0.000004>
14:44:07.587732 fcntl64(5, F_SETFL, O_RDWR|O_NONBLOCK) = 0 <0.000003>
14:44:07.587769 connect(5, {sin_family=AF_INET, sin_port=htons(4000),
sin_addr=inet_addr("XX.0.5.YY")}}, 16) = -1 EINPROGRESS <0.005678>
14:44:07.593545 poll([{fd=5, events=POLLOUT, revents=POLLOUT}], 1, 60000) =
1 <0.000007>
14:44:07.593606 connect(5, {sin_family=AF_INET, sin_port=htons(4000),
sin_addr=inet_addr("XX.0.5.YY")}}, 16) = 0 <0.000006>
14:44:07.593886 fcntl64(5, F_GETFL) = 0x802 (flags O_RDWR|O_NONBLOCK)
<0.000005>
14:44:07.593922 fcntl64(5, F_SETFL, O_RDWR|O_NONBLOCK) = 0 <0.000004>
14:44:07.593959 setsockopt(5, SOL_SOCKET, SO_KEEPALIVE, [1], 4) = 0
<0.000005>
14:44:07.593998 setsockopt(5, SOL_TCP, TCP_NODELAY, [1], 4) = 0 <0.000006>
14:44:07.594541 send(5, "\2\0\2\0\0"..., 512, 0) = 512 <0.005243>
14:44:07.599852 write(1, "np"..., 75) = 75 <0.000052>
tcpdump:
14:44:07.594589 reinach.local.45955 > reinach.local.terabase: P 1:513(512)
ack 1 win 32767 <nop,nop,timestamp 460069015 460069014> (DF)
14:44:07.594611 reinach.local.terabase > reinach.local.45955: . ack 513 win
32767 <nop,nop,timestamp 460069015 460069015> (DF)