LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This 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


Reply
  Search this Thread
Old 07-20-2012, 08:17 PM   #1
MisterBark
Member
 
Registered: Jul 2012
Location: Republic of Krakozhia
Distribution: Slackware & Zenwalk core + compile
Posts: 104

Rep: Reputation: 6
Talking Terrible problem: too much RAM, don't know what to do with it


Hey guys,
I hope you are doing well, this is such a nice day!

My problem is simple but it's becoming hard for me to find a solution...
I ordered a new server at LSN and there is 16GB of RAM.

I've already :
- put /bin /usr /sbin /lib in ramfs
- all cgi, html files and even httpd logs in tmpfs with automatic tar to restore in case of reboot
- MySQL master has key_buffer_size=2048M and other big values
- MySQL slave is about the half

And despite of all this, the overall system uses about 8G of RAM.
The problem is that, I am afraid that the 8G others get bored.

What can I do?
Please help me, please help them.
 
Old 07-20-2012, 08:22 PM   #2
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,326
Blog Entries: 28

Rep: Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142
What is the output of uname -a.
 
1 members found this post helpful.
Old 07-20-2012, 08:28 PM   #3
MisterBark
Member
 
Registered: Jul 2012
Location: Republic of Krakozhia
Distribution: Slackware & Zenwalk core + compile
Posts: 104

Original Poster
Rep: Reputation: 6
Quote:
Originally Posted by frankbell View Post
What is the output of uname -a.
Thanks a lot for your help Frankbell.
Here is uname -a :
Code:
Linux ******* 3.2.22-grsec #1 SMP Tue Jul 10 22:41:01 CDT 2012 i686 GNU/Linux
 
Old 07-21-2012, 12:07 AM   #4
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142
Fire up a VM with 8g allocated to it?
 
1 members found this post helpful.
Old 07-21-2012, 03:27 AM   #5
honeybadger
Member
 
Registered: Aug 2007
Location: India
Distribution: Slackware (mainly) and then a lot of others...
Posts: 855

Rep: Reputation: Disabled
Too much RAM is a problem - that is a phrase that is almost never used in this forum. If I was you I would install about 3 Virtual Machines and then try and see if I can crack them open. You can also play some nice games (if that intrests you) with little or no lag.
Hope this helps.
 
1 members found this post helpful.
Old 07-21-2012, 03:34 AM   #6
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,128

Rep: Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121
Use it for swap ....
 
1 members found this post helpful.
Old 07-21-2012, 03:52 AM   #7
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
Why do you run a 32 bit OS on a machine with 16GB RAM? This way none of your applications will be able to address more than 3GB of RAM.
 
Old 07-21-2012, 04:07 AM   #8
MisterBark
Member
 
Registered: Jul 2012
Location: Republic of Krakozhia
Distribution: Slackware & Zenwalk core + compile
Posts: 104

Original Poster
Rep: Reputation: 6
Quote:
Originally Posted by TobiSGD View Post
Why do you run a 32 bit OS on a machine with 16GB RAM? This way none of your applications will be able to address more than 3GB of RAM.
My kernel is 64
I built the system starting from a Zenwalk core, which is 32. So I guess a few binaries and libs still 32.

Last edited by MisterBark; 07-21-2012 at 04:09 AM.
 
Old 07-21-2012, 09:34 AM   #9
linuxcoder
LQ Newbie
 
Registered: Jul 2012
Posts: 9

Rep: Reputation: Disabled
Two words: Mersenne primes
 
Old 07-21-2012, 04:53 PM   #10
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,985

Rep: Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626
Ramdrive, Load up an 8G of ram drive with applications that you want to run mucho fast.
 
Old 07-21-2012, 04:59 PM   #11
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197
Quote:
Originally Posted by MisterBark View Post
My kernel is 64
Are you sure?

I'm inclined to trust the uname output, which says your kernel is 32 bit.

Quote:
I built the system starting from a Zenwalk core, which is 32. So I guess a few binaries and libs still 32.
Even if uname itself were 32 bit, it should report on the kernel.

There is no problem using 32 bit programs and libs with a 64 bit kernel with 16GB.

