locking issues

Romeril, Alan a.romeril at ic.ac.uk
Tue Jan 30 00:34:50 GMT 2001


Hello All,
	We've been struggling with slow logons of Win2K clients to Samba
servers (2.0.7 and 2.2.0) and looking at Ethereal dumps of the session
between the Client and Samba server there seemed to be big delays in
responding to SMBntcreateX requests with SMBlockingX packets.  Looking
through the oplock code there's a couple of these in smbd/oplock.c

    /*
     * If we are sending an oplock break due to an SMB sent
     * by our own client we ensure that we wait at leat
     * lp_oplock_break_wait_time() milliseconds before sending
     * the packet. Sending the packet sooner can break Win9x
     * and has reported to cause problems on NT. JRA.
     */

    wait_before_sending_break(local_request);
    /* Prepare the SMBlockingX message. */

    prepare_break_message( outbuf, fsp, False);
    send_smb(Client, outbuf);

Jeremy or anyone else what are the things that break in 95 and what are the
problems caused in NT4?
Looking at a Win2K to Win2K logon these packets are sent very quickly after
the SMBntcreateX request, and there are many more SMBntcreateX packets that
result in a SMBlockingX response than for an NT4 logon.  Where is this
going?  I added this if statement to not wait before sending in both
occurrences when dealing with Win2K clients.

    /*
     * If we are sending an oplock break due to an SMB sent
     * by our own client we ensure that we wait at leat
     * lp_oplock_break_wait_time() milliseconds before sending
     * the packet. Sending the packet sooner can break Win9x
     * and has reported to cause problems on NT. JRA.
     */
    /*
     * WIN2K seems happy to bang out these breaks quickly, so are we. AR12.
     */
    if (get_remote_arch() != RA_WIN2K) {
        wait_before_sending_break(local_request);
    }

    /* Prepare the SMBlockingX message. */

The result of this is about a 50% speed up of domain logons from Win2K
clients, some users get less, some (with bigger profiles) get more.  So it
goes back to my question what happens to NT4 when these packets are sent too
fast?  I don't want to put code live that has a chance of destroying data /
crashing clients, but as Win2K seems to send them quickly, the code runs
fine on a test server and the speed up is really needed I'd like others to
take a look at this as well.

Best Regards,
Alan

  




More information about the samba-technical mailing list