Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Too much RAM?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
Bigun
Advocate
Advocate


Joined: 21 Sep 2003
Posts: 2154

PostPosted: Fri Apr 28, 2017 3:21 pm    Post subject: Too much RAM? Reply with quote

I've got a system that (at one time) had way too little RAM, only 2 GB.

I decided to go overboard and install 16GB of RAM I borrowed from someone. What I expected is a few gigabytes of RAM to get used, and the rest used for caching.

What wound up happening is a few gigabytes got used, and only about 6 gigabytes got cached, and 8GB unused.

Do I just have too much RAM? Or is there a kernel/system setting that may need to be adjusted?
_________________
"It's ok, they might have guns but we have flowers." - Perpetual Victim
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 7132
Location: Saint Amant, Acadiana

PostPosted: Fri Apr 28, 2017 3:26 pm    Post subject: Reply with quote

Use the RAM overage for tmpfs and let portage use it. Faster and less stress on your hard drive.

https://wiki.gentoo.org/wiki/Portage_TMPDIR_on_tmpfs
_________________
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
John R. Graham
Administrator
Administrator


Joined: 08 Mar 2005
Posts: 10278
Location: Somewhere over Atlanta, Georgia

PostPosted: Fri Apr 28, 2017 3:35 pm    Post subject: Reply with quote

Well it certainly doesn't hurt anything just sitting there, not even power consumption by any appreciable amount.

I'd say start a build of chromium with --jobs set in MAKEOPTS appropriately for your number of cores and monitor memory usage. On my main development system with 16 cores and 32GiB if RAM, it idles at about 16GiB free but mid-build of chromium it drops to less than 5GiB free sometimes.

- John
_________________
I can confirm that I have received between 0 and 499 National Security Letters.
Back to top
View user's profile Send private message
Bigun
Advocate
Advocate


Joined: 21 Sep 2003
Posts: 2154

PostPosted: Fri Apr 28, 2017 3:39 pm    Post subject: Reply with quote

John R. Graham wrote:
Well it certainly doesn't hurt anything just sitting there, not even power consumption by any appreciable amount.

I'd say start a build of chromium with --jobs set in MAKEOPTS appropriately for your number of cores and monitor memory usage. On my main development system with 16 cores and 32GiB if RAM, it idles at about 16GiB free but mid-build of chromium it drops to less than 5GiB free sometimes.

- John


It's a headless server. It runs MySQL, Apache, PHP, and a 7 Days to Die server.
_________________
"It's ok, they might have guns but we have flowers." - Perpetual Victim
Back to top
View user's profile Send private message
frostschutz
Advocate
Advocate


Joined: 22 Feb 2005
Posts: 2971
Location: Germany

PostPosted: Fri Apr 28, 2017 3:57 pm    Post subject: Re: Too much RAM? Reply with quote

Bigun wrote:
Do I just have too much RAM?


If you're not doing much I/O then... yes.

Caching is mostly files, but if you don't read files a lot, you don't get much in the cache.

