lukechampine / user

A CLI renter for Sia
MIT License
12 stars 2 forks source link

idea: upload & download acseleration speed #22

Open vargrant opened 4 years ago

vargrant commented 4 years ago

After investigation siad & siac I can say that we have greate posibillities to accelerate download & upload speed becuase original sia client it's seems don't use this posibilies even if have enough contracts. I tried to setup 150 hosts, have a lot of contracts, but have very bad speed and redunancy in this case is only 3x - "renter allowance" command give this information.

For example. We can see a lot of hosts who is proposing very cheap storage but have very small speeds - for example will think near 1 mbit upload & 1 mbit download ! Usualy costs is near 100 SC per TB. More fast hosts propose speed nead 50 mbit - but costs is near 400 SC per TB.

What we can do for posibillity to have cheap prices and fast speed ?!

Algorithm. Redunancy - user ajustable variable. For example 4x Hosts - user ajastable variable. For example 40 hosts. Speed Upload/Download for each host 1 Mbit - just for example. This situation give us posibillity to have 10 Mbit speed for upload / download even if clients have speed only 1 Mbit.

1) All our data must be devided on 10 parts which must be uploaded 4 times on 40 hosts. 2) We must start proces upload/download 4 times - beucase we need to economize our own bandwidth. But each times of upload/download (4 cycles total and deppend from redunancy) must start upload 10 processes in one time - it will give us increated speed. And second reason after 1 times our data will be uploaded - we will have full copy of required data on hosts and already can start download it if it will be required by situation (we want to use network file systems like ext4 into the sia). 3) In real life all this hosts will have different speed - one host will have 1 Mbit but other host will have 2 Mbit. We need try to finish our each cycle in one time and will have situation when our worker (process for download 1 parts of data from 10) will be finished much earlier than another process. In this case we need to get part of data from from another worker who is still in process of uploading - but we need not interrupt this worker, but just give part of data which is not uploaded. For example worker uploading part with weight 100 MB, currently uploaded 40 MB, another worker already uploaded own 100MB and now is free. So this worker can get 30 MB from worker who need to upload also 60 MB. If you have question that 10 workers total and one is finished then which worker must be selected for posibillity to give own data to the another worker - ofcouse every time you need to select most bisy worker who need to upload data more then other workers. 4) After 1 cycle we must start next cycles also one by one for posibillity to increse redunancy for according to our required settings.

vargrant commented 4 years ago

in the descibed sample download speed can be in 4 times more then upload speed - deppend from redunancy.