New answers tagged

0

Try running ps aux --sort -rss as root. I have different outputs when I do ps aux --sort -rss | wc -l than when I do when I'm running as root. Further... this command I found helpful. ps -eo size,pid,user,command --sort -size | \ awk '{ hr=$1/1024 ; printf("%13.2f Mb ",hr) } { for ( x=4 ; x<=NF ; x++ ) { printf("%s ",$x) } print &...


2

vmware-toolbox-cmd stat balloon 81632 MB is the answer: your system is using approximately 40GiB of memory, and 80GiB are reserved by the VMware ballooning mechanism, resulting in the 122GiB “used” reported by free. The memory reserved by the balloon isn’t consumed by a process, so it doesn’t appear in ps or top’s output.


4

When vm.swappiness is set to 100, the page cache and swap are considered equally when handling memory pressure. Values less than 100 tell the kernel to consider swap to be more expensive than the page cache; thus when it needs to free pages, it will try to free pages from the page cache rather than use swap. The lower the value, the greater the cost of swap. ...


0

I have found a workaround - redirection of GDB's output to /dev/stdout. The logic is following - if GDB works fine while its output is connected to the terminal, then it is needed to give him this connection. In this case, there are no errors. In my case /dev/stdout points to /dev/pts: $ ls -l /dev/stdout lrwxrwxrwx 1 root root 15 Oct 9 10:10 /dev/stdout -&...


1

mount -a This command is redundant. Swap is not "mounted" it's either used or not used. swapoff /swapfile-additional It's currently the only valid way. Preallocated files may not always work. then what is the maz swap that we can use from total memory ? It's hard to understand what you really mean.


0

If you simply want to debug your own programs, rather than implementing a complicated memory manager, I recommend you to simply use a program such as valgrind to detect memory leaks and dangling pointers.


1

I need to have 90% of the free memory full In case there are not enough answers already, one I did not see is doing a ramdisk, or technically a tmpfs. This will map RAM to a folder in linux, and then you just create or dump however many files of whatever size in there to take up however much ram you want. The one downside is you need to be root to use the ...


1

I found this solution as well, but I'm afraid of killing data of other processes. Isn't there a more selective solution? echo 3 > /proc/sys/vm/drop_caches does not and cannot kill any processes or cause any harm to your system - it just evicts everything from your caches, not shared memory. ipcs has no relationship to your issue either. tmpfs indeed ...


Top 50 recent answers are included