[THIN] Re: attn: slightly OT: Long Fat Network Syndrome

  • From: "Lilley, Brian" <brian.lilley@xxxxxxxx>
  • To: "'thin@xxxxxxxxxxxxx'" <thin@xxxxxxxxxxxxx>
  • Date: Thu, 13 May 2004 17:23:22 +0100

Below is the summary:


Netmon trace reports sent to Microsoft indicates Network Latency as the major
factor for the delay. Microsoft suggested fine-tuning the TCPIP/SMB protocol.
Below are the changes made to the TS and profile server. These changes make a
marginal difference to the original upload and download timings.:

1.      Set the TCPWindowSize on Profile server the same as the one on Terminal
server, as 0xfc00.(This setting was already present on the TS)
2.      Disable OPlock on the profile server (server side) and the terminal 
server
(client side):

        Disable opportunistic locking on the client, set the following registry 
value
to 1: 
        HKLM\System\CurrentControlSet\Services\MRXSmb\Parameters\OplocksDisabled

        Disable opportunistic locking on the server, set the following registry 
value
to 0:
        
HKLM\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters\EnableOplocks.

3.      On Terminal server, Set the
HKLM\System\CurrentControlSet\Services\AFD\Parameters\DefaultSendWindow to
0x6000
        On Profile server, set the
HKLM\System\CurrentControlSet\Services\AFD\Parameters\DefaultReceiveWindow to
0x6000


Factors attributed to the delay were:

No of SMB Request/Responses over a WAN connection 
There is a delay/latency of 0.35~0.4 sec per SMB frame. The Windows 2000
algorithm is smarter because it uses a delta copy feature as against the xcopy
feature of Windows NT 4.0. On NT4 there are only 10 SMB requests/responses
against the 24 requests/response for Windows2000 per file copy. For a 1K file
size we have (26 * 0.35s)= 9.1 sec on Windows 2000 as against (10 * 0.35) =
3.5 secs. So as the number of files increases the time taken for the upload
increases linearly. 

FYI the working mechanism of the Windows 2000 logoff algorithm and the
overhead is outlined below:

Actually, the whole procedure for transferring the profile file from win2k
server  to the profile server is more complicated than "copying a file". It
first opens the destination file to get the file attribute. Then it reset them
to clear all existing attributes. After that, it create a new temp file on the
destination, such as prf*.tmp.  Copy the right content to the temp file. Then,
it deletes the original file and renames the temp file to original file name.
The whole procedure doesn't have problem.  However, all these communication
use SMB protocol. In the trace there are 24 SMB requests and relevant
responses. Each request/response spent 0.35 seconds so that the total amount
is around 9 second.

For NT4 TS, it just uses less than 10 SMB request to overwrite the existing
file. There is no temp file, resetting attribute and rename actions.  So it
takes 3 seconds to finish the job.  

Share and NTFS permission on the user profile
A number of access denied errors were seen in the netmon trace while uploading
the profile during the logoff process. Microsoft suggested to provide full
control on the share and the NTFS permissions on the profile directory itself.
The access denied errors were eliminated after the full control permissions
were granted. A full explanation of why this is needed would be provided by
Microsoft. This setting reduces the overall download and upload time. This
will only be significant if you have a large number of files in the profile.

Conclusions
By design only certain directories in a users profile is considered as
roaming. Roaming profiles are less likely to proliferate in size as compared
to NT4
If the file does not change over a period of time, then these are excluded for
the upload. This is gain over the Windows NT 4.0 which makes a simple xcopy.
If there are large no of files that have changed the time taken for upload
increases significantly regardless of the size of the file. In fact, large
numbers of small files that have changed carries the overhead of the 24 SMB
requests + latency therefore increasing the upload time. 
Windows2000 Terminal Server logon times are similar to NT4.0 logon times. 
The Cookies folder should be excluding from the roaming file. The overhead
with the number of SMB requests/responses is significant over a WAN connection
when there are large number of these small files.
We have found that the TCP tuning parameters do not make a significant change
to the timings over the WAN.
NTFS and Share permissions on the profile directory should be set to Full
Control.

