1

I have a two different CUPS installation. One is 2.2.0 runs on macOS (10.12.2) Another one is 1.6.3 runs on Linux minibian 4.1.7-v7+ ( Raspberry )

There is thermal printer connected via network and cups sends a RAW ESC/P commands to the printer. ( It does not make any processing on it )

The problem is Printer stops to responds ACK at some point when printing comes from Linux minibian, while from macOS it runs fine ( so far )

I take a dump from macOS connection to print and from Linux

Appears that macOS send a less amount of TCP frames pushing more data into the every frame ( 512bytes ) while linux is pushing just 128bytes per frame and at some point it waits too long for an ACK, and resend the packets few more times.

Printer window size is 1K

I wondering is there anyway to adjust how many bytes should be pushed into the single TCP frame?

Here is dump from macOS

https://www.cloudshark.org/captures/6c6ca839721a

and here is dump from Linux

https://www.cloudshark.org/captures/065ac8cfb15e

Thanks.

Added

I checked linux with another printer and it works fine cloudshark.org/captures/a700f0d7a143

I take a look and found out that all frames was 512bytes now. So I checked the first frames and noticed that another printer returns window size 1024 on first frame while old printer returns 128 on first frame.

Looks like linux driver does not respect window size from next calls ( Like after frame 5 server still pushing data by 128bytes, while call 5 saying window is 1024 now )

Is it issue with a driver? macOS handles it properly

3
  • This sounds like it could be a problem with Nagle's Algorithm which should only be used on high-throughput networks. On low throughput networks, you can see the behavior you are describing. Do you have this problem when directly connected to the printer? Mar 1 '17 at 6:38
  • I'm not able to directly connect printer. Add some notes more. link to dump with another printer cloudshark.org/captures/a700f0d7a143
    – ekiyanov
    Mar 1 '17 at 8:16
  • Unfortunately, questions about host configurations are off-topic here. You could try to ask this question on Server Fault for a business network, or on Super User for a personal network.
    – Ron Maupin
    Mar 1 '17 at 13:10
1

Sure, you can affect MSS (maximum segment size) in a device.

In Linux it can be done either globally by sysctl https://itsthe.network/post/TCP%20MSS%20Linux%20Kernel%20Setting/)

or per rule (e.g. with iptables), details:

https://www.frozentux.net/iptables-tutorial/chunkyhtml/x4721.html

1
  • mss is 1460 but packets 128bytes.
    – ekiyanov
    Mar 1 '17 at 7:52

Not the answer you're looking for? Browse other questions tagged or ask your own question.