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

Change formula for calculating free memory #49

Open
chetjain opened this issue Oct 28, 2020 · 1 comment
Open

Change formula for calculating free memory #49

chetjain opened this issue Oct 28, 2020 · 1 comment
Assignees
Labels
Hacktoberfest IBM program hacktoberfest-accepted Accept for hactoberfest

Comments

@chetjain
Copy link
Contributor

Current method uses free field in the 'free -m' command to calculate unused memory.
[root@ktebackup ~]# free -h
total used free shared buff/cache available
Mem: 177Gi 48Gi 19Gi 2.3Gi 110Gi 101Gi
Swap: 4.0Gi 80Mi 3.9Gi

Before doing so, it also try to flush the memory(sync) in buff/cache to add it to 'free' field.

RunCommand("sync", tlog, 2, 0)
706 RunCommand("echo 3 > /proc/sys/vm/drop_caches", tlog, 2, 0)

However this method cause the sync command to get hung sometime, when the nfs i/o is heavy or due to other busy I/O activity.
Few bugs are opened against RH. nothing resolved. So we want to escape above two steps, as this will unnecessarily stop SLS execution

@chetjain chetjain added Hacktoberfest IBM program hacktoberfest-accepted Accept for hactoberfest labels Oct 28, 2020
@chetjain chetjain self-assigned this Oct 28, 2020
@chetjain
Copy link
Contributor Author

Created pull request #50

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Hacktoberfest IBM program hacktoberfest-accepted Accept for hactoberfest
Projects
None yet
Development

No branches or pull requests

1 participant