Skip to main content

Timeline for How to fill 90% of the free memory?

Current License: CC BY-SA 3.0

10 events
when toggle format what by license comment
Jul 8, 2020 at 17:18 comment added y.selivonchyk A python would digest about 2Gb per second on my system. To speed things up I made this: MB=600000; let PWMB=$MB/10; for i in {1..10}; do python -c "x=($PWMB*1024*1024/8)*(0,); import time; time.sleep(10*3600*24)" & echo "started" $i ; done
Sep 19, 2019 at 10:51 comment added adrianlzt simply one liner for 1GB: python -c "x=(1*1024*1024*1024/8)*(0,); raw_input()"
Apr 4, 2017 at 20:03 comment added Mike S This solution worked to cobble up a Gig or two in my tests, though I didn't try to stress my memory. But, @JoachimSauer, one could set sysctl vm.swappiness=0 and furthermore set vm.min_free_kbytes to a small number, maybe 1024. I haven't tried it, but the docs say that this is how you control the quickness of swapping out... you should be able to make it quite slow indeed, to the point of causing an OOM condition on your machine. See kernel.org/doc/Documentation/sysctl/vm.txt and kernel.org/doc/gorman/html/understand/understand005.html
Nov 9, 2013 at 14:40 comment added Gilles 'SO- stop being evil' @AlexanderShcheblikin This question isn't about evicting disk cache (which is useful for performance testing but not for low resources testing).
Nov 8, 2013 at 23:04 comment added Alexander Shcheblikin Why would a unix swap while there is available RAM? This is actually a plausible way to evict disk cache when need be.
Nov 8, 2013 at 13:22 comment added Joachim Sauer That will probably quickly be swapped out, having very little actual impact on memory pressure (unless you fill up all the swap as well, which will take a while, usually)
S Nov 8, 2013 at 13:02 history suggested CommunityBot CC BY-SA 3.0
keep process from hogging CPU
Nov 8, 2013 at 12:54 review Suggested edits
S Nov 8, 2013 at 13:02
Nov 8, 2013 at 12:50 review First posts
Nov 8, 2013 at 13:00
Nov 8, 2013 at 12:33 history answered swiftcoder CC BY-SA 3.0