View Full Version : ram usage
I am trying lps on my laptop running linux with 256Mb Ram, at startup lps launches 29 java threads using more than 700k each, wich is to much for my configuration. Is it possible to educe the number of threads and/or their memory usage?
I tried to modify the confs files but I didn't find the line I have to modify.
Thanks,
bloch
05-05-2004, 09:44 AM
Hmmm.... this seems unusual.
LPS shouldn't be using 29 threads at startup.
I would expect some much smaller number.
What version of linux (kernal and install)?
You can configure tomcat's max processor threads in
$TOMCAT_HOME/conf/server.xml with maxProcessors attribute.
It is conceivable that after reading some of the laszlo docs that have a examples embedded in them, that you could get your server up to that many threads. But most of them should be inactive.
-Eric
ps. You can get by with 256MB, but you'll be much happier with 512, fyi. Laszlo ship tomcat configged to use a java heap of 128meg, fyi.
Originally posted by bloch
LPS shouldn't be using 29 threads at startup.
when I launch the startup.sh script, I do have a 29 unix threads for the command java
I would expect some much smaller number.
What version of linux (kernal and install)?
kernel: 2.6.5
debian unstable
java installed with sun's packet, not a debian one
You can configure tomcat's max processor threads in
$TOMCAT_HOME/conf/server.xml with maxProcessors attribute.
does not work, still get many threads
It is conceivable that after reading some of the laszlo docs that have a examples embedded in them, that you could get your server up to that many threads. But most of them should be inactive.
I have all these thread as soon as I start lps and tomcat.Most of them are inactive, but it uses almost all my swap, thus causing a neat slowdown.
well thanks for all,
bloch
05-05-2004, 04:01 PM
If you simply use the tomcat script to startup tomcat
$TOMCAT_HOME/bin/startup.sh
and then browser to http://localhost:8080/
how many threads then?
-E
-----------------------------------------------------------------------
22:54 root@pep /home/pep# ps -a|grep java|wc
0 0 0
zsh: done ps -a |
zsh: exit 1 grep java |
zsh: done wc
22:55 root@pep /home/pep# $TOMCAT_HOME/bin/startup.sh
Using CATALINA_BASE: /home/pep/Heavy/lps-2.1.1/jakarta-tomcat-4.1.12
Using CATALINA_HOME: /home/pep/Heavy/lps-2.1.1/jakarta-tomcat-4.1.12
Using CATALINA_TMPDIR: /home/pep/Heavy/lps-2.1.1/jakarta-tomcat-4.1.12/temp
Using JAVA_HOME: /usr/lib/j2se/1.4
22:55 root@pep /home/pep# ps -a|grep java|wc
27 108 783
22:55 root@pep /home/pep# ps -a|grep java|wc
27 108 783
22:56 root@pep /home/pep# ps -a|grep java|wc
28 112 812
----------------------------------------------------------------------------------------------------------------------------------------------
so I have 27 java threads soon after launching the startup script,
27 also after browsing localhost:8080
28 after browsing one of my lzx pages
bloch
05-05-2004, 08:26 PM
Sadly, this looks like a Tomcat issue.
You could try running LPS inside another
container that uses fewer threads if you'd like.
We may bundle LPS in Tomcat5 in the future.
I don't know if it will use the same # of threads.
I recommend jetty 4.2 highly as being efficient in general. You might want to try it.
http://sourceforge.net/projects/jetty/
http://jetty.mortbay.org/jetty/index.html
-Eric
well I tried, but it does not works well,
mozilla does not open lzx pages with its flash plugin, neither does konqueror.
There is one exception: the left bar of laszlo explorer works almost perfectly, but I have this error on the right page:
[QUOTE]
HTTP ERROR: 500 org%2Fapache%2Ftools%2Fant%2FBuildException
RequestURI=/lps-2.1.1/laszlo-in-ten-minutes/source.jsp
Powered by Jetty://
[\QUOTE]
Since it works perfectly with tomcat, I think it is a server issue, maybe lzx is not reconised as it should by jetty, but I couldn't find out how to configure it.
(all i did is cp lps-2.1.1 in the jetty root dir and search for a way to configure it).
if someone can help me doing this.
bloch
05-07-2004, 03:12 PM
Did you copy the lps-2.1.1 web app directory into jetty's webapp directory?
It should look like
$JETTY_HOME/webapps/lps-2.1.1/WEB-INF/...
examples/...
docs/...
.
.
.
-Eric
yes it was the good lps folder, the one containing WEB-INF, examples,laszlo-in-ten-minutes...
well lps dir was on $JETTY_HOME/webapps/root/
I moved it to the $JETTY_HOME/webapps/ dir but I can't see lps anymore on http://localhost:8280/
(http://localhost:8280 gives me the listing of the $JETTY_HOME/webapps/root/ dir since I renamed the index.html file so that it is not automatically opened by jetty)
bloch
05-09-2004, 09:27 AM
That's strange.. did you restart jetty after moving
the directory? In general, webapps (and the lps-2.1.1 directory is a webapp) should be placed in the $JETT_HOME/webapps directory and *not* in the root directory (the root directory is a webapp itself).
-Eric
sure I restarted jetty.
well I am quite new to jetty, are the different webapps supposed to be accessible through different ports? or within the same port with a different path?
because once again, I am already in the root dir when I open locahost:8280/.
antun
05-10-2004, 01:53 PM
Typically they're on the same port, but accessible through different paths, and the paths typically correspond to the name of the directory in the webapps folder.
-Antun
are the different webapps supposed to be accessible through different ports? or within the same port with a different path?
vBulletin® v3.8.4, Copyright ©2000-2012, Jelsoft Enterprises Ltd.