Slackware This Forum is for the discussion of Slackware Linux.
|
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
10-24-2010, 09:03 PM
|
#1
|
Member
Registered: Aug 2004
Distribution: Debian
Posts: 443
Rep:
|
How to prioritize the use of physical memory instead of swap?
Hi
I have a system with 2G of memory and swap memory of 4G.
This is the output from :
$cat /proc/meminfo
PHP Code:
$cat /proc/meminfo MemTotal: 2046312 kB MemFree: 209800 kB Buffers: 60532 kB Cached: 1284560 kB SwapCached: 4 kB Active: 953280 kB Inactive: 754836 kB Active(anon): 226108 kB Inactive(anon): 138064 kB Active(file): 727172 kB Inactive(file): 616772 kB Unevictable: 0 kB Mlocked: 0 kB SwapTotal: 4256664 kB SwapFree: 4256660 kB Dirty: 112 kB Writeback: 0 kB AnonPages: 363032 kB Mapped: 85688 kB Shmem: 1148 kB Slab: 62920 kB SReclaimable: 47532 kB SUnreclaim: 15388 kB KernelStack: 2440 kB PageTables: 24484 kB NFS_Unstable: 0 kB Bounce: 0 kB WritebackTmp: 0 kB CommitLimit: 5279820 kB Committed_AS: 1825604 kB VmallocTotal: 34359738367 kB VmallocUsed: 308512 kB VmallocChunk: 34359403404 kB DirectMap4k: 225152 kB DirectMap2M: 1869824 kB
How could they do to the memory cache to be used as much? Because, occasionally,
swap is used and note that the system could use the memory cache does not swap ...
Thanks
ps: Slackware current 64 multilib
|
|
|
10-24-2010, 09:44 PM
|
#3
|
LQ Veteran
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,314
|
Precisely 1 page of swap is in use. That single page is (swap)cached - meaning it will be read from memory, not read in from disk should it ever be referenced again. That single page was probably swapped out because it hadn't been referenced in ages.
How much more efficient can it get ?.
|
|
|
10-24-2010, 10:30 PM
|
#4
|
Member
Registered: Aug 2004
Distribution: Debian
Posts: 443
Original Poster
Rep:
|
maxmiorim
È estranho para mim mesmo dizer obrigado a um compatriota (em ingles) ,de toda forma ai vai ...
Muito obrigado pelo links,tentarei entender o que esta escrito em ingles( meu ingles é muito ruim ) e o seu conteudo ,de toda forma,
pelo pouco que li ,me parece muito interessante ....
ps:Eu sei que a linguagem no forum é o ingles ,não fique aborrecido comigo mesmo :-)
Quote:
translation
It is strange to me even to say thanks to a fellow (in English), anyway here it goes ...
Thank you for the links, try to understand what is written in english (my english is very bad) and its contents, anyway,
the little I've read, it seems very interesting ....
ps:I know the language the forum is english, do not get upset with myself
|
||-------------------------------------||
syg00
Haaa ... I think I understood then ....
thanks
|
|
|
10-25-2010, 04:52 PM
|
#5
|
Member
Registered: Dec 2005
Distribution: Slackware 13.1
Posts: 82
Rep:
|
This might or might not help you, but if you are like me and see that swap is used and you have memory free, use the swapoff command.
You can then swapon /dev/<swap partition> to get a cleared out swap space.
Or if you are feeling very adventurous, get some more memory and run without any swap!
|
|
|
10-25-2010, 11:04 PM
|
#6
|
Member
Registered: Aug 2004
Distribution: Debian
Posts: 443
Original Poster
Rep:
|
Quote:
Originally Posted by stitchman
This might or might not help you, but if you are like me and see that swap is used and you have memory free, use the swapoff command.
You can then swapon /dev/<swap partition> to get a cleared out swap space.
Or if you are feeling very adventurous, get some more memory and run without any swap!
|
That's what I normally do, thanks. :-)
Anyway, if I translate correctly so that I can even understand the explanation of syg00,
satisfy me ...
many thanks
ps:I think it is hard to find is the simplicity ...
|
|
|
10-26-2010, 05:20 PM
|
#7
|
Member
Registered: Mar 2006
Location: Wisconsin
Distribution: Slackware64-Current
Posts: 294
Rep:
|
Quote:
Originally Posted by stitchman
This might or might not help you, but if you are like me and see that swap is used and you have memory free, use the swapoff command.
You can then swapon /dev/<swap partition> to get a cleared out swap space.
Or if you are feeling very adventurous, get some more memory and run without any swap!
|
I've not run with swap in years. Once I got to 2GB of RAM, I found I never was using swap on my laptop, so I just stopped making a swap file and / or swap partition. I've got 4 GB now, and I have yet to encounter any issues.
|
|
|
All times are GMT -5. The time now is 09:35 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|