Click to See Complete Forum and Search --> : Using multithreading for Backup Process
muktif@yahoo.com
July 1st, 2008, 09:04 AM
We have developed a application in Java that does a remote data backup. We have written the program that reads the directory contents recursively and saves it to a HSQLDB database. This process is working fine however the backup is very slow when the amount of data is large. We are thinking of using multithreading to make the process faster. The problem is that how do we divide the work of reading the directories to the threads. Can you suggest any some algorithm for doing this.
Codeplug
July 1st, 2008, 10:09 AM
First you should try to figure out where all the time is being spent. You may find that 85% of the time is I/O bound time (disk throughput) - so any speedup would have to come from the other 15% - which threads may not help at all.
Are you converting this Java app to C++? If so you might want to do some profiling to understand where time is being spent - and if C++ or threads will be of any benefit.
gg
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.