Unix Technical Forum

Memory upgrade

This is a discussion on Memory upgrade within the Slackware Linux Support forums, part of the Unix Operating Systems category; --> So I have 512 mb on my laptop and I have the swap setings at 1 gig. Now I ...


Go Back   Unix Technical Forum > Unix Operating Systems > Slackware Linux Support

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-21-2008, 04:35 AM
frz
 
Posts: n/a
Default Memory upgrade

So I have 512 mb on my laptop and I have the swap setings at 1 gig. Now
I have getting a 1 gig to add to it, so I will have 1256 mb until I get
my additional gig. Do I have to resize my swap partition? My problem
here is that if that is mandatory, I don't have anymore space to
allocate to the swap partition. My current HDD is small and max out.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-21-2008, 04:35 AM
Dave Uhring
 
Posts: n/a
Default Re: Memory upgrade

On Tue, 18 Sep 2007 19:25:42 -0400, frz wrote:

> So I have 512 mb on my laptop and I have the swap setings at 1 gig. Now
> I have getting a 1 gig to add to it, so I will have 1256 mb until I get
> my additional gig. Do I have to resize my swap partition?


No. With that much RAM you probably do not even need swap space on your
HDD.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-21-2008, 04:35 AM
Keith Keller
 
Posts: n/a
Default Re: Memory upgrade

On 2007-09-18, frz <frzd@hotmail.com> wrote:
> So I have 512 mb on my laptop and I have the swap setings at 1 gig. Now
> I have getting a 1 gig to add to it, so I will have 1256 mb until I get
> my additional gig. Do I have to resize my swap partition? My problem
> here is that if that is mandatory, I don't have anymore space to
> allocate to the swap partition. My current HDD is small and max out.


It's not mandatory, but if it were you could simply add a swap file.
See man mkswap if you feel like you need to do this. (Personally I
wouldn't bother adding more swap space.)

--keith


--
kkeller-usenet@wombat.san-francisco.ca.us
(try just my userid to email me)
AOLSFAQ=http://www.therockgarden.ca/aolsfaq.txt
see X- headers for PGP signature information

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-21-2008, 04:35 AM
D Herring
 
Posts: n/a
Default Re: Memory upgrade

frz wrote:
> So I have 512 mb on my laptop and I have the swap setings at 1 gig. Now
> I have getting a 1 gig to add to it, so I will have 1256 mb until I get
> my additional gig. Do I have to resize my swap partition? My problem
> here is that if that is mandatory, I don't have anymore space to
> allocate to the swap partition. My current HDD is small and max out.


You got more memory so the system would swap less, no?

The old story about needing swap=2xRAM doesn't apply to modern systems
(where heavy swapping usually means bigger problems). On Linux, swap
is only needed when the system runs out of RAM; if processes are using
1.5G on a system with 1G RAM, then there needs to be at least 0.5G of
swap.

The one utility which does need swap >= RAM is software suspend --
since this copies RAM to the swap partition before powering down.

- Daniel
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 02-21-2008, 04:35 AM
~kurt
 
Posts: n/a
Default Re: Memory upgrade

D Herring <dherring@at.tentpost.dot.com> wrote:
>
> The old story about needing swap=2xRAM doesn't apply to modern systems
> (where heavy swapping usually means bigger problems). On Linux, swap
> is only needed when the system runs out of RAM; if processes are using
> 1.5G on a system with 1G RAM, then there needs to be at least 0.5G of
> swap.


I've lost count of how many times the rules for optimum swap space have
changed. I'm not sure if it is correct to say that the 2XRAM swap rule
no longer applies. It didn't for a while, but did again after some more
VM work. I don't know if it changed again. No swap space is necessary,
but for optimum performace and maximum load (not something most people
need to be concerned about), 2XRAM was valid for "modern" Linux (the last
I looked anyway). I always like to have at least some swap space. I figure
some bug in the kernel could get introduced that under certain conditions
assumes swap at least exists, so having some swap available would eliminate
the bug (it happened in the past).

- Kurt
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 02-21-2008, 04:35 AM
Mike
 
Posts: n/a
Default Re: Memory upgrade

Responding to ~kurt...
> D Herring <dherring@at.tentpost.dot.com> wrote:
>>
>> The old story about needing swap=2xRAM doesn't apply to modern systems
>> (where heavy swapping usually means bigger problems). On Linux, swap
>> is only needed when the system runs out of RAM; if processes are using
>> 1.5G on a system with 1G RAM, then there needs to be at least 0.5G of
>> swap.

>
> I've lost count of how many times the rules for optimum swap space have
> changed. I'm not sure if it is correct to say that the 2XRAM swap rule
> no longer applies. It didn't for a while, but did again after some more
> VM work. I don't know if it changed again. No swap space is necessary,
> but for optimum performace and maximum load (not something most people
> need to be concerned about), 2XRAM was valid for "modern" Linux (the last
> I looked anyway). I always like to have at least some swap space. I figure
> some bug in the kernel could get introduced that under certain conditions
> assumes swap at least exists, so having some swap available would eliminate
> the bug (it happened in the past).
>
> - Kurt


And you don't have to reserve partitions for it. Just create a file
somewhere with a bit of space for it.

http://www.faqs.org/docs/linux_admin/x1762.html

--
Yellow Submarine?
Nah. Its a TeaPot!
www.tinyurl.com/382gmp
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 02-21-2008, 04:35 AM
Peter Chant
 
Posts: n/a
Default Re: Memory upgrade

Mike wrote:


> And you don't have to reserve partitions for it. Just create a file
> somewhere with a bit of space for it.
>
> http://www.faqs.org/docs/linux_admin/x1762.html
>


Would that not run slower than an ordinary swap partition?

Pete

--
http://www.petezilla.co.uk
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 02-21-2008, 04:35 AM
Michael Black
 
Posts: n/a
Default Re: Memory upgrade

Peter Chant (REMpeteOVE@CAPpetezilla.ITALSco.uk) writes:
> Mike wrote:
>
>
>> And you don't have to reserve partitions for it. Just create a file
>> somewhere with a bit of space for it.
>>
>> http://www.faqs.org/docs/linux_admin/x1762.html
>>

>
> Would that not run slower than an ordinary swap partition?
>

I haven't a clue.

But the issue here is that a swap file doesn't carve out a partition
that is unusable for anything else. You can set one up if you
are expecting a lot of memory use, and then take it away when
you stop using that memory intensive application.

Michael

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 02-21-2008, 04:35 AM
Keith Keller
 
Posts: n/a
Default Re: Memory upgrade

On 2007-09-19, Peter Chant <REMpeteOVE@CAPpetezilla.ITALSco.uk> wrote:
> Mike wrote:
>
>> And you don't have to reserve partitions for it. Just create a file
>> somewhere with a bit of space for it.
>>
>> http://www.faqs.org/docs/linux_admin/x1762.html

>
> Would that not run slower than an ordinary swap partition?


IIRC it does, but if you need it in a pinch it's a lot faster than
trying to repartition to free up space for more swap.

--keith

--
kkeller-usenet@wombat.san-francisco.ca.us
(try just my userid to email me)
AOLSFAQ=http://www.therockgarden.ca/aolsfaq.txt
see X- headers for PGP signature information

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 02-21-2008, 04:35 AM
Mike
 
Posts: n/a
Default Re: Memory upgrade

Responding to Keith Keller...
> On 2007-09-19, Peter Chant <REMpeteOVE@CAPpetezilla.ITALSco.uk> wrote:
>> Mike wrote:
>>
>>> And you don't have to reserve partitions for it. Just create a file
>>> somewhere with a bit of space for it.
>>>
>>> http://www.faqs.org/docs/linux_admin/x1762.html

>>
>> Would that not run slower than an ordinary swap partition?

>
> IIRC it does, but if you need it in a pinch it's a lot faster than
> trying to repartition to free up space for more swap.
>


Er, yeah. What Keith said, from what I recall reading up on.

Plus, with today's hardware, and I mean anything past a 500Mhz CPU
here, swap is only going to be one of those "top out" things rather
than in regular use by the system. Unless absolute performance is an
issue, I'd just stick a swap file somewhere as a "just in case"
thing.

FWIW, I'm running an oldish P800/512Mb with no swapfile/partition
assigned. Nothing has had a problem so far, and I run movies on it
while working on it.

Maybe I should create a swap file somewhere, just as a safety belt?

--
Yellow Submarine?
Nah. Its a TeaPot!
www.tinyurl.com/382gmp
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 09:04 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com