VMware Cloud Community
Sponge5566
Contributor
Contributor

Serial port via network delay issue

Hi,

I setup a VM (windows guest) and attach a network serial port to perform debugging.

Choose "Use network"

client mode (VM imitates connection)

Port URI: tcp://10.1.2.3:4567

On a remote host 10.1.2.3 (debugger), I setup a program to redirect TCP traffic to a named pipe (listens to port 4567, creates a Windows named pipe and waits for WinDbg to connect)

It works except the latency is high. After some investigation, it seems due to the TCP Nagle's algorithm.

There are too many small messages on serial port, and TCP will combine them together and send at the same time.

This can be disabled by setting TCP_NODELAY option.

Is it possible to enable TCP_NODELAY on network serial port?  thanks.

P.S.

I also tried to using an intermediate VM to connect the debuggee through named pipe serial port, redirect the traffic to debugger through TCP with TCP_NODELAY option and it runs smoothly without delay.

But the drawback is too complex and requires one additional VM.

VM

Serial port 1

Choose “use named pipe”

Pipe Name: pipe-1

Near End: Server

Far End: A virtual Machine

VM2

Serial port 1

Choose “use named pipe”

Pipe Name: pipe-1

Near End: Client

Far End: A virtual Machine

On this VM, there is a program redirect COM1 traffic to 10.1.2.3:456 with TCP_NODELAY option enabled

Debugger use the same setting.

Reply
0 Kudos
0 Replies