Copy engine 0.3

From Ultracopier wiki
Jump to: navigation, search

Introduction

Ultracopier-0.3-copy-engine.png

 Thead 1: Copy list send/receive event (start transfer, stop transfer event), Thread list of {Read thread, Write thread, transfer thread} with pipe like communication.

Plain red: write, Plain blue: read, Dashed red: pre and post operation for the write file, Dashed blue: pre and post operation for the read file

  • Advantage: Can parallel the inode and data access, prevent no copy operation to slow down the copy. Can group inode access via parallel access, but data parallel is bad in general. Have asynchronous behavior like for all OS/FS (included synchronous OS/FS like linux/ext4). Very cleaner design, possible separate control on each transfer. Can recovery destination file write corruption.
  • Disadvantage: Need master multi-thread, data locality, and lot of advanced algorithm.

Complexity

In typical case, 64 transfer pool, 64x3 thread allocated on transfer pool, 1 by folder listing, 1 by list management, more than 2 000 000 transfer to do.

  • /!\ insert: n(1)
  • move: n(x)*n(y), x = transfer list size, y = number of item to move
  • /!\ remove by finish: n(x), but just 64 interation to do (number of transfer object), in general near than n(1)
  • remove by user: n(x)*n(y), x = transfer list size, y = number of item to remove
  • /!\ new transfer start: n(x), but just 64 interation to do (number of transfer object)
  • /!\ new transfer stop: n(x), but just 64 interation to do (number of transfer object)
  • /!\ Folder listing, n(x), where x is the number of file to transfer

/!\ = frequently called in normal copy