Reply 540 of 542, by mbbrutman
Jules_nerd wrote on Yesterday, 14:14:But even just accessing windows shares over the network seems a little slower than I thought it should be, I mean even a 386 can handle TCP/IP over a network adapter at decent rates, so surely it cant be the processor struggling with TCP/IP.... so 6KB/S seems a bit poor for a 115200 baud rate link, unless the overhead is much higher than I thought?
Let's do some basic math ...
Assuming the serial connection is keeping up and not dropping bytes, 115,200 bits per second (not baud, but bits per second) is 11.25KB/sec maximum. It will never exceed that.
I forget what overhead SLIP adds, but it's minmimal. You still generally have a fake Ethernet header for compatibility with the programs that are expecting a packet driver. And then you have 40 bytes of IP and TCP headers even before you get to your data, but on larger data transfers that cost is amortized.
If your machine is using a 16550 style UART you are getting 16 or 64 bytes at a time on each interrupt. If it is an 8250 style UART it is being interrupted for each byte, and it would be faster to using polling instead of interrupts. After you get the packet it has to be copied to the program, processed, and then something can happen. So unless you are doing a pure speed test, you will never get 11.25KB/sec out of it. Especially if you are writing to storage, as FTP does.
Yep, serial sucks for large transfers.