Logo   Speed Hack

Home
Dragonnorth...
Modules
Published Source License
Screen Shots
SD Card Issues
Updating Firmware

Reference Information
Airflow Setup
Development Environment
I2C Addresses
Module Switches Setup
MQTT
LOGGER Setup
Processor Module Pinning
WattNode Modbus Adapter

Development History
Breadboard
Project Status
Software Revisions

References
PJRC hardware
ESP8266 Information

Speed Hack

From: raduprv: notifications@github.com
Subject: [esp8266/Arduino] Found a way to upload data VERY fast by wifi (#1853)

I am posting this here because I never found the solution online, and I've been looking for days. Before this 'hack', the transfer speed on Windows it was about 6.7 KBps, and on Linux, about 36KBps Now the speed is very high, something like many mbps, at least 187 KBps, limited by my SD reading time.

So, here is to to send data really fast, on any host: First, you have to disable the Nagle 'feature', like so:

WiFiClient client;
//stuff
client.setNoDelay(1);

Then, you need to set the packet size HIGHER than the MTU, which is 1460 bytes. I got good results sending 1760 at a time, but as I said, the bottleneck is the SD card (I am uploading files by ftp). If the size is lower or equal than the MTU, you won't get good results. I think the trick is forcing it to send two packets.

                                                                                                                                                       
LOGGER pages copyright 2016-2022 by Dragonnorth Group (Michael Newman).
Send comments and corrections to:
Webmaster: mnewman@dragonnorth.com