Linux - GeneralThis 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.
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.
I have a server running...and i stupidly forgot to add a swap partition to it when i installed it.
anyways, the hard drive (20 gig) contains one ext3 partition (also 20 gig)
my question is: lets say i run an intensive program that requires a lot of memory (ie 4 gig) . and the server only has 1 gig of physical memory, will the server crash if i run it? or just very slow performance?
solutions:
i do not have physical access to server - if anything goes wrong ... it will take a few days to get access to machine . and any downtime is unacceptable
1) resize the ext3 partition and add/mount a swap partition?
Indeterminate I would think.
If it's a server, isn't either an unacceptable result ???.
As foo_bar_foo indicated, you can use a file in lieu of a partition for swap. In 2.6 the alledged performance penalty has been rectified. Even if you are on a 2.4 kernel, the penalty would be worth taking.
You have a simple solution that requires no outage - why are you dithering ???.
dd if=/dev/zero of=/swap-space bs=1M count=1024 #create a 1 gig zeroed in file (1megabyte * 1024)
mkswap /swap-space #convert that file to swap space
swapon /swap-space #enable it
that created an swap file of 1024 X 1M or 1 gig swap file
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.