Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place. |
| 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.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
08-16-2006, 09:52 PM
|
#1
|
|
Member
Registered: Jul 2006
Location: Colorado, USA
Distribution: openSuSE 11.4
Posts: 118
Rep:
|
Move Main System from RAM to swap
I'm wondering if it possible to move my main system and a few other programs into swap. I have some 5 GBs of swap, and there are a few games I want to play some memory-heavy games, but the performance is, well, horrible, and I know it's because I am running out of RAM. I have 1 GB of RAM, but that hasn't really helped. So is there a way to clear out my RAM and move it into SWAP space?
|
|
|
|
08-16-2006, 10:17 PM
|
#2
|
|
Senior Member
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 3,816
Rep: 
|
The Linux memory manager is pretty smart, and as a general rule it's best not to try to outthink it. That being said, there are a few things you can do -- first is to play with some of the vm setting in sysctl (see sysctl -a | fgrep 'vm.' for a list). In particular you can set the "swappiness" level hoigher to encourage the memory manager to move unused stuff out to swap faster. I'm not sure what some of the others do, but the swapiness is the main tunable.
A more pragmatic solution may be to run a lighter weight window manager / desktop environment. These can eat up a lot of memory, some of which must stay swapped in because the window manager has stuff running in the background (e.g. artsd on KDE). I'm not sure how much of a difference it will make but it's worth a try. One good thing to do is run a top while the game is running and then hit M (capital-M) to sort by memory usage. The size is the total size of all the application's pages and the RSS is the resident size (how much is actually mapped into memory). Look at the big offenders. Is there anything running in the background that should not be?
If the size of the game itself is significantly over 1 GB (or even close to it), you might need to upgrade your RAM since the entire game doesn't fit into memory (after all the OS and system programs need to snatch some memory to do their jobs).
|
|
|
|
08-16-2006, 11:40 PM
|
#3
|
|
Member
Registered: Jul 2006
Location: Colorado, USA
Distribution: openSuSE 11.4
Posts: 118
Original Poster
Rep:
|
So what types of Window managers would you recommend? I have just about any one you can think of in my SUSE install.
And what would this "top" program be? I've seen it around the forums but I'm still not sure...
|
|
|
|
08-17-2006, 03:58 PM
|
#4
|
|
Member
Registered: Jul 2006
Location: Colorado, USA
Distribution: openSuSE 11.4
Posts: 118
Original Poster
Rep:
|
ok. I got into sysctl, but how can I change "vm.swappiness" from 60 to make it swap more of my stuff?
|
|
|
|
08-17-2006, 04:11 PM
|
#5
|
|
Member
Registered: Jul 2006
Location: Colorado, USA
Distribution: openSuSE 11.4
Posts: 118
Original Poster
Rep:
|
Ok- another update- I figured out how to up the swappinness.
What would you reccomend I set it to? (It's currently at 75)
|
|
|
|
08-17-2006, 05:13 PM
|
#6
|
|
Moderator
Registered: Nov 2004
Location: San Jose, CA
Distribution: Ubuntu
Posts: 8,505
Rep: 
|
75 is fairly 'swappy'. You could try something like 90 even.
top is a command line program that shows what programs are using what resources.
|
|
|
|
08-23-2006, 04:03 PM
|
#7
|
|
Member
Registered: Jul 2006
Location: Colorado, USA
Distribution: openSuSE 11.4
Posts: 118
Original Poster
Rep:
|
Ok... I've set the swappiness to 90, but every time I reboot, it is set back to 60.
How can I fix this?
|
|
|
|
08-23-2006, 04:41 PM
|
#8
|
|
Moderator
Registered: Nov 2004
Location: San Jose, CA
Distribution: Ubuntu
Posts: 8,505
Rep: 
|
Quote:
|
Originally Posted by timothyb89
Ok... I've set the swappiness to 90, but every time I reboot, it is set back to 60.
How can I fix this?
|
On most systems, it's controlled by /etc/sysctl.conf.
|
|
|
|
08-25-2006, 08:04 PM
|
#9
|
|
Member
Registered: Jul 2006
Location: Colorado, USA
Distribution: openSuSE 11.4
Posts: 118
Original Poster
Rep:
|
Nope, it's not sysctl.conf.
I'm using SuSE, BTW.
The sysctl.conf file exists, but if doesn't have anything but things about IP stuff...
Last edited by timothyb89; 08-25-2006 at 08:12 PM.
|
|
|
|
08-25-2006, 10:40 PM
|
#10
|
|
LQ Newbie
Registered: Jul 2006
Location: New Rochelle, NY
Distribution: Gentoo
Posts: 18
Rep:
|
I don't know about the swappiness, but about your other questions...
More lightweight window managers would be stuff like Fluxbox. I personally use that and find it's much lighter than GNOME, KDE, etc. Those two are full desktop environments, where Fluxbox is just a window manager. You might also be interested in Enlightenment and Blackbox.
As for "top," if you go to a command line and type "top" and press enter, you'll get a readout of all your usage stats at the moment. Check out the man page for it to find out what you can change.
|
|
|
|
08-26-2006, 03:49 PM
|
#11
|
|
Member
Registered: Jul 2006
Location: Colorado, USA
Distribution: openSuSE 11.4
Posts: 118
Original Poster
Rep:
|
Ok, I found my swappiness vm in /proc/sys/vm/ but I can't edit it. I'll tweak it the next time I boot into Windows or Knoppix.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 10:11 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
|
|