A ram drive doesn't have significant advantage for the things you mentioned vs. just trusting file caching to automatically do its job.
A tmpfs is great for any frequently created/deleted files that you DON'T want kept across a reboot. But if you see a need to back up files from a tmpfs to keep across reboot, you probably shouldn't choose a tmpfs at all.

Last edited by johnsfine; 07-21-2012 at 05:03 PM.
 
Old 07-21-2012, 09:00 PM   #12
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,985

Rep: Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626
ramdrive and tmpfs are a bit different but tend to be called the same. A reboot or crash will destroy any intermediate data.

http://www.alper.net/linuxunix/linux...ed-filesystem/

You can automate it on reboot if you want and use it like any mount point. I used to copy the raw data over on reboot then run applications from the ramdrive.

Many ideas exist on how to use it instead of a hard drive access.

http://www.cyberciti.biz/faq/howto-c...sk-filesystem/

Last edited by jefro; 07-21-2012 at 09:05 PM.
 
Old 07-22-2012, 11:09 AM   #13
MisterBark
Member
 
Registered: Jul 2012
Location: Republic of Krakozhia
Distribution: Slackware & Zenwalk core + compile
Posts: 104

Original Poster
Rep: Reputation: 6
Actually, ramfs is preferable IMO because tmpfs is not always in the RAM. ramfs insures you to be in ram, whatever happens.
That's why I've put the system dirs into ramfs, and in read-only

I use tmpfs only for things that have a risk to go bigger, such as user-writable areas.
Then I simply tar them with cron and they are restored at boot time.

@johnsfine: well, yes I'm sure, I compiled it myself and I guess I wouldn't see all the ram if it was 32. i686 does not mean 32b.
 
Old 07-22-2012, 12:27 PM   #14
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
Actually, yes it does, i686 means 32 bit. And you will be able to see all of your RAM if you have PAE enabled in your 32 bit kernel. But that limits single processes to 3GB per process.
 
Old 07-22-2012, 01:30 PM   #15
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197
Quote:
Originally Posted by MisterBark View Post
Actually, ramfs is preferable IMO because tmpfs is not always in the RAM. ramfs insures you to be in ram, whatever happens.
I see that as a reason tmpfs is better. ramfs is in ram even if you don't have enough ram and even if performance suffers because of your choice to use a ramfs. tmpfs is in ram if that was a good choice and automatically in swap space instead if other uses of ram would give better performance.

Quote:
That's why I've put the system dirs into ramfs, and in read-only
Again, I would trust the Linux file caching to do a better job than you do yourself. You copy a bunch of files from disk to ram once on start up, whether those files are needed or not and lumping all that work together where it is very noticeable. Assuming you have excess ram, the Linux file caching will copy each of those files from disk to ram once on first access and never read them from disk again (until next reboot) but only the files that are actually used. So it has less total disk access and spread out to be less noticeable.

Quote:
@johnsfine: well, yes I'm sure, I compiled it myself
Are you sure you compiled it correctly and are you sure you loaded the kernel you compiled?

Quote:
and I guess I wouldn't see all the ram if it was 32. i686 does not mean 32b.
See (trust) TobiSGD's answer.

Minor detail: If you compiled your own 32 bit kernel, you might have selected the option to limit each process to 2GB instead of 3GB and by doing so avoid the overrun of kernel virtual memory that is a significant risk when using a 32 bit kernel with 16GB of ram.

For most uses of Linux, the per process limit of 3G (or even 2GB) is not a significant limitation. Your ram is divided among many process and file caching and maybe ramfs and/or tmpfs, so you can easily make good use of 16GB with no one process getting 2GB. Exhausting kernel virtual memory is more often a serious limit in 32 bit Linux systems with very large ram.
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Gentoo don't detect full ram memory YassBoss Linux - Hardware 8 08-01-2009 06:02 PM
vt's don't work after suspend to ram notapplicable Linux - Laptop and Netbook 0 11-23-2006 03:08 PM
DVD RAM on LG T1 Express not working, I don't want to go back to windows. please help n9n Linux - Newbie 3 06-14-2006 02:16 PM
top don't show me all my ram Polyvore Linux - General 2 04-29-2004 02:00 AM
Linux DON'T know how to release RAM? raylpc Linux - General 2 07-16-2003 07:25 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 11:48 PM.

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
Open Source Consulting | Domain Registration