-----Original Message-----
From: thin-bounce@xxxxxxxxxxxxx [mailto:thin-bounce@xxxxxxxxxxxxx]On
Behalf Of Timothy Mangan
Sent: 13 May 2004 13:20
To: thin@xxxxxxxxxxxxx
Subject: [THIN] Re: attn: slightly OT: Long Fat Network Syndrome


In theory it should help a little -- but I've never tried it.  Before
embarking, find out if your NAT/Firewall needs to support it also to take
advantage.  And let us know what you find out!

tim 

-----Original Message-----
From: thin-bounce@xxxxxxxxxxxxx [mailto:thin-bounce@xxxxxxxxxxxxx] On Behalf
Of Lilley, Brian
Sent: Thursday, May 13, 2004 7:18 AM
To: 'thin@xxxxxxxxxxxxx'
Subject: [THIN] attn: slightly OT: Long Fat Network Syndrome


I am trying to resolve the age old problem of Terminal services users
accessing their home drives/profiles over high latency connections.

My client has multiple 40mbps connections and still suffers slow connection
problems..classic Long Fat Networks syndrome!

I am looking to implement RFC1323 (TCP extensions for High Performance),
which basically allows the TCP stack to negotiate a much larger receive
window size and thus radically improve their WAN TCP connections?

Have any of you networky spods out there have any experience with setting
the TCPOpt settings for RFC1323 in a terminal serivces environment?

Thanks in advance,

Brian

============================================================================
==
This message is for the sole use of the intended recipient. If you received
this message in error please delete it and notify us. If this message was
misdirected, CSFB does not waive any confidentiality or privilege. CSFB
retains and monitors electronic communications sent through its network.
Instructions transmitted over this system are not binding on CSFB until they
are confirmed by us. Message transmission is not guaranteed to be secure.
============================================================================
==

********************************************************
This Week's Sponsor - Tarantella Secure Global Desktop Tarantella Secure
Global Desktop Terminal Server Edition Free Terminal Service Edition
software with 2 years maintenance.
http://www.tarantella.com/ttba
**********************************************************
Useful Thin Client Computing Links are available at:
http://thin.net/links.cfm
***********************************************************
For Archives, to Unsubscribe, Subscribe or set Digest or Vacation mode use
the below link:
http://thin.net/citrixlist.cfm

********************************************************
This Week's Sponsor - Tarantella Secure Global Desktop
Tarantella Secure Global Desktop Terminal Server Edition
Free Terminal Service Edition software with 2 years maintenance.
http://www.tarantella.com/ttba
**********************************************************
Useful Thin Client Computing Links are available at:
http://thin.net/links.cfm
***********************************************************
For Archives, to Unsubscribe, Subscribe or 
set Digest or Vacation mode use the below link:
http://thin.net/citrixlist.cfm

==============================================================================
This message is for the sole use of the intended recipient. If you received
this message in error please delete it and notify us. If this message was
misdirected, CSFB does not waive any confidentiality or privilege. CSFB
retains and monitors electronic communications sent through its network.
Instructions transmitted over this system are not binding on CSFB until they
are confirmed by us. Message transmission is not guaranteed to be secure.
==============================================================================

********************************************************
This Week's Sponsor - Tarantella Secure Global Desktop
Tarantella Secure Global Desktop Terminal Server Edition
Free Terminal Service Edition software with 2 years maintenance.
http://www.tarantella.com/ttba
**********************************************************
Useful Thin Client Computing Links are available at:
http://thin.net/links.cfm
***********************************************************
For Archives, to Unsubscribe, Subscribe or 
set Digest or Vacation mode use the below link:
http://thin.net/citrixlist.cfm

Other related posts: