I have a C# application and am using the FileStream class to read a 120GB file from an *EDIT * isilon storage unit (mapped to z drive) over gigabit LAN. I start by getting 45 megabytes / second read speeds, but at about the 20GB range my read speeds drop dramatically and settles to about 9 megabytes / second. Does anyone have any ideas on what might be causing the slowdown?
Server is Windows Server 2008 Enterprise R2 64 bit, 16 GB RAM, dual quad core CPU and my app is a 64 bit .NET framework 4.0 console application. Here's my code:
byte[] buffer = new byte[16777216];
int count;
long totalBytes = 0;
FileStream file = File.OpenRead("z:\bigfile.dat");
while ((count = file.Read(buffer, 0, buffer.Length)) > 0)
{
// I track megabyte / second here
totalBytes += count;
}