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

Possible Underestimation of Channel Transfer Time Calculation #1

Closed
FeiDaLI opened this issue Oct 23, 2024 · 1 comment
Closed

Possible Underestimation of Channel Transfer Time Calculation #1

FeiDaLI opened this issue Oct 23, 2024 · 1 comment

Comments

@FeiDaLI
Copy link

FeiDaLI commented Oct 23, 2024

Hello,
I’ve been reviewing your code and noticed a potential issue regarding the calculation of channel transfer time. In the transfer_time method, you used the following formula:
def transfer_time(self, cmd):
return cmd.data_sz / self.bw
Here, data_sz is approximately 4KB (4000 bytes), and bw is 800 Mbps. This calculation results in a transfer time of 5 microseconds.
However, when calculating the time it takes to transfer 4KB at a bandwidth of 800 Mbps, my calculations suggest that it should be around 40 microseconds.
It seems that the channel transfer time may be underestimated in your implementation. I would appreciate it if you could review my understanding of this issue.
Thank you!
image

@wangyuyue
Copy link
Owner

Hi, the mbps here means megabyte per second, not megabit. Sorry for the confusion it makes.
So the latency is calculated as 4,000 byte / 800,000,000 byte/s * 1,000,000 us/s = 5 us.
Hope this solves your issue.

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

No branches or pull requests

2 participants