Re: [Dar-libdar_api] Re: problem compiling KDar with libdar CVS
For full, incremental, compressed and encrypted backups or archives
Brought to you by:
edrusb
|
From: Johnathan B. <jk...@sh...> - 2004-11-07 16:28:47
|
On Sunday 07 November 2004 04:18, Denis Corbin wrote: > Johnathan Burchill wrote: > | Hi Denis, > > Hello Johnathan, > > | On Wednesday 03 November 2004 13:08, Denis Corbin wrote: > |>Denis Corbin wrote: > |>|[...] > |>| I proposes the following API : > |>| > |>| ~ void cancel_thread(pthread_t tid); > |>| ~ bool cancel_current(pthread_t & tid); > |>| ~ void cancel_clear(); > |>| > |>| where cancel_thread() is used to cancel the given thread. Which will > |>| make libdar throw a Euser_abort exception, cleanly free memory and > |>| release any mutex. > |>| > |>| cancel_current() return true and the tid of the thread that will be > |>| canceled when execution will reach the next checkpoint, false if > |>| there is not pending cancelation. > |>| > |>| cancel_clear() abort cancelation process if the thread has not > |>| already terminated. > |>| > |>| Only one thread can be canceled at a time. > |>| > |>| > |>|[...] > |> > |>Hello, > |> > |>[...] > | > | I've got KDar running on libdar API V3.0.0, CVS. Works great! > | The thread cancelation works perfectly, my limited testing shows. > | The response is very snappy, and the user does not have to wait or > > restart > > | the program to stop an operation anymore. I think that you have a good > | implementation of thread cancelation. Quite elegant. > > Thanks for the compliment :-) However I must check that the execution > speed is not too lowered by the simple but much frequent check done to > detect thread cancelation requests. > Here's a data point for you. On my Athlon-XP 1800+, 512 MB RAM, I created two archives of the kdar cvs source directory, using bzip2 compression. The two archives were created with the same settings, the only difference being that one was made with libdar 2.5 and the other with libdar 3.0.0 (from KDar). Both operations took 32 seconds to complete. Here's the command-line equivalent of the operation: dar -v -c /opt/user/backups/dar_backups/test-kdar-backup-20041107 -R /opt/user/src/kdarcvs/kdar/ -w -s 4613734400 -D -y -m 150 -Z "*.Z" -Z "*.avi" -Z "*.bz2" -Z "*.gif" -Z "*.gz" -Z "*.jpg" -Z "*.mov" -Z "*.mpg" -Z "*.pbm" -Z "*.pdf" -Z "*.png" -Z "*.pnm" -Z "*.zip" -X "*.dar" -X "*~" -X ".*~" When run with the statically-linked dar, here are the results: API V2.5: -------------------------------------------- 992 inode(s) saved with 0 hard link(s) recorded 0 inode(s) not saved (no file change) 0 inode(s) failed to save (filesystem error) 33 files(s) ignored (excluded by filters) 0 files(s) recorded as deleted from reference backup -------------------------------------------- -------------------------------------------- Total number of file considered: 1025 real 0m31.268s user 0m26.900s sys 0m0.980s API V3.0.0 (dev): -------------------------------------------- 992 inode(s) saved with 0 hard link(s) recorded 0 inode(s) not saved (no file change) 0 inode(s) failed to save (filesystem error) 33 files(s) ignored (excluded by filters) 0 files(s) recorded as deleted from reference backup -------------------------------------------- -------------------------------------------- Total number of file considered: 1025 real 0m31.703s user 0m27.170s sys 0m0.850s These are not rigorous benchmarks. In particular, the thread cancellation overhead might be compensated for some other speed improvement in API 3.0 compared to API 2.5. Anyway, for what it's worth... Cheers, JB > | One point about libdar's "make install": the config.h header that gets > | put > | into <installdir>/include/dar/ does not contain "#define MUTEX_WORKS > | 1" when I configure libdar with pthreads, so I have to add it manually > | to get KDar to compile. > > OK, I will fix that. Thanks for feedback. > > | [...] > | > | Cheers, > | JB > > Cheers, > Denis. > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: > Sybase ASE Linux Express Edition - download now for FREE > LinuxWorld Reader's Choice Award Winner for best database on Linux. > http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click > _______________________________________________ > Dar-libdar_api mailing list > Dar...@li... > https://lists.sourceforge.net/lists/listinfo/dar-libdar_api -- Johnathan K. Burchill, Ph.D. Department of Physics and Astronomy University of Calgary 2500 University Drive N.W. Calgary, AB T2N 1N4 Canada (403) 217-4286 jk...@sh... |