LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices


Reply
  Search this Thread
Old 04-02-2014, 05:26 AM   #1
ramset6969
LQ Newbie
 
Registered: Mar 2014
Posts: 4

Rep: Reputation: Disabled
my redhat has cache memory configured too high


hi
my redhat has cache memory configured too high


[rootWEDOCOL01 ~]# cat /proc/version
Linux version 2.6.32-431.el6.x86_64 (mockbuild@x86-023.build.eng.bos.redhat.com) (gcc version 4.4.7 20120313 (Red Hat 4.4.7-4) (GCC) ) #1 SMP Sun Nov 10 22:19:54 EST 2013

[rootWEDOCOL01 ~]# free -m
total used free shared buffers cached
Mem: 32109 31852 257 0 282 30914
-/+ buffers/cache: 654 31455
Swap: 24575 0 24575

[root@WEDOCOL01 ~]# cat /proc/meminfo
MemTotal: 32880496 kB
MemFree: 263728 kB
Buffers: 289792 kB
Cached: 31656824 kB
SwapCached: 0 kB
Active: 1144240 kB
Inactive: 30822116 kB

Active(anon): 2044 kB
Inactive(anon): 17916 kB
Active(file): 1142196 kB
Inactive(file): 30804200 kB
Unevictable: 0 kB
Mlocked: 0 kB
SwapTotal: 25165816 kB
SwapFree: 25165816 kB
Dirty: 0 kB
Writeback: 0 kB
AnonPages: 19740 kB
Mapped: 13760 kB
Shmem: 220 kB
Slab: 271484 kB
SReclaimable: 230980 kB
SUnreclaim: 40504 kB
KernelStack: 1672 kB
PageTables: 2260 kB
NFS_Unstable: 0 kB
Bounce: 0 kB
WritebackTmp: 0 kB
CommitLimit: 41540528 kB
Committed_AS: 145460 kB
VmallocTotal: 34359738367 kB
VmallocUsed: 333316 kB
VmallocChunk: 34359400876 kB
HardwareCorrupted: 0 kB
AnonHugePages: 4096 kB
HugePages_Total: 64
HugePages_Free: 64
HugePages_Rsvd: 0
HugePages_Surp: 0
Hugepagesize: 2048 kB
DirectMap4k: 10240 kB
DirectMap2M: 33544192 kB


How can I lower my high cache memory ?

could you help me?

Thanks!
 
Old 04-02-2014, 04:17 PM   #2
Pearlseattle
Member
 
Registered: Aug 2007
Location: Zurich, Switzerland
Distribution: Gentoo
Posts: 999

Rep: Reputation: 142Reputation: 142
I don't know what your assumptions are but the values you see are normal under Linux.

Linux will try to use all free RAM to cache filesystem data - this is the desired Linux behaviour as it's better to have unused RAM used to cache disk access than to have it sitting there doing nothing.

To know how much RAM you have available for your programs you should treat your "cached" memory as being "free" as it will be actively used by a program as soon as such a need arises, otherwise it will just be used by the kernel to cache filesystem data.
 
Old 04-03-2014, 03:44 AM   #3
ramset6969
LQ Newbie
 
Registered: Mar 2014
Posts: 4

Original Poster
Rep: Reputation: Disabled
i have a problem with java

[root@WEDOCOL01 /]# java -version
Java HotSpot(TM) 64-Bit Server VM warning: INFO: os::commit_memory(0x0000000758c00000, 176160768, 2097152, 0) failed; error='Cannot allocate memory' (errno=12)
Java HotSpot(TM) 64-Bit Server VM warning: INFO: os::commit_memory(0x000000060a400000, 350224384, 2097152, 0) failed; error='Cannot allocate memory' (errno=12)
Java HotSpot(TM) 64-Bit Server VM warning: INFO: os::commit_memory(0x00007fb3e4200000, 266338304, 2097152, 0) failed; error='Cannot allocate memory' (errno=12)
java version "1.7.0_45"
Java(TM) SE Runtime Environment (build 1.7.0_45-b18)
Java HotSpot(TM) 64-Bit Server VM (build 24.45-b08, mixed mode)

however, if you launch the java command, specifying a low heap size, it does not give me error:

[root@WEDOCOL01 /]# java -Xmx102M -version
java version "1.7.0_45"
Java(TM) SE Runtime Environment (build 1.7.0_45-b18)
Java HotSpot(TM) 64-Bit Server VM (build 24.45-b08, mixed mode)

but, just get up even slightly, the error returns, even if in reduced form

[root@WEDOCOL01 /]# java -Xmx103M -version
Java HotSpot(TM) 64-Bit Server VM warning: INFO: os::commit_memory(0x00000000f4600000, 23068672, 2097152, 0) failed; error='Cannot allocate memory' (errno=12)
java version "1.7.0_45"
Java(TM) SE Runtime Environment (build 1.7.0_45-b18)
Java HotSpot(TM) 64-Bit Server VM (build 24.45-b08, mixed mode)

could you help me?
 
Old 09-04-2015, 11:41 AM   #4
thiagoborn
LQ Newbie
 
Registered: Sep 2012
Posts: 2

Rep: Reputation: Disabled
Set your file limits.conf

You must edit the file /etc/security/limits.conf

In my case the machine has cat /proc/meminfo
MemTotal: 3924372 kB
MemFree: 2634240 kB


### I edited the file as you can see bellow:
javauser hard nproc 31300 # hard e soft same value
javauser soft nproc 31300
javauser soft memlock 2639908
javauser hard memlock 2639908

Java HotSpot(TM) 64-Bit Server VM (build 24.0-b56, mixed mode)
[spjbotr2@ds0000vx130 ~]$ java -Xms5000M -Xmx5000M -version
java version "1.7.0_40"
Java(TM) SE Runtime Environment (build 1.7.0_40-b43)
Java HotSpot(TM) 64-Bit Server VM (build 24.0-b56, mixed mode)
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] how to find that we have problem with the cache memory when I have 2 cache and 3 proc rpittala Linux - Newbie 1 02-02-2012 03:46 PM
JVM memory usage is very high on SUSE linux and also on redhat linux, far less on win NatureBalances SUSE / openSUSE 1 10-09-2009 04:03 PM
Cache memory size too high? Boomba Linux - General 2 10-15-2005 01:32 PM
Help Configuring the Memory Used by a Process in RedHat? (Cache Memory on CPU) geogecko Linux - General 3 02-23-2005 03:32 PM
Help!?! RH 8 Memory Mapping -High Memory-Virtural Memory issues.. Merlin53 Linux - Hardware 2 06-18-2003 04:48 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat

All times are GMT -5. The time now is 07:53 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
Open Source Consulting | Domain Registration