Main menu
Welcome, Guest
Username: Password: Secret Key Remember me

TOPIC: Swappiness

Swappiness 4 years 4 months ago #2763

  • Nagib
  • Nagib's Avatar
  • Offline
  • Premium Member
  • Objave: 99
  • Thank you received: 98
Swappiness je svojstvo linux kernela koje odredjuje kada ce kernel koristiti swap. Vrijednost swappinessa je izmedju 0 - 100. Manja vrijednost znaci da ce se koristenje swap-a izbjegavati, dok veca vrijednost znaci ce se swap koristiti cesce. Na mnogim linux distribucijama ova je vrijednost podesena na 60. Ovo mozete provjeriti u terminalu

cat /proc/sys/vm/swappiness

Koristenje swap-a moze jako narusiti performanse racunara pogotovo ako imate samo jedan disk. Meni se ovo znalo desavati na laptopu kojeg rijetko gasim. Posaljem ga u sleep kad ga zaklopim. Poslije par takvih budjenja pocne koristiti swap. I onda bude belaj :).
Da li se koristi swap mozete provjeriti komandom

free -m

Rezultat komande ispod pokazuje da je swap prazan. Kad vrijednost bude veca od nule vjerovatno cete to i osjetiti :)

-             total       used       free     shared    buffers     cached
Mem:          3513       3137        375         33        143       1027
-/+ buffers/cache:       1967       1545
Swap:         4091          0       4091

Da bi promijenili vrijednost swappinessa trebamo uraditi slijedece:

su - 
vi /etc/sysctl.conf

Mozete koristiti i neki drugi editor. Bitno je samo da kao root user otvorite fajl i na kraju dodate vm.swappiness = 10

Racuran treba restartovati ili kucati

sysctl -p

da kernel prihvati nove parametre
The administrator has disabled public write access.
The following user(s) said Thank You: Džadž dred, Serious NERD, Elfudin

Swappiness 4 years 4 months ago #2769

  • Džadž dred
  • Džadž dred's Avatar
  • Offline
  • Platinum Member
  • Objave: 534
  • Thank you received: 258
Yep, upravo ono što Windowsu fali. Dobri Linux.
The administrator has disabled public write access.
The following user(s) said Thank You: Elfudin

Swappiness 4 years 4 months ago #2777

  • Elfudin
  • Elfudin's Avatar
  • Offline
  • Platinum Member
  • Microsoft Certified Professional
  • Objave: 615
  • Thank you received: 296
Swappiness :lol: :lol: (off-topic,znam ali morao sam) :woohoo: :lol:


In war, victory. In peace, vigilance. In death, sacrifice.
The administrator has disabled public write access.
Time to create page: 0.076 seconds