-
Notifications
You must be signed in to change notification settings - Fork 30.1k
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
test: skip the freemem test on IBMi PASE #32043
Conversation
On IBMi PASE, the amount of memory in use includes storage used for memory and disks so it is possible to exceed the amount of main storage.
@dmabupt can you provide a bit more info. freemem can be negative? I'm having trouble how that makes sense even given the info you've provided in the first post. |
Hello @mhdawson The memory concept is very different on IBMi. We cannot map the "amount of free memory" to any accurate value on IBMi. You can access this link and search keyword "Main storage size.". This is the so called "total memory" on the partitioned system. But we can not find the "used memory" due to the "single-level storage" machanism on IBMi. We do not know if the data is on the memory or the disk right now. The system vaule I chose is
BTW, the command
|
Ok so are the values always 0 ? If so them maybe we should make the test check that is the case versus skipping it? |
The @kadler, what's your opinion? |
From the API docs: os.freemem()#
Added in: v0.3.3
Returns: <integer>
Returns the amount of free system memory in bytes as an integer. https://nodejs.org/docs/latest-v13.x/api/os.html#os_os_freemem |
Unless |
@dmabupt I'm not the expert on the IBM i memory accounting - it all seems a bit murky to me, especially considering the atypical design of the system. Have you talked to Angela Newton about this? If there's nothing directly equivalent, I agree with @mhdawson that we should just return 0. We can always revisit this later if we come up with some way to get accurate information. |
@mhdawson , If we set the in-use memory to 0, then we have to skip this test as well -- https://github.com/libuv/libuv/blob/v1.x/test/test-get-memory.c#L42 , right? |
On IBMi PASE, the amount of memory in use includes storage used for memory and disks. So we hard coded the amount of memory in use to zero on IBMi based on below discussion - nodejs/node#32043
Submitted a libuv pull request for that -- libuv/libuv#2732 |
On IBMi PASE, the amount of memory in use includes storage used for memory and disks. So we hard coded the amount of memory in use to zero on IBMi based on below discussion - nodejs/node#32043
@dmabupt instead of skipping we can validate that it is 0, right? |
@mhdawson You mean in the libuv code, add a validation like this ?
Libuv does not provide API to get the memory in use, so we can only validate that |
In the context of this PR. Instead of excluding the test with
more like
|
As we discussed before, we hard-coded the in-use memory to zero, not free memory. So we can only validate free-memory === total-memory. |
@dmabupt ok if that is what you can check. My main point is instead of skipping, validate what makes sense. |
Setting in-use memory to zero, Node.js's test code needs no change. We only need to update one line in the libuv test, which has the |
On IBMi PASE, the amount of memory in use includes storage used for memory and disks. So we hard coded the amount of memory in use to zero on IBMi based on below discussion - nodejs/node#32043
@mhdawson I have updated the libuv's PR. You may review it here -- libuv/libuv#2732 And if no problem, when this libuv PR landed, I will close this node.js PR (no need to change Node.js code) |
On IBMi PASE, the amount of memory in use includes storage used for memory and disks. So we hard-code the amount of memory in use to zero on IBMi, based on discussion in nodejs/node#32043. PR-URL: #2732 Refs: nodejs/node#32043 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Close this PR since the Libuv PR libuv/libuv#2732 landed. |
On IBMi PASE, the amount of memory in use includes storage
used for memory and disks so it is possible to exceed the
amount of main storage.
So skip this test on IBMi PASE as libuv --> https://github.com/libuv/libuv/pull/2614/files#diff-564d321f5718b4ed067d21caf87d4b59