You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Sam <is...@ms45.hinet.net> on 2001/10/08 03:47:40 UTC

! Reduce Tomcat Memory cost.

Hi everybody,

We consider that agent should not occupy so much memory,
so could you tell us How to reduce the amount of memory the agent actually
occupies?

  I want to minimize the tomcat RSS memory.
  I use "ps -A v too check the information.

  ==
  PID TTY      STAT   TIME  MAJFL   TRS   DRS  RSS %MEM COMMAND
  15614 ?        S    0:01    356   152  2679 1852  1.4
/usr/local/sbin/snmpd
  11168 ?        S    0:04    615     9 78386 8988  7.0
/home/sam/jdk/bin/i386/g...
  == THE fragment of tomcat.sh
  if [ "$1" = "start" ] ; then
  shift
  echo Using classpath: ${CLASSPATH}
  if [ "$1" = "-security" ] ; then
    shift
    echo Starting with a SecurityManager
    $JAVACMD
$TOMCAT_OPTS -Djava.security.manager -Djava.security.policy==${TOM
  else
  $JAVACMD $TOMCAT_OPTS -Dtomcat.home=${TOMCAT_HOME}
org.apache.tomcat.startup
  fi
  #   $JAVACMD org.apache.tomcat.shell.Startup "$@" &
  ==

 It cost around 9M memory, so big............
 How should I reduce and rebuild the main program.?
 any idea?

 REBUILD tomcat and objcopy --debug?
 Our  Platform: tomcat 3.2.3;jdk 1.2.2;Mandrake 7.0

 It is terrible for developing embedded system.
 BY THE WAY, I also try the RESIN, It cost around 10% memory.
 thanks all!!

--Sam