Very slow file splitting to USB sticks

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
hlloyge
Member
Member
Posts: 131
Joined: 2006-11-02, 23:14 UTC

Very slow file splitting to USB sticks

Post by *hlloyge »

Hello all!

I've noticed that file splitting to USB stick, which HAS to be formatted for FAT32, is very, very slow. When I use 7-zip without compression, I get write rate of around 200 MB/sec (which is OK for that stick, it's rather expensive one :)), but file splitting to 3 GB limit goes around, ah, 20 MB/sec?
Can something be done about it?
User avatar
Stefan2
Power Member
Power Member
Posts: 4158
Joined: 2007-09-13, 22:20 UTC
Location: Europa

Re: Very slow file splitting to USB sticks

Post by *Stefan2 »

Yes, split to hard drive and copy the result to USB stick.



 
User avatar
hlloyge
Member
Member
Posts: 131
Joined: 2006-11-02, 23:14 UTC

Re: Very slow file splitting to USB sticks

Post by *hlloyge »

That would be workaround. Why is it so slow while working with USB flash drive? Is there possibility for a fix?
User avatar
Dalai
Power Member
Power Member
Posts: 9387
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Re: Very slow file splitting to USB sticks

Post by *Dalai »

USB drives usually have their cache disabled. And file splitting writes probably many small fragments, which is slow without a cache.

Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48077
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Very slow file splitting to USB sticks

Post by *ghisler(Author) »

Yes, this happens because I cannot use CopyFileEx to write parts to the stick, I have to use a ReadFile/WriteFile loop. Although I write in multiples of the cluster size, writing is very slow due to the disabled write cache. But you can manually enable it, then it will be much faster. But then you have to unmount the stick via system tray (near the clock) before unplugging.
Author of Total Commander
https://www.ghisler.com
User avatar
hlloyge
Member
Member
Posts: 131
Joined: 2006-11-02, 23:14 UTC

Re: Very slow file splitting to USB sticks

Post by *hlloyge »

Damn. I've used same function in Linux in Double Commander, and it works as fast as it should... but I guess there is a big difference between the copy methods in those two OSes.
But how come file splitting with 7-zip without compression works at full speed?
User avatar
Usher
Power Member
Power Member
Posts: 1675
Joined: 2011-03-11, 10:11 UTC

Re: Very slow file splitting to USB sticks

Post by *Usher »

hlloyge wrote: 2019-03-07, 13:59 UTCBut how come file splitting with 7-zip without compression works at full speed?
7-zip uses local HDD for temp files.
Andrzej P. Wozniak
Polish subforum moderator
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Re: Very slow file splitting to USB sticks

Post by *MVV »

ghisler(Author),
Which buffer size does Split function use? Maybe its buffer could be enlarged?
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48077
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Very slow file splitting to USB sticks

Post by *ghisler(Author) »

Yes, that's a good point. Or maybe try to use file mapping to copy - I think I read somewhere that CopyFileEx uses file mapping.
Author of Total Commander
https://www.ghisler.com
Post Reply