LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 07-11-2008, 05:36 AM   #1
irey
Member
 
Registered: Jun 2008
Location: Torino, Italy
Posts: 66

Rep: Reputation: 17
java/tomcat cannot use 1GB of RAM even if I have 8GB


Hi everyone,

I know there's a lot of information about this on the internet but my question is more related to the concept than to the solution. I'm suffering the effects of information excess - read too much and understand nothing!!! So I need to ask about a specific point.

I set the CATALINA_OPTS environment variable with the -Xmx option for java. If I set 512MB it works OK, but with 1GB java doesn't startup - this value is too high. But there's a lot of free memory in my server!!!

Question: Is a contiguous memory space required? If so, can memory fragmentation be avoided in some strange way?

Thanks in advance
 
Old 07-11-2008, 07:42 AM   #2
ilikejam
Senior Member
 
Registered: Aug 2003
Location: Glasgow
Distribution: Fedora / Solaris
Posts: 3,109

Rep: Reputation: 96
Hi.

It's probably the ulimit limits being set too restrictively. What do you get from 'ulimit -a' as the user you're using to run tomcat?

Dave
 
Old 07-11-2008, 09:13 AM   #3
irey
Member
 
Registered: Jun 2008
Location: Torino, Italy
Posts: 66

Original Poster
Rep: Reputation: 17
Thanks for your reply.

ulimit says 'unlimited'.

Last edited by irey; 07-11-2008 at 09:15 AM.
 
Old 07-11-2008, 09:48 AM   #4
ilikejam
Senior Member
 
Registered: Aug 2003
Location: Glasgow
Distribution: Fedora / Solaris
Posts: 3,109

Rep: Reputation: 96
What does 'ulimit -a' say (as opposed to just 'ulimit')?

Dave
 
Old 07-14-2008, 03:54 AM   #5
irey
Member
 
Registered: Jun 2008
Location: Torino, Italy
Posts: 66

Original Poster
Rep: Reputation: 17
Of course I did run 'ulimit' with the -a option, I just copied the 'max memory size' limit in order to summarize instead of being too verbous.

If you still need the full output, here it is.
Code:
core file size          (blocks, -c) 0
data seg size           (kbytes, -d) unlimited
scheduling priority             (-e) 0
file size               (blocks, -f) unlimited
pending signals                 (-i) 127933
max locked memory       (kbytes, -l) 32
max memory size         (kbytes, -m) unlimited
open files                      (-n) 1024
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
real-time priority              (-r) 0
stack size              (kbytes, -s) 10240
cpu time               (seconds, -t) unlimited
max user processes              (-u) 127933
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited

Last edited by irey; 07-14-2008 at 03:56 AM.
 
Old 07-15-2008, 05:24 AM   #6
ilikejam
Senior Member
 
Registered: Aug 2003
Location: Glasgow
Distribution: Fedora / Solaris
Posts: 3,109

Rep: Reputation: 96
I should really probably read questions a bit more thoroughly...

Yes, contiguous memory is required for the JVM heap. I take it you're on 32 bit hardware?

Dave
 
Old 07-15-2008, 06:58 AM   #7
irey
Member
 
Registered: Jun 2008
Location: Torino, Italy
Posts: 66

Original Poster
Rep: Reputation: 17
32 bit? I'm not sure but it's an Intel Xeon proccessor... Xeon is 64 bit right??

Anyway, memory fragmentation is caused by lots of processes being started and terminated. So if I start tomcat earlier in the boot sequence it should find a larger memory space, right?

Unfortunately I can't restart my server now... I'll try when my users sleep.
 
Old 07-15-2008, 07:08 AM   #8
ilikejam
Senior Member
 
Registered: Aug 2003
Location: Glasgow
Distribution: Fedora / Solaris
Posts: 3,109

Rep: Reputation: 96
Xeons come in 32 and 64 bit, so who knows... But yes, the earlier you can start tomcat the better - anything up to around a 1.8GB heap should be do-able.

Dave
 
  


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 not seem to be able to use more than 1GB RAM surajc Linux - Kernel 6 10-13-2006 09:55 PM
Sarge + 1GB RAM how? KaraK Debian 9 01-07-2005 09:00 PM
1Gb or Ram - Do I need Swap? Riddick SUSE / openSUSE 8 11-10-2004 06:44 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 02:49 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