- I have searched previous threads for discussions related to my
problem, but and I have not found anything ...
- I have built some jython programs in the past with version 2.2 (I am
a beginner with Jython), but I do not recall my program having such a
large runtime memory footprint? I have worked extensively with CPython
and Java for over a decade.
PROBLEM: Why does a basic a jython program consume so much runtime
(resident) RAM memory ?
- I am using :
(Release_2_5_1:6813, Sep 26 2009, 13:47:54)
[OpenJDK 64-Bit Server VM (Sun Microsystems Inc.)] on java1.6.0
Type "help", "copyright", "credits" or "license" for more information.
My underlying OS platform is Linux Enterprise Server 4.x.
Test program :
#! /bin/env jython
import sched, time
print 'hello ...'
s = sched.scheduler(time.time, time.sleep)
sleep_time = 10
s.enter(sleep_time, 1, test, ())
When I do a top to check the memory footprint the above program is
using, I get a whopping 152 Mbytes ?
PID USER PR
NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
10260 charesmi 21 0 874m 152m 8596 S 0.0 7.6 0:06.47
-Xss1024k -classpath /p/jython
10257 charesmi 18 0 65884 1168 976 S 0.0 0.1 0:00.01 bash
9119 charesmi 15 0 12740 1116 840 R 2.4 0.1 0:23.74
One last piece of information : When I just open up a
Jython interpreter, the memory footprint is 96 Mbytes.
QUESTION : Is there a way to configure the jython or java runtime to
consume less resident memory ? Is this normal ?