Elijah3927 opened a new issue, #15313:
URL: https://github.com/apache/dolphinscheduler/issues/15313

   ### Search before asking
   
   - [X] I had searched in the 
[issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and 
found no similar issues.
   
   
   ### What happened
   
   after deploy ds on k8s without runing any flow, The monitoring information 
displays the following situation:
   
![image](https://github.com/apache/dolphinscheduler/assets/62165270/cdb1b258-7ae8-40ad-b0b3-5e362388e30e)
   It's strange; the pod requests resources for 8C16GB, with the JVM heap size 
set to 4GB. Despite not running any flows, the memory resources are almost 
depleted。So i found the worker logs, it display like this:
   
![image](https://github.com/apache/dolphinscheduler/assets/62165270/a8d3e7bc-af31-40df-9b05-61864d0b9c5f)
   The logs indicate memory shortage。
   
   
   ### What you expected to happen
   
   i was curious,so, I looked into the source code and found that when 
deploying on k8s, the calculation of free memory is based on the remaining free 
memory of the JVM, while the total memory is calculated based on the total 
memory of the machine where the pod's node is located. In my case, the JVM 
requested a total of 4GB of memory, but the node's machine has over 200GB of 
memory. This calculation creates a false impression of insufficient remaining 
memory。
   source code :
   freeMemory:
   
![image](https://github.com/apache/dolphinscheduler/assets/62165270/d84aa20b-a41a-4785-a7a1-677637f6f03c)
   totalMemeor:
   
![image](https://github.com/apache/dolphinscheduler/assets/62165270/ede5ec4d-3d8b-4fac-a41c-6532e42bcd5b)
   memoryUsagePercentage:
   
![image](https://github.com/apache/dolphinscheduler/assets/62165270/ba94c390-eba5-45f4-a3bb-b81dbf91841e)
   
   
   ### How to reproduce
   
   doploy on k8s and observing memory usage
   
   ### Anything else
   
   _No response_
   
   ### Version
   
   3.2.x
   
   ### Are you willing to submit PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: 
[email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to