LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 06-09-2017, 06:32 AM   #16
LeKeiser
LQ Newbie
 
Registered: Mar 2017
Posts: 13

Original Poster
Rep: Reputation: Disabled

Well, as I said, since it was a fresh install, I prefered to reinstall everything with the new RAM.
But I think I would have run into some issues, since I plan to use the hibernate option. So 8GB RAM, the swap needs to be at least 8GB, or a bit more.
Might have run fine, but it will run better now
 
Old 06-09-2017, 07:07 AM   #17
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 17,246

Rep: Reputation: 2639Reputation: 2639Reputation: 2639Reputation: 2639Reputation: 2639Reputation: 2639Reputation: 2639Reputation: 2639Reputation: 2639Reputation: 2639Reputation: 2639
Maybe.
Every system I have has 2G swap - this laptop is 8G RAM. Hibernate never fails. It all depends on the memory (anonymous) that is in active use.
But overallocating swap cost nothing in these days of cheap disk.
 
Old 06-09-2017, 07:40 AM   #18
remma12
Member
 
Registered: May 2017
Distribution: Arch
Posts: 64

Rep: Reputation: 27
Quote:
Originally Posted by syg00 View Post
But overallocating swap cost nothing in these days of cheap disk.
/thread
 
Old 06-09-2017, 09:14 AM   #19
LeKeiser
LQ Newbie
 
Registered: Mar 2017
Posts: 13

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by syg00 View Post
Maybe.
Every system I have has 2G swap - this laptop is 8G RAM. Hibernate never fails. It all depends on the memory (anonymous) that is in active use.
But overallocating swap cost nothing in these days of cheap disk.
Yep, but I have often more than 20 tabs opened with Chrome, and some apps running in the background as well. I think if you add them all, it's a bit more than 4GB RAM, so the hibernate might have cause a problem. I guess I'll never know but that's ok
As I said, I didn't want to bother, I used the "basic" install, left the system choose the size, and...

Agreed with the price and the size of the disks nowawdays...
 
Old 06-14-2017, 04:54 AM   #20
EthanStark
LQ Newbie
 
Registered: Jun 2017
Posts: 8

Rep: Reputation: Disabled
If you need to use hibernation you need 3GB, otherwise you probably won't use swap very often (if at all). 512MB would be plenty, I tend to go for 1GB because it's a nice round number.
 
Old 07-21-2017, 06:41 AM   #21
Mike_Walsh
Member
 
Registered: Jul 2017
Location: King's Lynn, UK
Distribution: Puppy Linux, AntiX
Posts: 260

Rep: Reputation: 120Reputation: 120
Quote:
Originally Posted by LeKeiser View Post
Just logged very fast on my laptop and launched Chrome with 20 tabs, and I'm quite surprised:

Code:
yves@Yves-Ubuntu:~$ free -h
                      total       utilisé      libre     partagé tamp/cache   disponible
Mem:                  3,8G        2,7G        152M        244M        1,0G        625M
Partition d'échange:              3,9G        4,6M        3,9G
So the RAM is full and so is the swap file...
I guess I really need that 8GB DIMM but also to change the size of the swap file once I have upgraded...
Those figures can be a wee bit misleading, y'know. This is a question often asked by those new to Linux, and, moreover, used to the way that Windows reports things.

Have a look here:-

http://www.linuxatemyram.com/

It explains in straight-forward, beginner-friendly language, what Linux is doing with your RAM. And don't forget, Chrome has always been something of a memory hog, largely due to the way in which its sandboxing process works (setting up a completely isolated environment for every tab you open).....even though memory usage has been addressed in recent releases over the last year.


Mike.

Last edited by Mike_Walsh; 07-21-2017 at 06:44 AM.
 
Old 07-21-2017, 08:51 AM   #22
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: MID-SOUTH USA
Distribution: Slackware 14.2 / Slackware 14.2 current / Manjaro / Parrot
Posts: 7,352

Rep: Reputation: 1481Reputation: 1481Reputation: 1481Reputation: 1481Reputation: 1481Reputation: 1481Reputation: 1481Reputation: 1481Reputation: 1481Reputation: 1481
what are you using? Desktop or Laptop? I got a laptop I use that SD Card slot that I have to other real use for it as my swap drive. Only because Slack say where is your swap ?? when installing, so one day I just stuck a 16GB card in that slot and made it a swap format and it was acceptable to Slack.

I further just installed this Linux OS that is a fork from Debian before systemD yesterday. It too wanted a swap, so I told it to use that SD Card. it works.

Point being is, if you want to use whatever space you'd use for a swap as data storage, using that SD Card slot for your swap maybe a good alternative. picking up a 32GB SD Card is rather inexpensive - it might be worth your while to experiment with that means for your hibernation.
 
Old 07-22-2017, 09:14 PM   #23
AwesomeMachine
LQ Guru
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,513

Rep: Reputation: 1000Reputation: 1000Reputation: 1000Reputation: 1000Reputation: 1000Reputation: 1000Reputation: 1000Reputation: 1000
To make an 8GB swap file:
Code:
$ dd if=/dev/zero of=/swap.file bs=1m count=8000
$ mkswap /swap.file
$ swapon /swap.file
And your ready to go. It doesn't really need to be a separate partition. For hibernate, all the memory must fit in the swap space.
 
Old 07-24-2017, 06:12 PM   #24
IsaacKuo
Senior Member
 
Registered: Apr 2004
Location: Baton Rouge, Louisiana, USA
Distribution: Debian 9 Stretch
Posts: 2,349
Blog Entries: 8

Rep: Reputation: 383Reputation: 383Reputation: 383Reputation: 383
Quote:
Originally Posted by AwesomeMachine View Post
To make an 8GB swap file:
Code:
$ dd if=/dev/zero of=/swap.file bs=1m count=8000
$ mkswap /swap.file
$ swapon /swap.file
And your ready to go. It doesn't really need to be a separate partition. For hibernate, all the memory must fit in the swap space.
You may also need to set the file permissions with:

Code:
chmod 600 /swap.file
 
Old 07-24-2017, 09:59 PM   #25
Trihexagonal
Member
 
Registered: Jul 2017
Location: Land of 1000 Nights
Distribution: FreeBSD, OpenBSD and Solaris
Posts: 165

Rep: Reputation: 113Reputation: 113
Quote:
Originally Posted by LeKeiser View Post
Just logged very fast on my laptop and launched Chrome with 20 tabs, and I'm quite surprised:

Code:
yves@Yves-Ubuntu:~$ free -h
                      total       utilisé      libre     partagé tamp/cache   disponible
Mem:                  3,8G        2,7G        152M        244M        1,0G        625M
Partition d'échange:              3,9G        4,6M        3,9G
So the RAM is full and so is the swap file...
I guess I really need that 8GB DIMM but also to change the size of the swap file once I have upgraded...
FreeBSD sees free RAM as wasted RAM and allocates it differently than Linux. From top on my machine with 4GB RAM:

Code:
Mem: 435M Active, 1920M Inact, 716M Wired, 363M Buf, 622M Free
Swap: 3598M Total, 132M Used, 3465M Free, 3% Inuse
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Do I have to change the size of my swap partition if I add RAM? piratetux! Puppy 2 04-17-2009 12:05 PM
How can I resize the swap partition, which is same as RAM Now gkthomas Linux - Software 3 02-16-2006 10:40 AM
2 GB of ram, do I need a swap partition? davesbedroom Linux - General 2 03-31-2005 12:43 PM
16 GB of RAM and Linux still uses over 1 GB of a 2 GB swap partition!? lumberjack77 Linux - Software 8 09-25-2003 02:07 PM
Swap Partition - RAM?? jt1020 Linux - General 7 04-30-2003 09:02 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 02:57 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration