9/4/2023 0 Comments Fast file copy windows 10![]() The file is read from a linux-based nas with a 10 Gigabit Ethernet interface with a 60 drives san behind (don't worry about its performances, it works very well) and written to a local raid0 which can write data at about 140MB/sec. ![]() ("MY Speed : " + (speed / 1024 / 1024).ToString() + " mo/sec") Īny idea how to enhance the performance ? Readbuffer = Interlocked.Exchange(ref writebuffer, readbuffer) Īsyncwrite = output.BeginWrite(writebuffer, 0, readsize, null, null) Īsyncread = input.BeginRead(readbuffer, 0, readbuffer.Length, null, null) ĭouble speed = input.Length / Duration.TotalSeconds // bytes/s Readsize = input.Read(readbuffer, 0, readbuffer.Length) String src = dst = buffersize = 1024 * 1024 įileStream input = new FileStream(src, FileMode.Open, FileAccess.Read, FileShare.None, 8, FileOptions.Asynchronous | FileOptions.SequentialScan) įileStream output = new FileStream(dst, FileMode.CreateNew, FileAccess.Write, FileShare.None, 8, FileOptions.Asynchronous | FileOptions.SequentialScan) īyte readbuffer = new Byte īyte writebuffer = new Byte My current implementation does the same copy at about 55mb/sec which is already better than the System.IO.File.Copy() which performs at 29mb/sec. I'm trying to implement a filecopy method that can match the performance a copy done with the windows explorer.įor exemple a copy (with the windows explorer) from our nas to my computer, performs above 100mb/sec.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |