
Daniel is a system programmer & web developer with 10 years of experience...
system programmer & web developer
coder . cl
a journey in software development...
slow bea portal development environment?
by Daniel Molina Wegener on 31-12-2008
Everyone who works with Bea Portal, knows that sometimes grows slow and enterprise applications are a quite huge. We can change our settings in our development server to get more performance from the development server. It’s about increasing some limits and growing memory, and also configuring some garbage collector settings and thread creation settings.
memory arguments
Memory arguments are placed as environment variables on the operating system that you are working on. For some applications, the memory assigned to the stack and heap should be enough with 128MB. Also, there is no place to put our garbage collector arguments to the running server, then we can use the MEM_ARGS.
On the Linux platform, you must have something like this, depending on the memory that fits your needs and the available memory on your machine:
### piece of .bashrc, .profile or another environment settings file
export BEA_MEM_LIMITS='-Xms340m -Xmx340m'
export BEA_GC_OPTIONS='-Xgcprio:throughput'
export MEM_ARGS="$BEA_MEM_LIMITS $BEA_GC_OPTIONS"
The BEA_MEM_LIMITS options, means that you will assign 340MB of memory to the initial (ms) and maximum (mx) heap size. The BEA_GC_OPTIONS means that the JRockit JVM will use the parallel (multiprocessor) garbage collector algorithm.
thread limits
Other important configuration to enhance the development server performance, are the thread limits. It isn’t made under command line arguments, but, but made under the config.xml of the server.
<-- ...more stuff... -->
<Server
JavaCompiler="jikes"
NativeIOEnabled="true">
<-- ...more stuff... -->
<ExecuteQueue Name="default" ThreadCount="32"/>
<ExecuteQueue Name="portalRenderQueue" ThreadCount="32"/>
<-- ...more stuff... -->
</Server>
<-- ...more stuff... -->
Important parameters in block of code are: JavaCompiler, NativeIOEnabled and ThreadCount. By default, ThreadCount for default execution queue it’s assigned to 15, if we increase this limit to 32 and the portalRenderQueue is increased to 32, we will get more performance on rendering pages and processing data. The JavaCompiler should be set to the faster compiler available, such as jikes. The NativeIOEnabled must set to true, then we get native input/output processing. Also, you must set your environment variable PATH in the way that can handle the configured compiler in the natural command line.
The ThreadCount parameter, does the right job only under multi-core processors or machines with two or more processors.
configuring workshop
By default, is used the Sun JVM with Workshop, we can ensure the use of JRockit JVM and Native I/O to get more performance under the Workshop development environment. We must pass the next arguments in the Workshop.cfg file:
-Xms420m -Xmx420m -Xgcprio:throughput -Xss1024k
Just adjust the memory limits to your needs and the available memory on your machine. Try to use physical memory instead of swapping. Also you must know that you need up to 3GB of RAM to get the environment working fine, in other cases you get a slow environment, depending of the size of the application that you are working on.
Also you must set the interpreter from the Sun JVM to the JRockit JVM by changing the line:
/opt/bea/jdk142_11/bin/javaw.exe
By the line:
/opt/bea/jrockit81sp6_142_10/bin/javaw.exe

