New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lwIP: Enable TCP out-of-order processing #6882

Merged
merged 1 commit into from May 14, 2018

Conversation

Projects
None yet
6 participants
@kjbracey-arm
Contributor

kjbracey-arm commented May 11, 2018

Description

Our config file for lwIP had TCP_QUEUE_OOSEQ disabled - this can
cause significant performance problems, as observed during testing.

One lost packet can lock an input stream into a mode where the
transmitter keeps thinking packets are being lost, so keeps slowing
down. This caused test failures - a transfer that would normally
take 10s hit a 60s timeout.

Turning this on increases code size, but doesn't significantly increase
static memory use. The memory used for out-of-order packets comes from
the same pbuf pool as for outgoing TCP segments, so there is contention
when running bidirectionally.

Out-of-order processing is on by default for lwIP - this seems to be
another example of us excessively paring it back.

Pull request type

[ ] Fix
[ ] Refactor
[ ] New target
[X] Feature
[ ] Breaking change
lwIP: Enable TCP out-of-order processing
Our config file for lwIP had TCP_QUEUE_OOSEQ disabled - this can
cause significant performance problems, as observed during testing.

One lost packet can lock an input stream into a mode where the
transmitter keeps thinking packets are being lost, so keeps slowing
down. This caused test failures - a transfer that would normally
take 10s hit a 60s timeout.

Turning this on increases code size, but doesn't significantly increase
static memory use. The memory used for out-of-order packets comes from
the same pbuf pool as for outgoing TCP segments, so there is contention
when running bidirectionally.

Out-of-order processing is on by default for lwIP - this seems to be
another example of us excessively paring it back.

@kjbracey-arm kjbracey-arm requested a review from SeppoTakalo May 11, 2018

@kjbracey-arm

This comment has been minimized.

Contributor

kjbracey-arm commented May 11, 2018

This is intended to solve a problem observed here: #6665

@kjbracey-arm

This comment has been minimized.

Contributor

kjbracey-arm commented May 11, 2018

@kjbracey-arm

This comment has been minimized.

Contributor

kjbracey-arm commented May 11, 2018

Static memory change with this, for development build.

Current build:

Total Static RAM memory (data + bss): 59196 bytes
Total Flash memory (text + data): 141450 bytes

Enabling TCP_QUEUE_OOSEQ

Total Static RAM memory (data + bss): 59212 bytes (+16)
Total Flash memory (text + data): 142538 bytes (+1,088)

This increase is only for images using lwIP with TCP enabled.

@cmonr cmonr added the needs: CI label May 14, 2018

@cmonr

This comment has been minimized.

Contributor

cmonr commented May 14, 2018

/morph build

@mbed-ci

This comment has been minimized.

mbed-ci commented May 14, 2018

Build : SUCCESS

Build number : 1990
Build artifacts/logs : http://mbed-os.s3-website-eu-west-1.amazonaws.com/?prefix=builds/6882/

Triggering tests

/morph test
/morph uvisor-test
/morph export-build
/morph mbed2-build

@mbed-ci

This comment has been minimized.

@VeijoPesonen

This comment has been minimized.

Contributor

VeijoPesonen commented May 14, 2018

100 KB download, artificial 2% packet loss.

Disabled

TCP_QUEUE_OOSEQ disabled. Gave up after 2mins and 70KB.
tcp_queue_ooseq_disabled

Enabled

TCP_QUEUE_OOSEQ enabled. Took about 4secs.
tcp_queue_ooseq_enabled

@mbed-ci

This comment has been minimized.

@0xc0170 0xc0170 added ready for merge and removed needs: CI labels May 14, 2018

@cmonr cmonr merged commit 506f9a8 into ARMmbed:master May 14, 2018

13 checks passed

AWS-CI uVisor Build & Test Success
Details
ci-morph-build build completed
Details
ci-morph-exporter build completed
Details
ci-morph-mbed2-build build completed
Details
ci-morph-test test completed
Details
continuous-integration/jenkins/pr-head This commit looks good
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
travis-ci/astyle Passed, 845 warnings (+0 warnings)
Details
travis-ci/docs Local docs testing has passed
Details
travis-ci/events Passed, runtime is 9684 cycles (+667 cycles)
Details
travis-ci/gitattributestest Local gitattributestest testing has passed
Details
travis-ci/littlefs Passed, code size is 9964B (+0.00%)
Details
travis-ci/tools Local tools testing has passed
Details

@kjbracey-arm kjbracey-arm deleted the kjbracey-arm:lwip-tcp-ooseq branch Jun 6, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment