EldoS | Feel safer!

Software components for data protection, secure storage and transfer

CBFS 5.1 read performance far lower than dokan

Also by EldoS: SecureBlackbox
200+ components and classes for digital security, signing, encryption and secure networking.
#36354
Posted: 03/31/2016 05:44:51
by Traum Lou (Standard support level)
Joined: 01/28/2014
Posts: 8

Dear

I tried to test the read performance on dokan and cbfs, but the result is really frustrated, dokan is almost 5 times faster than cbfs.

I develop the virtual drive on dokan and use it for at least 3 years, and recently I tried to use cbfs, cbfs is really easy to develop, and fix a lot of problem we meet at dokan, everything looks good until I test the read performance between them.

the version of cbfs is : 5.1.164, the windows is server 2012 R2.

I use the Mapper of cbfs and mirror of dokan to test, it's easy for you to obtain and test.

here is the test method:
I only change the code in the onReadFile function of cbfs's Mapper:

Code
memset(Buffer, 0, BytesToRead);
*BytesRead = BytesToRead;

/*if(!ReadFile(Ctx->hFile, Buffer, BytesToRead, BytesRead, &Overlapped))
{
    throw ECBFSError(GetLastError());
}*/


and I do the same thing in the read function of dokan's mirror.
then I mount both of them to a local drive like N:\\, there's only a file called "test", and it's size is 32G, next I use iozone to test it, the iozone's command is as follow:

Code
./iozone -i 1 -+n -r 128k -s 31g -+E -f /cygdrive/n/test


the result is really frustrating, the dokan's speed is about 905829, and the cbfs's speed is about 179116, maybe the newer version of cbfs might have improvement, but I only test on cbfs 5.1, although cbfs is really easy to use, it cannot be a substitude of dokan because of the performance.

I hope this problem can be fixed.

Thanks
#36357
Posted: 03/31/2016 09:50:12
by Eugene Mayevski (EldoS Corp.)

Thank you for the detailed report.

Speed of CBFS is affected by multiple factors, such as caches and use of locks to prevent race conditions and deadlocks. The lack of locks in Dokan is one of the factors that make speed faster, but cause stability problems.

In some scenarios disabling the file cache improves speed, so you can try to turn off the file cache (use FileCacheEnabled property) and do measurements again.


Sincerely yours
Eugene Mayevski
#36373
Posted: 04/01/2016 04:04:34
by Traum Lou (Standard support level)
Joined: 01/28/2014
Posts: 8

Thank you for your prompt response,

I tried to do what you told me, The Mapper speed is really amazingly faster than before, it's about 2392363, then I test my product, it does have quite good performance and faster than dokan.

The question is, since FileCacheEnabled is turn on by default, what would be sacrifice if I turn it off? the stability? or something others? since turn off the file cache would have such good performance, why not set it to false by default?

Thanks
#36375
Posted: 04/01/2016 05:08:10
by Eugene Mayevski (EldoS Corp.)

The cache is useful in real-life conditions when the same data is accessed several times. When you read or write a huge file, the cache only slows down operations. Unfortunately there's no way for the driver to distinguish between the types of operations.


Sincerely yours
Eugene Mayevski

Reply

Statistics

Topic viewed 1977 times

Number of guests: 1, registered members: 0, in total hidden: 0




|

Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!