Комментарии:
I use 30 GB of swap
ОтветитьI have a 2gb ram ( potato 🥔 pc ) should i increase the swappiness to free my ram or should I decrease the swappiness
ОтветитьYeah but from where it can increased I mean is he collect the other 2 gb from home dir or root dir
ОтветитьIn my case i got this laptop with 2GB RAM and so i decided to partition off my ssd to have non mounted swap space. 32GB worth of swap now added and put the priority to 100. Not sure if that is what you are suppose to do but I did and hopefully it works! Thanks for the info man!
ОтветитьThank you bro great tutorial
Ответитьthankyou hehe
ОтветитьExellent 💖
ОтветитьIncredible!
Ответитьdidnt work
Ответитьswapon -s command shows a partition. Not any swapfile is there. What can I do now?
Ответитьvery useful video
Ответитьswapon: /dev/npme0n1p3: insecure permissions 0644, 0600 suggested.
swapon: /dev/npme0n1p3: swapon failed: Invalid argument
Excellent, concise and just works. Thanks.
ОтветитьThank you man!
Ответитьdude. thank you. that saved me a bunch of hassle!
ОтветитьHow do i save after entering the vm.swappiness=10?
ОтветитьI set mine to 64GB on my nvm ;)
Ответитьthanks a lot!
ОтветитьThanks bro
ОтветитьThanks a lot!
ОтветитьNice one, That was just what I needed, For some reason mine created a 2GB file and when I had used it all would pause machine while it moved things about. about 30 + mins.
ОтветитьI followed this method to increase swap file from 2GB to 4GB.... But now I want to reduce the size again in my Ubuntu machine. How to reduce it?
Ответитьafter reboot its get changed
ОтветитьThank you
ОтветитьThankyou
Ответитьthx , it works 100%
ОтветитьThanks for this great video
ОтветитьThanks a lot bro. Great and Easy tips.
ОтветитьTHANKS BRO U LIKE A BOOS!
ОтветитьWill it work on manjaro?
ОтветитьBro I have this problem (ls: cannot access '/swapfile': No such file or directory)
ОтветитьWorked like a charm. Thank you.
ОтветитьHow to add more ram to swap
ОтветитьThanksss
ОтветитьI wanted to install setup of GTA 5...so how much swap size will it need?
Ответитьthanks! you sound like my friend that works at facebook lol
Ответитьwhat this things can work on kali?
Ответитьmkswap: /swapfile: insecure permissions 0644, 0600 suggested.
what should i do with this? how do I change permission..
Commands
swapon --show : shows the swapfile or swap partition you have in your system. If its swapfile (which is the default) in ubuntu then following commmand work.
ls /swapfile : shows your swap file and its size its in the root directory of your system.
sudo swapoff /swapfile: instructs your system to not use the swap file.
fallocate -l 4G /swapfile: fallocate command is used to allocate size to an existing file. Here we are making the size of the swapfile 4G
sudo mkswap /swapfile : making this file named 'swapfile' the new swap file
sudo swapon /swapfile: instrcuting the system to use this new swapfile.
Bonus Tip:
Swappiness: This is a parameter that tells how much your computer is using the swap space or should use the Swapspace. HIgher the swappiness higher the use of swap space so it would be slow because RAM is the fast memory. So Desktops have Swappiness 60 and high perfomant systems have very low swappiness typically 1.
To see the swapiness parameter and change it:
cat /proc/sys/vm/swappiness: show your swappiness
To make the changes permanent edit the file /etc/sysctl.conf and add the line
vm.swappiness={your intended swappiness value here}
Thanks Linux HandBook!
Gooday Everyone
i followed this method to reduce swap file from 16gb to 4gb.. But where does the reduced size goes?? i want to use the reduced size again in my windows,, as i have dual booted??
ОтветитьDropping swappiness is fine if your PC or server has adequate RAM capacity. Since the Ubuntu system will need ~ 7 GB, this means maybe 16 GB RAM for a PC or more for a server. Anyway you can set up log files for recording the exact nature of freeze events so we can tell if it's swap space, swappiness or just plain app overload ?
ОтветитьThanks very helpful
ОтветитьHow to decrease the swap file size ?
ОтветитьDesktop$ sudo fallocate -1 4G /swapfile
fallocate: invalid option -- '1'
Try 'fallocate --help' for more information.
what???????????????????????????????????
- - - COPY PASTE - - -
swapon --show
ls -l /swapfile
swapon --show
sudo swapoff /swapfile
free -h
sudo fallocate -l 4G /swapfile
ls -l /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
swapon --show
the way this guy pronounces swap lol
ОтветитьThanks Bro .. Now I have a SWAP FILE of note .. and my Ubuntu is not chugging along as before :) Most grateful for you sharing this with us to maintain our sanity :)
ОтветитьHow do you decrease it???
ОтветитьVery useful, thank you!
Ответить