VOGONS


Quality of packet drivers: Intel

Topic actions

Reply 20 of 26, by mbbrutman

User metadata
Rank Oldbie
Rank
Oldbie

Another request - can you send me a trace of FTP4DOS transferring the same file? Are you on a real machine or a virtual machine? Do you have any power saving TSRs loaded?

I know my code is calling the DOS Idle interrupt and the interrupt to signal the program is idle when it's just spinning waiting for packets. (Int 2F, AX=1680x). If FTP4DOS is not doing that it might explain the difference.

In general, they both poll to see if new packets have arrived, and then they try to write whatever they have to keep the TCP window open and available. My code updates the file transfer progress on the screen using BIOS calls, and that might be slowing it down, but probably not by such a huge factor.

FTP4DOS spins in a loop, reading from the TCP buffer and writing whatever it finds until the TCP buffer is empty. It will write up to 4KB at a time. My code is slightly different in that it does multiple reads from the socket until it fills the file buffer, and then it does the write. While that should improve performance by making for larger write sizes, it might also prevent the code from polling for the next packet for a few more milliseconds. That kind of subtle difference matters a lot on a faster machine.

Reply 21 of 26, by Grzyb

User metadata
Rank l33t
Rank
l33t
mbbrutman wrote on 2026-06-29, 04:21:

Another request - can you send me a trace of FTP4DOS transferring the same file?

Attached.

Are you on a real machine or a virtual machine?

Real - described in the original post.

Do you have any power saving TSRs loaded?

No.

Meanwhile, the benchmark for various combinations of FTP_TCP_BUFFER and FTP_FILE_BUFFER is running, please wait...

In 2003, I voted in favour of joining the European Union. However, due to later developments - especially the restrictions on cash usage - I have withdrawn my support. DOWN WITH THE EU!

Reply 22 of 26, by Grzyb

User metadata
Rank l33t
Rank
l33t

Here you are - my quick and dirty benchmark, and the results, with the unimportant stuff filtered out...

Looks like it's best to leave FTP_TCP_BUFFER at default, and set FTP_FILE_BUFFER 2048.

In 2003, I voted in favour of joining the European Union. However, due to later developments - especially the restrictions on cash usage - I have withdrawn my support. DOWN WITH THE EU!

Reply 23 of 26, by Grzyb

User metadata
Rank l33t
Rank
l33t

I've fixed FTP_FILE_BUFFER at 2048, and downloaded a larger file - the max speed is at FTP_TCP_BUFFER 10240, but only slightly better than at the default FTP_TCP_BUFFER 8192.

In 2003, I voted in favour of joining the European Union. However, due to later developments - especially the restrictions on cash usage - I have withdrawn my support. DOWN WITH THE EU!

Reply 24 of 26, by Grzyb

User metadata
Rank l33t
Rank
l33t

Updating the screen does slow down the transfer a lot:

ftp ... < response.txt
3332 KB/s

ftp ... < response.txt > log.txt
5425 KB/s

...but that's definitely not the main problem here.

In 2003, I voted in favour of joining the European Union. However, due to later developments - especially the restrictions on cash usage - I have withdrawn my support. DOWN WITH THE EU!

Reply 25 of 26, by mbbrutman

User metadata
Rank Oldbie
Rank
Oldbie

Ok, so you have confirmed that flow control related to buffer sizes and file writes is what is causing the difference. I'll look at your data and make some notes in the documentation about how to set better buffer sizes. Based on your data, the rules of thumb for faster machines are very different from those for slower machines. I'll also do something about the progress update, possibly making it time based (1 second) instead of KB based.

And 5400+ KB/sec is quite a difference from where you started ...

Mike

Reply 26 of 26, by Grzyb

User metadata
Rank l33t
Rank
l33t

Yeah, the Packet Driver isn't bad at all when you know how to use it!

MTU 1500
FTP_FILE_BUFFER 2048
everything else default

ftp ... < response.txt > log.txt

PD by Seth Simon: 5425
NDIS+DIS_PKT: 5395
ODI+ODIPKT: 5395

In 2003, I voted in favour of joining the European Union. However, due to later developments - especially the restrictions on cash usage - I have withdrawn my support. DOWN WITH THE EU!