Low free swap but nothing uses it












0















We've PostgreSQL 10.3 running on 7.4.1708.
Yesterday, suddenly something claimed swap space about 2.2GB.



I could find only few process and restarted them only got about 200MB.



I've dropped pagecache and set vm.swappiness to 0
But swap did not drop.



I've searched what claimed swap but I could not find.




  • free says, 2025MB swap is claimed

  • top says nothing claimed swap

  • smem says nothing claimed swap


root@server# free -m
total used free shared buff/cache available
Mem: 1031502 9793 308314 201749 713394 812428
Swap: 4095 2025 2070



root@server#smem -s swap
178243 root python /bin/smem -s swap 0 6184 6682 10120
1 root /usr/lib/systemd/systemd -- 8 16632 17267 20720
7929 root /usr/lib/systemd/systemd-jo 108 12624 52410 94280



root@server#top -o SWAP
PID USER PR NI VIRT RES SHR SWAP S %CPU %MEM TIME+
7929 root 20 0 144380 94436 94148 108 S 0.0 0.0 29:32.52
1 root 20 0 206152 20720 5480 8 S 0.0 0.0 61:07.68
2 root 20 0 0 0 0 0 S 0.0 0.0 0:22.39



I don't want to swapoff and swapon. Because this is our primary db server, I've heard swapoff could make system unstable.



What should I do, how can I find which process claimed that swap space?










share|improve this question

























  • Possibly related answer here : stackoverflow.com/questions/479953/…

    – Christopher Hostage
    Feb 22 at 17:07











  • I saw that link you sent and I've already looked at swap usage per process with smem and top. But no process showed up. I post this because of that.

    – Yavuz Selim
    Feb 22 at 17:12
















0















We've PostgreSQL 10.3 running on 7.4.1708.
Yesterday, suddenly something claimed swap space about 2.2GB.



I could find only few process and restarted them only got about 200MB.



I've dropped pagecache and set vm.swappiness to 0
But swap did not drop.



I've searched what claimed swap but I could not find.




  • free says, 2025MB swap is claimed

  • top says nothing claimed swap

  • smem says nothing claimed swap


root@server# free -m
total used free shared buff/cache available
Mem: 1031502 9793 308314 201749 713394 812428
Swap: 4095 2025 2070



root@server#smem -s swap
178243 root python /bin/smem -s swap 0 6184 6682 10120
1 root /usr/lib/systemd/systemd -- 8 16632 17267 20720
7929 root /usr/lib/systemd/systemd-jo 108 12624 52410 94280



root@server#top -o SWAP
PID USER PR NI VIRT RES SHR SWAP S %CPU %MEM TIME+
7929 root 20 0 144380 94436 94148 108 S 0.0 0.0 29:32.52
1 root 20 0 206152 20720 5480 8 S 0.0 0.0 61:07.68
2 root 20 0 0 0 0 0 S 0.0 0.0 0:22.39



I don't want to swapoff and swapon. Because this is our primary db server, I've heard swapoff could make system unstable.



What should I do, how can I find which process claimed that swap space?










share|improve this question

























  • Possibly related answer here : stackoverflow.com/questions/479953/…

    – Christopher Hostage
    Feb 22 at 17:07











  • I saw that link you sent and I've already looked at swap usage per process with smem and top. But no process showed up. I post this because of that.

    – Yavuz Selim
    Feb 22 at 17:12














0












0








0








We've PostgreSQL 10.3 running on 7.4.1708.
Yesterday, suddenly something claimed swap space about 2.2GB.



I could find only few process and restarted them only got about 200MB.



I've dropped pagecache and set vm.swappiness to 0
But swap did not drop.



I've searched what claimed swap but I could not find.




  • free says, 2025MB swap is claimed

  • top says nothing claimed swap

  • smem says nothing claimed swap


root@server# free -m
total used free shared buff/cache available
Mem: 1031502 9793 308314 201749 713394 812428
Swap: 4095 2025 2070



root@server#smem -s swap
178243 root python /bin/smem -s swap 0 6184 6682 10120
1 root /usr/lib/systemd/systemd -- 8 16632 17267 20720
7929 root /usr/lib/systemd/systemd-jo 108 12624 52410 94280



root@server#top -o SWAP
PID USER PR NI VIRT RES SHR SWAP S %CPU %MEM TIME+
7929 root 20 0 144380 94436 94148 108 S 0.0 0.0 29:32.52
1 root 20 0 206152 20720 5480 8 S 0.0 0.0 61:07.68
2 root 20 0 0 0 0 0 S 0.0 0.0 0:22.39



I don't want to swapoff and swapon. Because this is our primary db server, I've heard swapoff could make system unstable.



What should I do, how can I find which process claimed that swap space?










share|improve this question
















We've PostgreSQL 10.3 running on 7.4.1708.
Yesterday, suddenly something claimed swap space about 2.2GB.



I could find only few process and restarted them only got about 200MB.



I've dropped pagecache and set vm.swappiness to 0
But swap did not drop.



I've searched what claimed swap but I could not find.




  • free says, 2025MB swap is claimed

  • top says nothing claimed swap

  • smem says nothing claimed swap


root@server# free -m
total used free shared buff/cache available
Mem: 1031502 9793 308314 201749 713394 812428
Swap: 4095 2025 2070



root@server#smem -s swap
178243 root python /bin/smem -s swap 0 6184 6682 10120
1 root /usr/lib/systemd/systemd -- 8 16632 17267 20720
7929 root /usr/lib/systemd/systemd-jo 108 12624 52410 94280



root@server#top -o SWAP
PID USER PR NI VIRT RES SHR SWAP S %CPU %MEM TIME+
7929 root 20 0 144380 94436 94148 108 S 0.0 0.0 29:32.52
1 root 20 0 206152 20720 5480 8 S 0.0 0.0 61:07.68
2 root 20 0 0 0 0 0 S 0.0 0.0 0:22.39



I don't want to swapoff and swapon. Because this is our primary db server, I've heard swapoff could make system unstable.



What should I do, how can I find which process claimed that swap space?







linux postgresql swap






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Feb 22 at 14:52







Yavuz Selim

















asked Feb 9 at 21:32









Yavuz SelimYavuz Selim

13




13













  • Possibly related answer here : stackoverflow.com/questions/479953/…

    – Christopher Hostage
    Feb 22 at 17:07











  • I saw that link you sent and I've already looked at swap usage per process with smem and top. But no process showed up. I post this because of that.

    – Yavuz Selim
    Feb 22 at 17:12



















  • Possibly related answer here : stackoverflow.com/questions/479953/…

    – Christopher Hostage
    Feb 22 at 17:07











  • I saw that link you sent and I've already looked at swap usage per process with smem and top. But no process showed up. I post this because of that.

    – Yavuz Selim
    Feb 22 at 17:12

















Possibly related answer here : stackoverflow.com/questions/479953/…

– Christopher Hostage
Feb 22 at 17:07





Possibly related answer here : stackoverflow.com/questions/479953/…

– Christopher Hostage
Feb 22 at 17:07













I saw that link you sent and I've already looked at swap usage per process with smem and top. But no process showed up. I post this because of that.

– Yavuz Selim
Feb 22 at 17:12





I saw that link you sent and I've already looked at swap usage per process with smem and top. But no process showed up. I post this because of that.

– Yavuz Selim
Feb 22 at 17:12










0






active

oldest

votes











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1403993%2flow-free-swap-but-nothing-uses-it%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Super User!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1403993%2flow-free-swap-but-nothing-uses-it%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Probability when a professor distributes a quiz and homework assignment to a class of n students.

Aardman Animations

Are they similar matrix