ubuntu tweak
2019.01.29 21:23
https://www.linuxbabe.com/ubuntu/4-tips-speed-up-ubuntu-16-04
2. Adjust Swappiness
We all know that RAM is way faster than hard drive.
Let’s do a little experiment: Boot your Ubuntu 16.04 system, open a few applications like Firefox, LibreOffice, Mozilla Thunderbird, Evince document viewer and then don’t do anything with it. Don’t suspend or hibernate it. Then after a few hours return to your Ubuntu 16.04. You will find that these applications are responding poorly to your mouse clicks because they were idle and swapped out to hard drive.
You can find in system monitor that Ubuntu is using swap space although you have plenty of free physical RAM.
This is due to the default swappiness value of Ubuntu. Swappiness is a Linux kernel parameter that controls how often Linux swap out idle processes to the swap space on your hard drive.
The value of swappiness is between 0 ~ 100
. Lower value means Linux will use swap space less whereas higher value causes Linux to use swap space more often. The default value on Ubuntu is 60
which means when your computer uses up 40% of physical RAM, Linux kernel begins swapping.
You can use the following command to check the current value.
cat /proc/sys/vm/swappiness
It’s recommended to set a low value for swappiness so that Linux kernel will use as much physical RAM as possible. For example, to set swappiness to 10:
sudo sysctl vm.swappiness=10
Do not add space before and after the equal sign. This command tells Linux kernel to use swap space when 90% or more of physical RAM is used up. This setting isn’t persistent.
To make it persistent across reboots, you need to edit a file.
sudo nano /etc/sysctl.d/99-sysctl.conf
At the end of this file, append the following line.
vm.swappiness=10
Save and close this file. (Press Ctrl+O to save, press Ctrl+X to exit) This tip is also applicable to your Ubuntu 16.04 server.
댓글 0
번호 | 제목 | 글쓴이 | 날짜 | 조회 수 |
---|---|---|---|---|
1671 | 음란전화.... | 윤재원 | 2000.07.10 | 3884 |
1670 | 재원님이 퍼온 심리테스트...하하하 읽어봐라 | 재원님~ | 2000.07.12 | 3624 |
1669 | 의욕상실 | 채영광 | 2000.07.13 | 3949 |
1668 | Re: 의욕상실 | 한승석 | 2000.07.13 | 3407 |
1667 | Re: 사진 더 추가해줘잉 | 한승석 | 2000.07.13 | 3215 |
1666 | 비천무는 잼있다! | 채영광 | 2000.07.16 | 4091 |
1665 | 음악 니가 다 정리한 거야? | 채영광 | 2000.07.18 | 4489 |
1664 | 아주아주 멋진 시...한편..꼭 읽어봐랑~ | 재원님~ | 2000.07.18 | 3653 |
1663 | 승석아 오늘 오스키는 잘 보았니? | 채영광 | 2000.07.23 | 3605 |
1662 | Re: 비천무는 잼없다! | 헬로우멤 | 2000.07.24 | 3460 |
1661 | 비천무...말이지~~~ | 윤재원 | 2000.07.26 | 3619 |
1660 | 승석아 다다음주 말이야. | 채영광 | 2000.07.31 | 3468 |
1659 | 똑똑똑~~ | 조각가 | 2000.08.01 | 3641 |
1658 | 승석이오빠아...ㅜ.ㅜ 설가면 맛난거 사주우.ㅠ.ㅠ | 김승욱 | 2000.08.06 | 4337 |
1657 | 승석 X-ray는 많이 찍었니? | 정석원 | 2000.08.07 | 3837 |