High cpu usage during a sync session RRS feed

  • Question

  • I am working on a file sync application that would perform a remote sync. I am working over the ManagedNTFSSample provided in the microsoft sync framework sdk to build a custom provider. One thing i noticed is that while the sync session is in progress the cpu usage goes upto 90-95% in the source machine when there are large number of files to be synchronised(tried with 5000 files). This generally happens during the change detection phase. I tried the same scenario with the ManagedNTFSSample and the default filesyncprovider sample and the cpu usage was high(90-95%) in this case too. Is there any way to optimize this as high cpu usage is a major concern


    • Moved by Max Wang_1983 Thursday, April 21, 2011 1:07 AM forum consolidation (From:SyncFx - Technical Discussion [ReadOnly])
    Tuesday, July 14, 2009 12:52 PM


  • Jagdish,

    If I understand correctly, you mentioned that you are building a custom provider based on samples ? That's great!
    But by any chance have you turned on FileSyncOptions.CompareFileStreams ? If so, that could be CPU intensive. This option calculates the hash of each file it tries to detect changes on. So if you have large number of files, change detection would be busy calculating the hash for those file streams.

    Is high CPU usage the issue or is it the high CPU usage for long time ? If it's the latter, maybe you can use a smaller batch size to see if you user experience seems more acceptable.

    Hope this helps,

    Wednesday, August 19, 2009 7:27 PM