AMP
AMP copied to clipboard
Fitness Metrics returned by API incorrect
Operating System
Ubuntu Linux 24.04.2
AMP Version and Build Date
2.6.1.2 - 20250325.1
AMP Release Stream
Mainline
I confirm that
- [x] I have searched for an existing bug report for this issue.
- [x] I am using the latest available version of AMP.
- [x] my operating system is up-to-date.
Intended Action
Using the AMP API to pull Target status to determine the best host to start a new instance on.
The FreeRAMMB value is returning a value lower than the amount of free RAM reported by the OS. (htop)
The ScoreDescription is also incorrectly showing the amount of FreeRAM
Expected Behaviour
The Fitness score should report the amount of free RAM the same way the OS does. For example,
here, the Free ram should be reporting around 14GB
Actual Behaviour
The freeRAMMB does not appear to account for cached Memory, so reports a value much lower than the actual free RAM.
ScoreDescription is also reporting the Free RAM value in MB, rather than GB:
"Fitness": {
"Available": true,
"TotalServices": 2,
"FreeRAMMB": 11278,
"FreeDiskMB": 457035,
"CPUServiceRatio": 3,
"ThreadQueueLength": 0,
"LoadAvg": -1,
"RemainingInstanceSlots": 8,
"Score": 3,
"ScoreDescription": "Remaining Slots: 8, Free RAM: 11MB, CPU Ratio: 3",
"ScoreZeroFactors": []
}
Reproduction
Query the API using the GetInstances() function