Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Propagator: Balance concurrent up/down-load #1633

Open
guruz opened this issue Apr 2, 2014 · 5 comments
Open

Propagator: Balance concurrent up/down-load #1633

guruz opened this issue Apr 2, 2014 · 5 comments

Comments

@guruz
Copy link
Contributor

guruz commented Apr 2, 2014

When synchronizing, it makes sense to try to keep at least 1 PUT and 1 GET running at the same time so we don't actually waste time by not trying to use the connection both upstream and downstream at its fullest.

(MOVE, MKCOL, DELETE do not matter in this issue I'd say)

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/1455057-propagator-balance-concurrent-up-down-load?utm_campaign=plugin&utm_content=tracker%2F216457&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F216457&utm_medium=issues&utm_source=github).
@guruz
Copy link
Contributor Author

guruz commented Nov 27, 2014

Status: With the new job scheduler that @ogoffart did for 1.8, this might be easier to implement now.
Instead of picking just the "next" job in the list, the scheduler could pick a next one based on the kind of current one

@danimo danimo modified the milestones: 1.9 - Multi-account, 1.8 - UI Enhancements Jan 19, 2015
@guruz guruz modified the milestones: 2.1-next, 2.0 - Multi-account Jun 24, 2015
@guruz guruz removed this from the 2.1-next milestone Sep 3, 2015
@guruz guruz changed the title New Propagator: Balance concurrent up/down-load Propagator: Balance concurrent up/down-load Jan 11, 2016
@mrow4a
Copy link
Contributor

mrow4a commented Nov 16, 2016

Awesome, so the concept exists. Nice! Will do that surely.

@mrow4a
Copy link
Contributor

mrow4a commented Nov 17, 2016

@guruz @ogoffart One question, why do we actually keep a list of all finished jobs in PropagateDirectory::scheduleNextJob(), instead of just destroying them?

@ogoffart
Copy link
Contributor

why do we actually keep a list of all finished jobs

We probably should delete them indeed.

@mrow4a
Copy link
Contributor

mrow4a commented Nov 21, 2016

Ok. will see what we can do about it.

@ogoffart @guruz @DeepDiver1975 @cdamken
I actualy have also anotheridea about the file scheduling. This could be done both inside the folder and outside folders.

During the loop over all files to synchronise, we structurise our directories so that they are being synced in order of insertion, does not matter is specific tree contains 100GB of data to sync, and another 1MB of very important document, but added to sync list later.

We could do it a little bit smarter. After we have all the "directories" object, we can give the folder ordered sync instructions, with which files/folders to start within that specific folder - according to their total size.

Imagine you have following folder structure to sync:

In current implementation, these files will be synced as they are met in the structure below:

ownCloud Root
├── less-important-folder-10MB/
│ └── less-important-file
├── Home&Work-10GB/
│ └── folder with nested 10GB of photos to be sync
│ └── very-very-important folder with single documents to sync
│ └── less-important-document - 1MB
├── important-folder-12MB/
├── less-important-folder - 5MB/
│ └── less-important-document
└── important-file-1MB

However, post-loop could quickly restructurise it as follows, looking of size of files within to sync (of course not by priority, because ownCloud does not support sth like FOLDER PRIORITIES:

ownCloud Root
└── important-file-1MB
├── less-important-folder-5MB/
├── less-important-folder-10MB/
│ └── less-important-file
├── important-folder-12MB/
└── less-important-document
├── Home&Work-10GB/
└── less-important-document - 1MB
└── very-very-important folder with single documents to sync - 2MB
└── folder with nested 10GB of photos to be sync

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants