I have an application that transfers data at only half of what would be available bandwidth (or 2/3 when two threads are sending).
But the connection is TCP, and I thought the kernel would do the flow-control there. So I put the blame on my mess of nested tunnels and the generally narrow link (~2 Mbit/sec WAN).
Now I fixed that mess, i.e. put traffic shapers in and see what can work, thereby bringing ping on full saturation down from 250 ms to 60 ms, and now ssh and https work fine. I tested with even weirder rabbithole constructs, and they run at full saturation. Only that application doesn't.
Doesn't look obviousely wrong...
But the connection is TCP, and I thought the kernel would do the flow-control there. So I put the blame on my mess of nested tunnels and the generally narrow link (~2 Mbit/sec WAN).
Now I fixed that mess, i.e. put traffic shapers in and see what can work, thereby bringing ping on full saturation down from 250 ms to 60 ms, and now ssh and https work fine. I tested with even weirder rabbithole constructs, and they run at full saturation. Only that application doesn't.
Code:
09:31:45.871324 IP 192.168.97.17.47590 > 192.168.99.1.9103: Flags [.], seq 2143354:2144673, ack 1, win 1040, options [nop,nop,TS val 1473408532 ecr 3301313561], length 1319
09:31:45.916328 IP 192.168.97.17.47590 > 192.168.99.1.9103: Flags [.], seq 2144673:2145992, ack 1, win 1040, options [nop,nop,TS val 1473408587 ecr 3301313607], length 1319
09:31:45.926327 IP 192.168.97.17.47590 > 192.168.99.1.9103: Flags [.], seq 2145992:2147311, ack 1, win 1040, options [nop,nop,TS val 1473408587 ecr 3301313607], length 1319
09:31:45.965843 IP 192.168.99.1.9103 > 192.168.97.17.47590: Flags [.], ack 2144673, win 1040, options [nop,nop,TS val 3301313846 ecr 1473408532], length 0
09:31:45.977413 IP 192.168.99.1.9103 > 192.168.97.17.47590: Flags [.], ack 2147311, win 1020, options [nop,nop,TS val 3301313856 ecr 1473408587], length 0
09:31:46.171359 IP 192.168.97.17.47590 > 192.168.99.1.9103: Flags [.], seq 2147311:2148630, ack 1, win 1040, options [nop,nop,TS val 1473408817 ecr 3301313846], length 1319
09:31:46.176338 IP 192.168.97.17.47590 > 192.168.99.1.9103: Flags [.], seq 2148630:2149949, ack 1, win 1040, options [nop,nop,TS val 1473408817 ecr 3301313846], length 1319
09:31:46.186358 IP 192.168.97.17.47590 > 192.168.99.1.9103: Flags [.], seq 2149949:2151268, ack 1, win 1040, options [nop,nop,TS val 1473408827 ecr 3301313856], length 1319
09:31:46.191330 IP 192.168.97.17.47590 > 192.168.99.1.9103: Flags [.], seq 2151268:2152587, ack 1, win 1040, options [nop,nop,TS val 1473408827 ecr 3301313856], length 1319
09:31:46.228385 IP 192.168.99.1.9103 > 192.168.97.17.47590: Flags [.], ack 2149949, win 1020, options [nop,nop,TS val 3301314108 ecr 1473408817], length 0
09:31:46.254554 IP 192.168.99.1.9103 > 192.168.97.17.47590: Flags [.], ack 2152587, win 1020, options [nop,nop,TS val 3301314123 ecr 1473408827], length 0
>>> what is it waiting for ??? <<<
09:31:46.431325 IP 192.168.97.17.47590 > 192.168.99.1.9103: Flags [.], seq 2152587:2153906, ack 1, win 1040, options [nop,nop,TS val 1473409102 ecr 3301314123], length 1319
09:31:46.436330 IP 192.168.97.17.47590 > 192.168.99.1.9103: Flags [.], seq 2153906:2155225, ack 1, win 1040, options [nop,nop,TS val 1473409102 ecr 3301314123], length 1319
09:31:46.446334 IP 192.168.97.17.47590 > 192.168.99.1.9103: Flags [.], seq 2155225:2156544, ack 1, win 1040, options [nop,nop,TS val 1473409102 ecr 3301314123], length 1319
Code:
8.450039607 0.020239260 poll({ 22/POLLOUT|POLLWRBAND },1,10000) = 1 (0x1)
8.450454142 0.000065407 write(22,"\^W\^C\^C\^C\M^U\M-38\M-&mhJ\240"...,922) = 922 (0x39a)
8.450572234 0.000028607 fcntl(22,F_SETFL,O_RDWR) = 0 (0x0)
8.450707784 0.000055497 read(6,"\^A\M-Q\^A\0\^A\0\0\0\0\0G\M-lk"...,65536) = 65536 (0x10000)
8.463065391 0.000029543 fcntl(22,F_GETFL,) = 2 (0x2)
8.463198288 0.000034799 fcntl(22,F_SETFL,O_RDWR|O_NONBLOCK) = 0 (0x0)
8.463620081 0.000064920 write(22,"\^W\^C\^C@\^Qr\M-N\M^Z\M^P6D\M-S"...,16406) ERR#35 'Resource temporarily unavailable'
8.472786898 0.009032704 poll({ 22/POLLOUT|POLLWRBAND },1,10000) = 1 (0x1)
8.473162083 0.000068892 write(22,"\^W\^C\^C@\^Qr\M-N\M^Z\M^P6D\M-S"...,16406) = 4576 (0x11e0)
8.473449626 0.000027335 write(22,"\M-+UFcR\M^Y7~\n;\M-E\M^^\M-;0"...,11830) ERR#35 'Resource temporarily unavailable'
8.480161835 0.006614703 poll({ 22/POLLOUT|POLLWRBAND },1,10000) = 1 (0x1)
8.480501420 0.000054956 write(22,"\M-+UFcR\M^Y7~\n;\M-E\M^^\M-;0"...,11830) = 2638 (0xa4e)
8.480879519 0.000060052 write(22,"\M-2\M-k\M-d\^C\M-Vt\M-t\M^[\M^\"...,9192) ERR#35 'Resource temporarily unavailable'
8.488571034 0.007558037 poll({ 22/POLLOUT|POLLWRBAND },1,10000) = 1 (0x1)
Doesn't look obviousely wrong...