The art of speeding up ‘chatty’ CIFS WAN traffic
- 18 June, 2006 22:00
Common Internet File System is a remote-file access protocol that forms the basis for Windows file-sharing. CIFS performs poorly over high-latency WAN links because it’s chatty, meaning a large number of back-and-forth transactions are required to complete a request.
For example, to transfer a single 30MB file, CIFS would have to make hundreds of round trips between a client and a server. On a typical LAN this would take a few seconds, but on a 2Mbit/s WAN link with 300-millisecond latency, it would take approximately 7.5 minutes. WAN acceleration appliances can solve the performance problem.
These devices are placed at both ends of a WAN link, such as in a datacentre and branch office. They speed application performance over a WAN, reducing transfer time by as much as two-thirds, to approximately 2.5 minutes for the 30MB file. Further, because the technology can predict client requests and pre-stage data local to the client, subsequent transfers of the same 30MB file will only take about 30 seconds.
CIFS defines a client and server: a CIFS client is used to access files on a CIFS server. For example, each time a user browses or accesses files on a Windows server using Windows Explorer, CIFS is used to transport information (files or directory information) between the client computer and the server it is accessing. In a single round trip, between client and server, the CFIS protocol can transfer only 61KB of data. Each CIFS request requires a response before the next request is sent to the CIFS server. As latency increases, performance decreases.
A WAN acceleration appliance must incorporate in-depth knowledge of the CIFS protocol so it can determine when a certain CIFS transaction is likely to occur and then act on behalf of both client and server to reduce latency on the client side to LAN-like levels.
It does this by pre-fetching data (for example, a file) and temporarily storing it in system memory for future reference. Once the pre-fetched data is referenced it is deleted from the memory. No file caching is involved; just transient storage of data to facilitate improved CIFS response time. This approach also eliminates security concerns because the appliance does not store pre-fetched data as a file and this data is erased from the appliance’s temporary memory if not accessed.
The sequence of events used by a WAN accelerator appliance for a CIFS file download (read) request is as follows:
• CIFS client opens a file for reading.
• CIFS server responds with a file ID.
• CIFS client issues the first read request and CIFS server responds with data. This first transaction takes a relatively long time because the read request and response are bound by WAN latency.
• Once the WAN application accelerator sees the initial transactions, it can determine if the CIFS client is attempting a file download. If it is, the WAN acceleration appliance on the server side begins pre-fetching data by generating read requests locally to the server. If this is a repeat transfer, or if the file contains repeated data, then the WAN accelerator appliance on the server-side will transfer only a small amount of data. This will further speed up the CIFS transfer.
• The pre-fetched data is sent to the client-side appliance and stored temporarily in anticipation of requests from the CIFS client. As the CIFS client requests the file data, instead of getting each 61KB from the server (and going across a high-latency WAN), it now gets the replies locally from the client-side appliance at LAN speeds. This will vastly improve CIFS download performance.