1748261 Members
3663 Online
108760 Solutions
New Discussion юеВ

swap space on linux

 
Ragni Singh
Super Advisor

swap space on linux

I have this device with this much space available and would like to create a 100g swap space.

Please tell me how I would do that?

/dev/sdb1 135G 92M 128G 1% /scratch

Thanks and points will be assigned.
5 REPLIES 5
Matti_Kurkela
Honored Contributor

Re: swap space on linux

Type "man mkswap". Read.

Type "man swapon". Read.

Then you'll know.

MK
MK
Ragni Singh
Super Advisor

Re: swap space on linux

In short,

its dd
mkswap
swapon.
Steven E. Protter
Exalted Contributor

Re: swap space on linux

Shalom,

Before you go out and create this massive a swap area.

free

Post the output.

If you make a 100 GB swap area, and don't have enough memory, having this much swap space is not going to hep anything.

What is system memory? You should if you have 50 GB of ram not need 100 GB of swap space.

The old rules on this sizing do not apply to new systems with lots and lots and LOTS of RAM.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Nuwan Alwis
Valued Contributor

Re: swap space on linux

Hi Sanjit,
yes, you can extend your swap space online.
And i also agree with what SEP has said.
think before if you really need this much of swap space. Its not always prove that lager the swap you have it will add performance to your system(some times it will degrade your systems performance)

What i would do is ondemand add swap to the system by using dd.

Good Luck...!
NJ
Viktor Balogh
Honored Contributor

Re: swap space on linux

>yes, you can extend your swap space online.

no, it's not about extending, it's about adding a new swap device
****
Unix operates with beer.