{"action":"created","issue":{"url":"https://api.github.com/repos/NebulousLabs/Sia/issues/1507","repository_url":"https://api.github.com/repos/NebulousLabs/Sia","labels_url":"https://api.github.com/repos/NebulousLabs/Sia/issues/1507/labels{/name}","comments_url":"https://api.github.com/repos/NebulousLabs/Sia/issues/1507/comments","events_url":"https://api.github.com/repos/NebulousLabs/Sia/issues/1507/events","html_url":"https://github.com/NebulousLabs/Sia/pull/1507","id":192573360,"number":1507,"title":"Renter pools","user":{"login":"DavidVorick","id":2316841,"avatar_url":"https://avatars.githubusercontent.com/u/2316841?v=3","gravatar_id":"","url":"https://api.github.com/users/DavidVorick","html_url":"https://github.com/DavidVorick","followers_url":"https://api.github.com/users/DavidVorick/followers","following_url":"https://api.github.com/users/DavidVorick/following{/other_user}","gists_url":"https://api.github.com/users/DavidVorick/gists{/gist_id}","starred_url":"https://api.github.com/users/DavidVorick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DavidVorick/subscriptions","organizations_url":"https://api.github.com/users/DavidVorick/orgs","repos_url":"https://api.github.com/users/DavidVorick/repos","events_url":"https://api.github.com/users/DavidVorick/events{/privacy}","received_events_url":"https://api.github.com/users/DavidVorick/received_events","type":"User","site_admin":false},"labels":[{"id":383187601,"url":"https://api.github.com/repos/NebulousLabs/Sia/labels/in%20progress","name":"in progress","color":"ededed","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":11,"created_at":"2016-11-30T14:03:43Z","updated_at":"2016-12-13T16:58:22Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/NebulousLabs/Sia/pulls/1507","html_url":"https://github.com/NebulousLabs/Sia/pull/1507","diff_url":"https://github.com/NebulousLabs/Sia/pull/1507.diff","patch_url":"https://github.com/NebulousLabs/Sia/pull/1507.patch"},"body":"None of the tests are passing, this PR is being opened mostly for a high-level pass on what's happening.\r\n\r\nBasically, there's a worker pool now in the renter. Each worker has a contract and can perform uploads and downloads with the host on the other side of the contract.\r\n\r\nThe download queue will download 1 file at a time, with a moderate amount of parallelism. There is not really much randomization happening, which might mean it's somewhat inferior to the previous download scheme. However, I believe that the previous download scheme was entirely serial, whereas this download scheme will download an entire chunk in parallel, and it'll also download multiple chunks at the same time.\r\n\r\nI would like to expand it so that it can also download multiple files at a time, but the code needs more work before getting there.\r\n\r\nThe uploading has much stronger parallelization now. The previous scheme was bottlenecked by the slowest host, basically meaning that uploads could move at-best as fast as 24x the slowest host, though I think in practice long timeouts meant that things usually moved very slowly, especially when trying to get to the first redundancy.\r\n\r\nThings are still technically bottlenecked by the slowest host, however faster hosts will move onto the next chunk instead of waiting for the slower hosts. The time to reach 1x or 2x redundancy should very dramatically reduced.\r\n\r\nWhat happens right now is a giant matrix of work is created when doing an upload. Every chunk that might need attention is looked at, and there's a grid that sort of remembers how much redundancy each chunk has already. 4 workers are set upon each chunk, meaning the chunk gains 1x redundancy at a time. When parallelizing, the algorithm waits until there are enough workers available and then it scans through and finds a chunk that is missing pieces from at least 4 of the available workers. Then it performs those uploads.\r\n\r\nThere's still a ton of room for optimization, and the giant upload matrices don't scale very well. But things should be moving a lot faster now vs. earlier. Once the bugs are worked out, at least."},"comment":{"url":"https://api.github.com/repos/NebulousLabs/Sia/issues/comments/266795548","html_url":"https://github.com/NebulousLabs/Sia/pull/1507#issuecomment-266795548","issue_url":"https://api.github.com/repos/NebulousLabs/Sia/issues/1507","id":266795548,"user":{"login":"DavidVorick","id":2316841,"avatar_url":"https://avatars.githubusercontent.com/u/2316841?v=3","gravatar_id":"","url":"https://api.github.com/users/DavidVorick","html_url":"https://github.com/DavidVorick","followers_url":"https://api.github.com/users/DavidVorick/followers","following_url":"https://api.github.com/users/DavidVorick/following{/other_user}","gists_url":"https://api.github.com/users/DavidVorick/gists{/gist_id}","starred_url":"https://api.github.com/users/DavidVorick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DavidVorick/subscriptions","organizations_url":"https://api.github.com/users/DavidVorick/orgs","repos_url":"https://api.github.com/users/DavidVorick/repos","events_url":"https://api.github.com/users/DavidVorick/events{/privacy}","received_events_url":"https://api.github.com/users/DavidVorick/received_events","type":"User","site_admin":false},"created_at":"2016-12-13T16:58:22Z","updated_at":"2016-12-13T16:58:22Z","body":"Worth noting that uploads and downloads can be running at the same time, or at the very least the renter could be switching between them rapidly. Which means the cached revisions may fail or something? I'm not sure.\r\n\r\nDo the cached revisions get Fsync'd? Though, I haven't had any power disruptions so that shouldn't actually matter."}}
{"actor":{"display_login":"DavidVorick"}}