CREDITSCOM / node

Credits Node is the main module that provide an opportunity to run a node and participate in CREDITS blockchain network.
https://developers.credits.com/
GNU Affero General Public License v3.0
151 stars 16 forks source link

Speed of Download & Speed of Sync #57

Open CryptoDZ opened 4 years ago

CryptoDZ commented 4 years ago

Hello I monitor the node Linux_Main_4.2.426.2-1 the download speed doesn't match with the speed of synchronization I am rarely under 40mo/s but i think in reality the node synchronizes at a speed of about 300ko/s (when I see the time it takes to be totally synchonized)

Sans titre 2 For example I downloaded the equivalent of 305GB data and in reality i have x10 less database i synced only 32gb

My second nodes sync since 30 Hours : photo_2019-10-09_00-20-38

tkoen93 commented 4 years ago

@CryptoDZ Don't forget that during synchronization your node is constantly in contact with other nodes in the network. Receiving the latest data and passing this to other nodes as well. Also don't forget the difference between Mbit/s (Megabit, according to your screen) and the 300kb/s you mention (Kilobytes), 1 bit = 0.125 bytes

I agree with you that it may be a bit high, but that those numbers don't match is correct.

CryptoDZ commented 4 years ago

Hello Timo after all your kind thinking, it's with pleasure that i give you the explanation when you comunicat with other nodes as you say "to download" the database "incoming" it's around 57GB at a speed of 42mo/s it dosen't take more than 0:23:09 if my avrage is at 25MB/s the download of 57gb = 0:38:57 even if we consider that the node needs a little time to transmit the data from the cache to the hard disc so it shouldn't take more than 48H as it is the case actually and also you don't need to spend 305GB of data If you Try to download 57GB at a speed of 300ko/s you will see that you need to wait the end of download in 2 days 7 hours 20 minutes and 29 second

tkoen93 commented 4 years ago

@CryptoDZ Your calculation is incorrect. Please try to understand the difference between bits and bytes. Currently you're saying that the database is around 57 gigaBYTES and your average download speed is 42mBIT/s. You can not simply divide those two as they're not the same. With the knowlegde of 1 bit being 0.125 bytes you either multiply the 57 gigabytes by 8 or devide your download speed by 8.

57gb / 5.25megabyte (42 mbit / 8) = 03:25:43. So according to your method of calculating the time needed it should be close to three and a half hours instead of less than half an hour.

Beside all this, as said, I agree with you that it might be a little high. You're not just communicating with other nodes to receive the current db, but you're communicating to receive small parts (25 blocks at a time if I'm not mistaken). Next to that you're also receiving current round/block data and probably sending this to other nodes in the network in the meantime, just not taking part in consensus (yet, as you're not synchronized).

CryptoDZ commented 4 years ago

Seeing that you know about what I'm talking and you already know the curruntly size of the database try to understand and make the effort to replace the "b" by 'o' and you will arrive at the conculution that my calculation is correct now let our devs answer to my interogation that's the purpose of using github and not @creditstechnical thank you

CryptoDZ commented 4 years ago

I understood the confusion @tkoen93 Mo or MB = Mega Octet (French Version) MB = Mega Byte (English or US Version)

MB (MegaBytes) and Mb (MegaBits) should not be confused. use this site to converte for exemple 300 Kilobit to 300 kBytes https://www.convertworld.com/fr/mesures-informatiques/octet-byte.html

use this site also to know in Frensh version find the time of speed transfert of 57Go in bandwidth of 300ko/s https://www.wooxo.fr/informations/utilitaire-temps-transfert