[Samba] ACK's overhead

Vorsin Denis Vorsin at nordcomp.ru
Tue Feb 10 13:30:15 GMT 2004


Good day time!

We've noticed the following issue with Samba 3.0.1 on Linux. When SMB client
asks for the first time on FID for a locking or read request on an opened
file, it causes an ACK to be sent from client side. Windows server also
requests ACK BUT much more rarely. 

Sending ACK causes additional overhead when working in heavy locking and
unlocking environment. Windows server doesn't requests ACK to each new
request. Possibly it is not Samba's internals but how to get rid of this
ACK?

Possibly we can use some additional socket options? Here are the options in
smb.conf:

socket options = IPTOS_LOWDELAY TCP_NODELAY

kernel oplocks = no
posix locking = yes
blocking locks = yes
share modes = yes
locking = yes
oplocks = no
level2 oplocks = no
nt acl support = yes

Thank you.

Here is the dump:

Small description - Frame 94415 is a Read request, Frame 94417 is a Read
response which causes ACK to be sent in Frame 94418.

Frame 94415 (118 bytes on wire, 118 bytes captured)
    Arrival Time: Feb 10, 2004 14:55:08.279799000
    Time delta from previous packet: 0.000045000 seconds
    Time since reference or first frame: 12.970217000 seconds
    Frame Number: 94415
    Packet Length: 118 bytes
    Capture Length: 118 bytes
Ethernet II, Src: 00:a0:c9:69:01:36, Dst: 00:02:b3:52:13:73
    Destination: 00:02:b3:52:13:73 (Intel_52:13:73)
    Source: 00:a0:c9:69:01:36 (Intel-Hf_69:01:36)
    Type: IP (0x0800)
Internet Protocol, Src Addr: 192.168.0.14 (192.168.0.14), Dst Addr:
192.168.0.101 (192.168.0.101)
    Version: 4
    Header length: 20 bytes
    Differentiated Services Field: 0x00 (DSCP 0x00: Default; ECN: 0x00)
        0000 00.. = Differentiated Services Codepoint: Default (0x00)
        .... ..0. = ECN-Capable Transport (ECT): 0
        .... ...0 = ECN-CE: 0
    Total Length: 104
    Identification: 0x1fdd (8157)
    Flags: 0x04
        .1.. = Don't fragment: Set
        ..0. = More fragments: Not set
    Fragment offset: 0
    Time to live: 128
    Protocol: TCP (0x06)
    Header checksum: 0x58ef (correct)
    Source: 192.168.0.14 (192.168.0.14)
    Destination: 192.168.0.101 (192.168.0.101)
Transmission Control Protocol, Src Port: 2720 (2720), Dst Port: nbsession
(139), Seq: 3036203, Ack: 3647740, Len: 64
    Source port: 2720 (2720)
    Destination port: nbsession (139)
    Sequence number: 3036203
    Next sequence number: 3036267
    Acknowledgement number: 3647740
    Header length: 20 bytes
    Flags: 0x0018 (PSH, ACK)
        0... .... = Congestion Window Reduced (CWR): Not set
        .0.. .... = ECN-Echo: Not set
        ..0. .... = Urgent: Not set
        ...1 .... = Acknowledgment: Set
        .... 1... = Push: Set
        .... .0.. = Reset: Not set
        .... ..0. = Syn: Not set
        .... ...0 = Fin: Not set
    Window size: 8266
    Checksum: 0x7cc5 (correct)
NetBIOS Session Service
    Message Type: Session message
    Flags: 0x00
        .... ...0 = Add 0 to length
    Length: 60
SMB (Server Message Block Protocol)
    SMB Header
        Server Component: SMB
        Response in: 94417
        SMB Command: Read AndX (0x2e)
        Error Class: Success (0x00)
        Reserved: 00
        Error Code: No Error
        Flags: 0x18
            0... .... = Request/Response: Message is a request to the server
            .0.. .... = Notify: Notify client only on open
            ..0. .... = Oplocks: OpLock not requested/granted
            ...1 .... = Canonicalized Pathnames: Pathnames are canonicalized
            .... 1... = Case Sensitivity: Path names are caseless
            .... ..0. = Receive Buffer Posted: Receive buffer has not been
posted
            .... ...0 = Lock and Read: Lock&Read, Write&Unlock are not
