44

I have folder which contains over 200 files and has size of over 1.3 GB:

enter image description here

I use Gizmo Drive software to create an .iso file from that folder.

enter image description here

The interesting thing is it takes only 1 or 2 seconds!

enter image description here

I have tried that several times. I even tried to create the .iso file on another volume. Again it takes only 1 or 2 seconds.

I tried to mount the .iso file, everything works fine. I thought that it might be an .iso file referencing the source folder then I moved the source folder to another place but no luck. Even copying the produced .iso file takes minutes!

So how come creating the .iso file takes only 1 second! Do you have any explanation for that?

Notes

  1. All tests conducted on a regular HDD, no SSD.
  2. Using Windows 7 x64, have 16 Gig memory, Core i5 CPU.

I have used sync.exe to flush all file system data to disk just after the .iso file is created and sync.exe took 14 seconds to flush the data. That means it actually takes 14 seconds to create the .iso file. A quick benchmark on my D: drive shows that it can write the same .iso file from an SSD to my D: drive in 14 seconds and that confirms the source folder is in RAM and it takes 14 seconds to flush the data.**

  • 28
    You know... caching. – mg30rg Oct 29 '14 at 11:12
  • 1
    Did you try repeating after a full restart of the computer? – ADTC Oct 30 '14 at 3:44
  • 1
    I also suggest trying another software like CDBurnerXP to create an ISO, and check if you get the same results. Also I hope D: is not a RAM Drive - unlikely but possible. – ADTC Oct 30 '14 at 3:50
  • 1
    Try running the Sync command mentioned here after creating the ISO, see how long it takes. – Barmar Oct 31 '14 at 19:12
  • 1
    @Barmar I have used Sync and you can see the result in the last paragraph of the question. Thank you. – Ramazan Polat Nov 1 '14 at 20:13
69

With 16GB of RAM, you probably have a lot of it free for disk caching. The ISO has most likely just been buffered entirely in RAM by the operating system; it'll be written to disk later, but applications don't have to wait for that.

| improve this answer | |
  • 42
    Yes, if you turn off your computer without doing a proper shutdown, data that was recently written by applications may not have actually been written to disk yet. – Wyzard Oct 29 '14 at 1:59
  • 3
    It doesn't take long to 'reserve' space on a file system, I've done this for very large files in C++ (several TB) by seeking to the last byte of the file offset from the origin - instant multi terrabyte file allocation; actually writing that much information takes a little while but with windows 7 files are cached in 'free' memory - files previously read or written will be retained as pages until there is memory pressure to release the pages under the premise that the most likely file to be needed was the most recent to be used - this is new in Windows 7. – Michael Stimson Oct 29 '14 at 4:21
  • 10
    It didn't read the source files... they are already cached in ram because you accessed them recently. Reboot to clear the cache, then try to create the iso and it will be slower. – psusi Oct 29 '14 at 19:23
  • 8
    Microsoft intern chiming in. My manager worked a lot on NTFS, and told me (IIRC) that it can take a whole sixteen seconds from the time you call WriteFile to the time that data starts to hit the disk controller. During that time, read/write calls will refer to the in-memory version. The write-through flag will let you bypass the Windows cache, but you're still at the mercy of the disk controller's cache. – zneak Oct 30 '14 at 1:24
  • 2
    If you copy your file to another drive, you'll be copying the correct data from the cache, even if it hasn't been written to disk yet. All file access goes through the operating system's disk cache, so the OS can present a correct and consistent view of what's been written to the filesystem, even if the actual write to the underlying physical disk hasn't finished yet. (And I'm not sure what you mean about writing all zeros — the value of the bytes doesn't affect how quickly they can be stored to RAM.) – Wyzard Oct 30 '14 at 3:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.