Everytime you invoke bljyhton, it launches a new JVM for itself to execute your jython code.
What is the JVM memory configuration for bljython ? What kind of scripts are these ?
What is the underlying total memory available on the server ?
If you write a wrapper NSH script job to execute your scripts, and create a NSH job in BladeLogic for that, then use the Blade adapter to run that job with parameters passed as name of the script you need to execute, you will not have to authenticate everytime, the credentials should be taken from the appserver environment, the user and role that runs this job.
But this will not effectively solve your problem of memory .
How much physical memory in your system?
This is running from your workstation or the appserver?
If the appserver, how many appserver instances and what is the maxheap setting per instance?
In the bljython file what do you have for the Xmx setting ?
Hello everyone, thanks for answering.
I answer some of your questions:
- Server's Total Memory: 16GB
- The process is running from the BMC Atrium Ochestrator server (BAO & Bladelogic are in different servers)
- File bljython.cfg has this configuration (only Xmx, not Xms):
- Kind of JLI scripts: for example, we retrieve the list of jobs from a particular group --> we couldn't find the way to do this using plain blcli commands.
We have terrible perfomance issues (not only memory issues), I am sure it is because of Bladelogic configuration at BAO's server:
If I execute the same exact command in a shell script using blcli commands and in a jli script, the execution time differs in 4 minutes.
1. get_classes.sh --> it takes 10secs aprox
blcred cred -acquire -profile $PROFILE_NAME -username $USER -password $PWD
blcli_setoption serviceProfileName $PROFILE_NAME
blcli_setoption roleName $ROLE_NAME
blcli_execute PropertyClass listAllSubclassNames "Class://SystemObject/"
2. get_classes.py --> it takes 4min aprox
os.system('blcred cred -acquire -profile "'+vProfileName+'" -username "'+vUser+'" -password "'+vPwd+'"')
jli = blcli.CLI()
cmd = ['PropertyClass','listAllSubclassNames']
The connection time is too high in JLI scripts, why could it be?
Is there any way to set JVM options inside jython script?
Thanks in advance.
Is this a linux system? what version of bbsa?
Linux Redhat 2.6.18-128.el5 and Bladelogic v8.0 SP 11
What version of Jython is this ?
when you use bljython, the JVM sizes are taken from bljython.cfg, thats how you specify what to use for all your JLI scripts.
How much time does your Bljython takes up to start ? Try starting bljython on command line.
Again to confirm you are not using BladeLogic Adapter ? Are you ?
I am not using BLadelogic Adapter for executing JLI scripts, i am using a command line adapter in BAO.
The script does not take much to start, the connection does.
- bljython.cfg has this configuration:
if the system running jython is linux - look at the NSH/br/java/lib/security/java.security file. is the securerandom /dev/urandom ? if so, change it to /dev/./urandom
what else is running on this box? also - it's the 'client' box that is running the scripts that is running out of memory right ?
Thanks Bill! the JLI script execution time decreased from 4min to 10secs, just by changing that option from java security file.
I will run some other tests and I will let you know.
Is it a bug with Java ??
I've read It is a Java bug under Linux OS (it is suppossed to work ok in Windows OS), but we have this property setted to "/dev/urandom" in another Linux with Bladelogic and it works ok.
The only difference between both Linux servers is the NSH version:
- Server Linux #1 (works with "/dev/urandom") :
BladeLogic RSCD Agent 126.96.36.1993 (Release) [Jul 30 2010 20:10:44]
Copyright (C) 1996-2009 BladeLogic Inc.
BladeLogic Network Shell 188.8.131.523 (Release) [Jul 30 2010 20:10:44]
Copyright (C) 1996-2009 BladeLogic Inc.
- Server Linux #2 (works with "/dev/../urandom") --> this was the problematic one
BladeLogic Network Shell 184.108.40.2067 (Release) [Sep 6 2011 15:32:51]
Copyright (C) 1996-2011 BladeLogic Inc.
Both servers :
- Linux 2.6.18-128.el5
- Java version "1.6.0_21"
It’s a problem w/ linux and java. The rscd agent doesn’t use java so this problem doesn’t affect targets, just systems running the blcli.