Unipisa / Simu5G

Simu5G - 5G NR and LTE/LTE-A user-plane simulation model for OMNeT++ & INET
https://simu5g.org
Other
142 stars 81 forks source link

Strange processing time with fair sharing mode enabled #162

Closed zazim13 closed 1 year ago

zazim13 commented 1 year ago

Hi, I am experiencing strange processing time using vim->calculateProcessingTime() with fair sharing mode enabled. After some debugging I think that there is a problem with CPU units. The allocatedCPU variable has the same unit than virtualCpu parameter in the application descriptor Json, which should be MIPS from this answer. Than the maxCpuSpeed parameter that should be in MIPS also from here, is converted here in instruction per second. This is problematic when using fair sharing mode because the values are divided. It must also be problematic for admission control and must answer my precedent issue #160 Sincerely Hakim

linofex commented 1 year ago

Hi, you are right. A conversion of the value in the JSON descriptor is needed somewhere. In order to manage all the vales in MIPS I decided to remove the conversion everywhere but the time calculation. This will fixed in a next commit, but for now you can:

remove the pow multiplication here and here. Next, the time calculation in calculateProcessingTime method becomes: time = numOfInstructions/(pow(10,6)*currentSpeed); in both the modes.

Let me know if everything gets solved,

best regards,

Alessandro

giovanninardini commented 1 year ago

This has been fixed by commit b4e2b2f