If you read a file only once, while it would be in the cache afterwards, it won't serve any purpose if you don't read it again (it'll be the first thing to go once something else wants to be cached though).

So in a way a "full" cache might not be any more useful than "free ram" in some cases. Cache is always a hit and miss.
Back to top
View user's profile Send private message
szatox
Veteran
Veteran


Joined: 27 Aug 2013
Posts: 1751

PostPosted: Fri Apr 28, 2017 8:24 pm    Post subject: Reply with quote

Quote:
Do I just have too much RAM?
Java has too much RAM. Chrome and "modern" firefox too.
Taking it more seriously, it depends on $$ you have to pay for it. Oh, and if you test RAM during BIOS phase every time you boot, every single GB needs extra time.
Otherwise... There is no such thing as "too much" of resources.
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 7132
Location: Saint Amant, Acadiana

PostPosted: Fri Apr 28, 2017 8:27 pm    Post subject: Reply with quote

Too much RAM?
Code:
server ~ # free -h
              total        used        free      shared  buff/cache   available
Mem:            15G        9.1G        3.6G        356K        2.8G        6.2G
Swap:          1.0G        632K        1.0G
server ~ # uptime
 15:26:52 up 67 days, 23:26,  2 users,  load average: 0.02, 0.05, 0.11

_________________
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
1clue
Advocate
Advocate


Joined: 05 Feb 2006
Posts: 2562

PostPosted: Fri Apr 28, 2017 8:40 pm    Post subject: Reply with quote

My smallest gentoo box has 16g ram. The longer your system stays up the more RAM is used as disk cache. It's a logarithmic progression, so the first few days system cache grows pretty fast, then on it creeps up slower and slower.

I use a lot of VMs, not as end-user desktops but as servers. Each needs enough RAM to function. Depending on the desired performance they may need a lot of memory.


  1. Use tmpfs where appropriate
  2. Play with MAKEOPTS="-jSOMETHING" where SOMETHING is an appropriate value for your number of cores. Don't feel constrained by the normal docs. I've used -j12 or more on an 8-core box, if you don't have anything pressing to do on the box it's fine and gets the building done faster at the expense of interface lag.
  3. If you use VMs then 16g may easily be eaten up and you may need a lot more.


Only you can determine what the best use of your system might be.

A normal user system, no VMs and just web browsing and office-style work probably would be pressed to use more than 2-4g. Gaming I don't know much about but I understand it can require a lot of cores and a lot of RAM. VMs take a chunk, depending on what you do with the VM.
Back to top
View user's profile Send private message
Akkara
Administrator
Administrator


Joined: 28 Mar 2006
Posts: 6702
Location: &akkara

PostPosted: Sat Apr 29, 2017 4:59 am    Post subject: Reply with quote

I think the intent of the original question has been overlooked in the replies. So I'll try responding even though I'm not completely sure of the fine details of what I'm about to say:

You might be running into a hardware limitation of your current motherboard or CPU/northbridge combo.

There's a fixed limit to now many address lines are brought out from the CPU to the RAM modules. Just because it is a 64-bit CPU doesn't mean all 64 address wires are brought out to the external interface. It almost always is less than this. It can vary depending on CPU, northbridge, and sometimes even motherboard and memory sockets. If as you say this system is old, it is possible there's only enough pins to address 8GB.

It might also be a limit set by bios. Maybe it only looks for up this much and won't report on more. Updating the bios could help if that's where the limit is coming from.
_________________
Many think that Dilbert is a comic. Unfortunately it is a documentary.
Back to top
View user's profile Send private message
C5ace
Apprentice
Apprentice


Joined: 23 Dec 2013
Posts: 282
Location: Brisbane, Australia

PostPosted: Sat Apr 29, 2017 6:13 am    Post subject: Re: Too much RAM? Reply with quote

Bigun wrote:
I've got a system that (at one time) had way too little RAM, only 2 GB.

I decided to go overboard and install 16GB of RAM I borrowed from someone. What I expected is a few gigabytes of RAM to get used, and the rest used for caching.

What wound up happening is a few gigabytes got used, and only about 6 gigabytes got cached, and 8GB unused.

Do I just have too much RAM? Or is there a kernel/system setting that may need to be adjusted?


My Desktop with Gigabyte Technology Co., Ltd. GA-MA790FXT-UD5P Main Board and a x86_64 AMD Phenom II X4 945 Processor of 2007 vintage only supports up to 8GB RAM in 4 sockets with up to 2GB each.
Back to top
View user's profile Send private message
Tony0945
Advocate
Advocate


Joined: 25 Jul 2006
Posts: 3121
Location: Illinois, USA

PostPosted: Sat Apr 29, 2017 8:39 am    Post subject: Reply with quote

Regarding Akkara's comment, you can use the Crucial Advisor Tool to determine your maximum memory and configuration.
http://www.crucial.com/ The System scanner only works for Windows, but the Advisor Tool has a huge database of motherboard's. Besides advising you of compatible Crucial memory (obviously, it's intent is to sell you their memory sticks) it will specify things like ECC/non-ECC, number of slots, maximum memory and type (maximum RAM per stick, pins etc.) of memory. It's a good reference. I find it handier than searching for my (often unintelligible) mobo manual.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43387
Location: 56N 3W

PostPosted: Sat Apr 29, 2017 9:19 am    Post subject: Reply with quote

The memory limit imposed by hardware is more subtle than Akkara describes.

To address DRAMs, the address from the CPU is split into two, the two parts are then interleaved on the same pins on the DRAM.
This gets the row address and column address. If you look in your BIOS, you will see things related to RAS and CAS timings.
They are Row Address and Column Address Strobes. Don't fiddle with the timings. Horrible things will happen.

Conceptually, then DRAMs are a rectangular array of locations, usually not square.
Memory controllers know this and will address a maximum number of rows and a maximum number of columns.
Over the years, bigger DRAMs are manufactured, with larger numbers of rows and or columns (or both.)
Our old DRAM controller cannot address these extra rows and columns, so the memory appears smaller than was expected.

That's not to say you can't fit more RAM, its just a waste using DRAMs with the wrong 'geometry'.
However, some memory sticks have more chips on than others. Provided the DRAM controller can drive the 'geometry' of the chips, decoding which chips to address is performed outside the DRAM silicon.
Thus some memory sticks (with more smaller geometry DRAMs) work while those with fewer but larger geometry DRAMs don't.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Fitzcarraldo
Veteran
Veteran


Joined: 30 Aug 2008
Posts: 1675
Location: United Kingdom

PostPosted: Sat Apr 29, 2017 9:27 am    Post subject: Reply with quote

dmidecode is also a handy tool. It's in the Portage main tree.

dmidecode man page wrote:
The DMI table doesn't only describe what the system is currently made of, it also can report the possible evolutions (such as the fastest supported CPU or the maximal amount of memory supported).

_________________
Clevo W230SS: amd64 OpenRC elogind nvidia-drivers & xf86-video-intel.
Compal NBLB2: ~amd64 OpenRC elogind xf86-video-ati. Dual boot Win 7 Pro 64-bit.
KDE on both.

Fitzcarraldo's blog
Back to top
View user's profile Send private message
szatox
Veteran
Veteran


Joined: 27 Aug 2013
Posts: 1751

PostPosted: Sat Apr 29, 2017 10:50 am    Post subject: Reply with quote

Neddy, Akkara, would the part of RAM not addressable by the controller still recognised by the system as present?
You know, shouldn't it report only 8GB total if this was the hardware's limit? I think exactly this used to happen if you stuffed 4GB RAM into 32 bit system. It would cap the around 3.5GB due to a part of address space being reserved for MMIO (though there were some patches to circumvent this issue)
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43387
Location: 56N 3W

PostPosted: Sat Apr 29, 2017 1:08 pm    Post subject: Reply with quote

szatox,

That depends if the system reads the Serial Presence Detect ROM on each DRAM stick or uses the amount of RAM detected.
The detected RAM would agree with the hardware limit. The SPD will describe the memory stick.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum