Author Topic: How do I make read/write strategy stick?  (Read 16582 times)

sigil

  • Newbie
  • *
  • Posts: 4
    • View Profile
How do I make read/write strategy stick?
« on: June 10, 2016, 05:30:57 »
So, I decided to find a replacement for Total Commander eventually. The first impression of Multi Commander is very positive, yet I stumbled upon one problem: file copy speed. The root cause seems to be that MC always uses "Power, Same disk" as default. File copy becomes 3 times faster (no kidding, I tested it) when I manually set "Normal, Same disk" but MC resets it back every time I open the file copy dialog.

I tried using presets hidden even deeper in the copy dialog. No luck as of yet. Could someone please tell me the exact sequence of settings to make read/write strategy stick? My imagination fails me.
« Last Edit: June 10, 2016, 05:52:18 by sigil »

Mathias (Author)

  • Administrator
  • VIP Member
  • *****
  • Posts: 4416
    • View Profile
    • Multi Commander
Re: How do I make read/write strategy stick?
« Reply #1 on: June 10, 2016, 07:28:36 »
You save them after you edit them. There is a save button.
You can also in Core settings also disable the auto detection and then it will always use normal profiles.

But, You might think it is faster but unless you have some special HW and conditions that is not the case. The problem is that it might look like it is.
and it depends on how you test it. The problem is Caches both Windows System cache and driver and drive caches.

The "Normal" profiles are using the system and disk cache, This is the most compatible way, but in reality it is also slower (even if it looks faster)
So MC thinks the data has been sent to the device when it in reality only been cached by Windows.
What windows does after this is to actually write the data to the disk.  So you might think it is faster. but that is because the data is not actually written to disk yet.
(That why on removable drives you got the remove safe things in the tray. that force everything that is caches to be written to that device so it is not lost)

That why on large files you can see that a copy process stops/halts for a while before continuing. That is because Windows file system cache get full and new writes are blocked until windows have written data to disk so it can flush it. and can accept new data.

When copying large amount of data, copying without writing the data via the windows cache is faster (Unless you have special HW and something). because the data is not stored in a second places before it is written.

Also measuring speed correct is very hard because of how windows and drives caches and how programs think the data is written when it is not.
Also some AV software know when a file been scanned once. so sometimes it will get scanned again when copied and sometimes not.

sigil

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: How do I make read/write strategy stick?
« Reply #2 on: June 10, 2016, 08:39:14 »
Thank you very much for your response. Again, please do not see my questions as anything like criticism - MC is a pretty decent solution and I'm sticking with it. Next,

1. Tried turning it off in Core Settings as you said. Now it defaults to "Normal, Different disks". Better than what I had before but I'd really like the way to set it to "Normal, Same disk" because 99% of my file operations are performed on, well, one and the same disk C.

2. About testing: it's 6 minutes versus 15 minutes according to my wrist watch. Tested after reboot to make sure Windows built-in caching does not interfere. I don't think I'm imagining it. Test data is the Firefox profile directory - 500 MB of small files.

3. I found a workaround of enabling drive cache in the "Power, Same disk" strategy. Dirty but works.

Mathias (Author)

  • Administrator
  • VIP Member
  • *****
  • Posts: 4416
    • View Profile
    • Multi Commander
Re: How do I make read/write strategy stick?
« Reply #3 on: June 10, 2016, 09:20:04 »
Read / Write are a complex things to understand. Different Hardware combination can also cause problems with some settings. Some settings combination require that all hardware layers support it and handles it correct.
There are so many things happening that you don't see and so many external factor and other program can have an impact on the performance..

1. It default to "Normal, Different disks" if the copy are between two physical disk. because then it can read from one while it are writing on the other. and that are a lot faster. Unless you force this for copy on the same disk. then it will be a lot worse.
The different between Normal Same and Different profiles are the asyncronous read/write..

2. The data have been written to the cache and not the disk when MC thinks it is finished and it say copy is done (With normal profiles).
Windows will then flush it to the disk in the background.  That is the problem with measuring with a watch and not special tools that sees what Windows does.. you only time the part that are shown in the UI.
But for some this is what they want. they don't care that it is not written yet, and that Windows does that in the background

3. Depending on drive, drive cache help,, But it can also slow down a bit unless system cache is also on.
But it depends on HW. so it is a test and try things.. so if on works for you then it is good.

And to make things more confusing. Some settings are better when copying lots of small files and some are better when copying large.

If you just want Copy to fell fast. then enable all the cache, and a buffer that is not to small, and a read/write chunk size of 1mb
« Last Edit: June 10, 2016, 09:34:39 by Mathias (Author) »

sigil

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: How do I make read/write strategy stick?
« Reply #4 on: June 10, 2016, 09:46:03 »
HDD light goes off too, though. Meaning, all writing is finished physically and not just to Windows cache.

Again, thank you very much for your help; the way it works now seems to be okay. Overall, MC is a huge advance over what I've been using.

Mathias (Author)

  • Administrator
  • VIP Member
  • *****
  • Posts: 4416
    • View Profile
    • Multi Commander
Re: How do I make read/write strategy stick?
« Reply #5 on: June 10, 2016, 09:49:11 »
No. That only mean windows does not currently write it. It will write it later..
:)

sigil

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: How do I make read/write strategy stick?
« Reply #6 on: June 10, 2016, 10:11:57 »
Actually, Windows flushes its cache when the last handle open on the file is released. Since MC is the only process to keep handles on the files it writes, I would assume the cache to be flushed when MC says it is done writing - unless you are using some seriously obscure logic there.

Mathias (Author)

  • Administrator
  • VIP Member
  • *****
  • Posts: 4416
    • View Profile
    • Multi Commander
Re: How do I make read/write strategy stick?
« Reply #7 on: June 10, 2016, 10:32:47 »
No. It CAN flush after the file handles are closed. becuse then the program say that it is finished with the file, and you can tell it to flush the file.  But Windows do not do it directly when the file handle is released. It depends. Windows can wait quite a while before doing it. depending on hardware and setup, Since 7 and specially since 8. The caching have changed a lot

That is the reason you by pass the system cache, Then the file is written directly, Without waiting for windows. and often when you copy a file you do not need to read it directly again so there is not need to have it stored in cache.
« Last Edit: June 10, 2016, 10:37:37 by Mathias (Author) »

Jungle

  • Contributor
  • VIP Member
  • *****
  • Posts: 537
  • Old Skull
    • View Profile
Re: How do I make read/write strategy stick?
« Reply #8 on: June 10, 2016, 10:35:36 »
Mathias
Add STRATEGY option to MC.Explorer.Copy custom command.