supported
        Flags2: 0x8000
            1... .... .... .... = Unicode Strings: Strings are Unicode
            .0.. .... .... .... = Error Code Type: Error codes are DOS error
codes
            ..0. .... .... .... = Execute-only Reads: Don't permit reads if
execute-only
            ...0 .... .... .... = Dfs: Don't resolve pathnames with Dfs
            .... 0... .... .... = Extended Security Negotiation: Extended
security negotiation is not supported
            .... .... .0.. .... = Long Names Used: Path names in request are
not long file names
            .... .... .... .0.. = Security Signatures: Security signatures
are not supported
            .... .... .... ..0. = Extended Attributes: Extended attributes
are not supported
            .... .... .... ...0 = Long Names Allowed: Long file names are
not allowed in the response
        Process ID High: 0
        Signature: 0000000000000000
        Reserved: 0000
        Tree ID: 2
        Process ID: 51966
        User ID: 100
        Multiplex ID: 58498
    Read AndX Request (0x2e)
        Word Count (WCT): 12
        AndXCommand: No further commands (0xff)
        Reserved: 00
        AndXOffset: 0
        FID: 0x21df
        Offset: 0
        Max Count Low: 16
        Min Count: 16
        Remaining: 16
        High Offset: 0
        Byte Count (BCC): 0

Frame 94417 (133 bytes on wire, 133 bytes captured)
    Arrival Time: Feb 10, 2004 14:55:08.279891000
    Time delta from previous packet: 0.000040000 seconds
    Time since reference or first frame: 12.970309000 seconds
    Frame Number: 94417
    Packet Length: 133 bytes
    Capture Length: 133 bytes
Ethernet II, Src: 00:02:b3:52:13:73, Dst: 00:a0:c9:69:01:36
    Destination: 00:a0:c9:69:01:36 (Intel-Hf_69:01:36)
    Source: 00:02:b3:52:13:73 (Intel_52:13:73)
    Type: IP (0x0800)
Internet Protocol, Src Addr: 192.168.0.101 (192.168.0.101), Dst Addr:
192.168.0.14 (192.168.0.14)
    Version: 4
    Header length: 20 bytes
    Differentiated Services Field: 0x00 (DSCP 0x00: Default; ECN: 0x00)
        0000 00.. = Differentiated Services Codepoint: Default (0x00)
        .... ..0. = ECN-Capable Transport (ECT): 0
        .... ...0 = ECN-CE: 0
    Total Length: 119
    Identification: 0x8566 (34150)
    Flags: 0x04
        .1.. = Don't fragment: Set
        ..0. = More fragments: Not set
    Fragment offset: 0
    Time to live: 64
    Protocol: TCP (0x06)
    Header checksum: 0x3357 (correct)
    Source: 192.168.0.101 (192.168.0.101)
    Destination: 192.168.0.14 (192.168.0.14)
Transmission Control Protocol, Src Port: nbsession (139), Dst Port: 2720
(2720), Seq: 3647783, Ack: 3036267, Len: 79
    Source port: nbsession (139)
    Destination port: 2720 (2720)
    Sequence number: 3647783
    Next sequence number: 3647862
    Acknowledgement number: 3036267
    Header length: 20 bytes
    Flags: 0x0018 (PSH, ACK)
        0... .... = Congestion Window Reduced (CWR): Not set
        .0.. .... = ECN-Echo: Not set
        ..0. .... = Urgent: Not set
        ...1 .... = Acknowledgment: Set
        .... 1... = Push: Set
        .... .0.. = Reset: Not set
        .... ..0. = Syn: Not set
        .... ...0 = Fin: Not set
    Window size: 20162
    Checksum: 0x99ef (correct)
NetBIOS Session Service
    Message Type: Session message
    Flags: 0x00
        .... ...0 = Add 0 to length
    Length: 75
SMB (Server Message Block Protocol)
    SMB Header
        Server Component: SMB
        Response to: 94415
        Time from request: 0.000092000 seconds
        SMB Command: Read AndX (0x2e)
        NT Status: STATUS_SUCCESS (0x00000000)
        Flags: 0x88
            1... .... = Request/Response: Message is a response to the
client/redirector
            .0.. .... = Notify: Notify client only on open
            ..0. .... = Oplocks: OpLock not requested/granted
            ...0 .... = Canonicalized Pathnames: Pathnames are not
canonicalized
            .... 1... = Case Sensitivity: Path names are caseless
            .... ..0. = Receive Buffer Posted: Receive buffer has not been
posted
            .... ...0 = Lock and Read: Lock&Read, Write&Unlock are not
supported
        Flags2: 0xc801
            1... .... .... .... = Unicode Strings: Strings are Unicode
            .1.. .... .... .... = Error Code Type: Error codes are NT error
codes
            ..0. .... .... .... = Execute-only Reads: Don't permit reads if
execute-only
            ...0 .... .... .... = Dfs: Don't resolve pathnames with Dfs
            .... 1... .... .... = Extended Security Negotiation: Extended
security negotiation is supported
            .... .... .0.. .... = Long Names Used: Path names in request are
not long file names
            .... .... .... .0.. = Security Signatures: Security signatures
are not supported
            .... .... .... ..0. = Extended Attributes: Extended attributes
are not supported
            .... .... .... ...1 = Long Names Allowed: Long file names are
allowed in the response
        Process ID High: 0
        Signature: 0000000000000000
        Reserved: 0000
        Tree ID: 2
        Process ID: 51966
        User ID: 100
        Multiplex ID: 58498
    Read AndX Response (0x2e)
        Word Count (WCT): 12
        AndXCommand: No further commands (0xff)
        Reserved: 00
        AndXOffset: 0
        FID: 0x21df
        Remaining: 65535
        Data Compaction Mode: 0
        Reserved: 0000
        Data Length Low: 16
        Data Offset: 59
        Data Length High (multiply with 64K): 0
        Reserved: 000000000000
        Byte Count (BCC): 16
        File Data: 0044000000000000B200008F0A00E000

Frame 94418 (54 bytes on wire, 54 bytes captured)
    Arrival Time: Feb 10, 2004 14:55:08.279905000
    Time delta from previous packet: 0.000014000 seconds
    Time since reference or first frame: 12.970323000 seconds
    Frame Number: 94418
    Packet Length: 54 bytes
    Capture Length: 54 bytes
Ethernet II, Src: 00:a0:c9:69:01:36, Dst: 00:02:b3:52:13:73
    Destination: 00:02:b3:52:13:73 (Intel_52:13:73)
    Source: 00:a0:c9:69:01:36 (Intel-Hf_69:01:36)
    Type: IP (0x0800)
Internet Protocol, Src Addr: 192.168.0.14 (192.168.0.14), Dst Addr:
192.168.0.101 (192.168.0.101)
    Version: 4
    Header length: 20 bytes
    Differentiated Services Field: 0x00 (DSCP 0x00: Default; ECN: 0x00)
        0000 00.. = Differentiated Services Codepoint: Default (0x00)
        .... ..0. = ECN-Capable Transport (ECT): 0
        .... ...0 = ECN-CE: 0
    Total Length: 40
    Identification: 0x20dd (8413)
    Flags: 0x04
        .1.. = Don't fragment: Set
        ..0. = More fragments: Not set
    Fragment offset: 0
    Time to live: 128
    Protocol: TCP (0x06)
    Header checksum: 0x582f (correct)
    Source: 192.168.0.14 (192.168.0.14)
    Destination: 192.168.0.101 (192.168.0.101)
Transmission Control Protocol, Src Port: 2720 (2720), Dst Port: nbsession
(139), Seq: 3036267, Ack: 3647862, Len: 0
    Source port: 2720 (2720)
    Destination port: nbsession (139)
    Sequence number: 3036267
    Acknowledgement number: 3647862
    Header length: 20 bytes
    Flags: 0x0010 (ACK)
        0... .... = Congestion Window Reduced (CWR): Not set
        .0.. .... = ECN-Echo: Not set
        ..0. .... = Urgent: Not set
        ...1 .... = Acknowledgment: Set
        .... 0... = Push: Not set
        .... .0.. = Reset: Not set
        .... ..0. = Syn: Not set
        .... ...0 = Fin: Not set
    Window size: 8144
    Checksum: 0x0fc2 (correct)
    SEQ/ACK analysis
        This is an ACK to the segment in frame: 94417
        The RTT to ACK the segment was: 0.000014000 seconds



More information about the samba mailing list