- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- Re: Java Process consuming more of CPU
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-08-2005 04:27 PM
02-08-2005 04:27 PM
Java Process consuming more of CPU
Setup: Alpha VMS 7.3-2.
Patches:
VMS_UPDATE V0300
VMS732_SYS V0600
VMS_FIBRE_SCSI_V0400
VMS_PTHREAD_V0200
VMS_TRACE_V0200
DNVOSIECO01_V0732
TCPIP_ECO_V5.4-154
System Main Memory is 2.00GB.
java version "1.4.2"
Java(TM) 2 Runtime Environment, Standard Edition
Fast VM (build 1.4.2-3, build J2SDK.v.1.4.2:08/20/2004-13:43,
native threads, jit_142)
From the recommendations from
http://h71000.www7.hp.com/ebusiness/optimizingsdkguide.pdf
for optimizing JAVA performance I have done the below steps.
UAF FILLM 4096
CHANNELCNT 4096
WSDEF 2048
WSQUOTA 4096
WSEXTENT AND WSMAX 16384
PGFLQUO 2097152
BYTLM 400000
BIOLM 150
DIOLM 150
TQELM 100
$ @SYS$COMMON:[000000.JAVA$142.COM]
JAVA$142_SETUP.COM;1 fast
$ DEFINE/SYS JAVA$CACHING_INTERVAL 1000
$ DEFINE/SYS/NOLOG
JAVA$DISABLE_MULTIDOT_DIRECTORY_STAT TRUE
$ DEFINE/SYS DECC$FILE_SHARING ENABLED
Still I did not see difference in usage of
CPU by JAVA process.
Did anybody let me know I missed any thing.
-Thanks in advance
Kiran
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-08-2005 09:27 PM
02-08-2005 09:27 PM
Re: Java Process consuming more of CPU
you did not specify the hardware model, and, even more important, the amount of memory.
But, JAVA __IS__ a really CPU- and Memory-hungry beast!!
In your params I would like to increase WSEXTENT and BYTLM (at least) 4-fold, and I would remove the definition (in MODPARAMS) of WSMAX. After you do no longer specify WSMAX, let AUTOGEN calculate it for you (on the basis of physical memory).
After all, the memory HAS been payed for, why not let it be used on demand?
Hope this helps.
Proost.
Have one on me.
Jan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2005 01:32 AM
02-10-2005 01:32 AM
Re: Java Process consuming more of CPU
Thank you for reply.
Here the system specifications:
Model : Alpha Server DS10,CPU 600 MHz
Physical Memory Usage (pages):
Main Memory (2.00GB)
Total 262144
Free 109487
In Use 143672
Modified 8985
$1$DKA200:
Free Blocks:888030
I changed WSEXTENT and BYTLM to 4-fold and I did not have any definition for WSMAX in MODPARAMS.DAT
(I mean there is no value specified for WSMAX)
in SYSGEN the value of WSMAX is
SYSGEN> SHOW WSMAX
Parameter Name Current Default Min. Max. Unit Dynamic
-------------- ------- ------- ------- ------- ---- -------
WSMAX 157286 4096 1024 134217728 Pagelets
internal value 9831 256 64 8388608 Pages
-----------------------------------------------------------------
But I did not see much change in CPU utilization.
Please have a look at attachment for comparison.
-Thanks
Kiran
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2005 01:46 AM
02-10-2005 01:46 AM
Re: Java Process consuming more of CPU
Is the process doing lots of pagefaults (sh proc/acc) ? If so, increase wsquota a lot more. It can be the reason of the slowdown.
It seems to me that the program gets what it asks and only consumes the cpu in a limited way (e.g. because of IO or network traffic).
Wim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2005 02:13 AM
02-10-2005 02:13 AM
Re: Java Process consuming more of CPU
Yes, we are observing a lot of pagefaults. I increased 'wsquo' ... no use.
-Kiran
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2005 02:18 AM
02-10-2005 02:18 AM
Re: Java Process consuming more of CPU
Wim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2005 02:51 AM
02-10-2005 02:51 AM
Re: Java Process consuming more of CPU
Maxjobs: 0 Fillm: 4096 Bytlm: 1600000
Maxacctjobs: 0 Shrfillm: 0 Pbytlm: 0
Maxdetach: 0 BIOlm: 150 JTquota: 4096
Prclm: 25 DIOlm: 150 WSdef: 2048
Prio: 4 ASTlm: 250 WSquo: 500000
Queprio: 0 TQElm: 100 WSextent: 700000
CPU: (none) Enqlm: 2000 Pgflquo: 2097152
Actually I am using 'ECP Data Collector'
http://h71000.www7.hp.com/openvms/products/ecp/performance-and-capacity-download.html
for calculating the CPU usage.
With
$ plan collect =sample -
_$ /begin=21:05:00 -
_$ /end=21:15:00 -
_$ /interval=61 -
_$ /output=data.cpc
I am collecting the data and analyzing with
$Plan analyze/motif
Please have a look at attachment
for graph.
----------------------------------------------
With Java profiler
$ java -version
java version "1.4.2"
Java(TM) 2 Runtime Environment, Standard Edition
Fast VM (build 1.4.2-3, build J2SDK.v.1.4.2:08/20/2004-13:43, native threads, ji
t_142)
I am trying with "-Xrunhprof:cpu=samples,file=dka200:[kiran.pca]log.txt,depth=3"
which is showing 'jniOpen' and "jniScsi' calls taking more CPU. These calls
will call java native calls which will in-tern will fall into our application
code.
Hope this explanation will give you better idea about the environment.
-Kiran
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2005 02:51 AM
02-10-2005 02:51 AM
Re: Java Process consuming more of CPU
"Jcoreserver"
I should have guessed!
I do not know WHAT that beast is doing (should just get some disk ststusses!!),
but the one who wrote it probably thought it a good idea to go to the other side of the street around the world!!
We are "lucky" enough to have dual CPU's in the systems, _AND_ the app is not multithreaded, but whenever the beast wakes up, one CPU (up to 1250 GHz) is 100% loaded by it for about half a minute.
--- just MAYBE, someone at Engeneering should look at that code with a pair of Performance-focused glasses :-(
Sorry.
Proost.
Have one on me.
Jan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2005 09:23 PM
02-10-2005 09:23 PM
Re: Java Process consuming more of CPU
The more memory a JAVA process will get, the better. But since JAVA is (in essence) an interpreter, there is a lot of CPU power needed; an extra porcessor (or more) is better.
Jan, I don't think Engineering can have a big hand in enhancing this. The environment must be checked (and approved by the (SUN-based) JAVA council and I do not believe that process-perfoamnce on other platforms than SUN matter much to them. THESE are the guys to be educated, not engineering)
Willem
OpenVMS Developer & System Manager
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-11-2005 01:06 AM
02-11-2005 01:06 AM
Re: Java Process consuming more of CPU
I wonder why the 'Jcoreserver' doing something special on Alpha VMS.
Why it is -cool- at other OS !!!
-Kiran
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-02-2005 12:24 AM
03-02-2005 12:24 AM
Re: Java Process consuming more of CPU
We have done a code change for some of calls made by java native libraries.
Some part of our C code is using stat() call to find the current size of log file.
We have replaced ftell() for stat().
Now I am seeing a good difference in utilization of CPU by 'jniScsi' and 'jniOpen'.
Why stat() is proving costly in Alpha-VMS ?
-Thanks
Kiran
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-02-2005 03:42 AM
03-02-2005 03:42 AM
Re: Java Process consuming more of CPU
Check the many CRTL feature logicals - there may besomething to help
Purely Personal Opinion
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-02-2005 07:33 AM
03-02-2005 07:33 AM
Re: Java Process consuming more of CPU
> $ DEFINE/SYS JAVA$CACHING_INTERVAL 1000
and
>Why stat() is proving costly in Alpha-VMS ?
If you have Java code that calls stat() in a tight loop, the calls to stat() will generate lots of I/Os. (perhaps you're polling the size of the log file to see if it changes?)
The logical name JAVA$CACHING_INTERVAL causes "stat()" info to be cached, thereby reducing the I/O load, BUT it will cause a tight loop to become compute bound (since the stat results are returned immediately from the cache). It also means the repeated calls are pointless because the results are cached, so any changes out on disk will not be detected.
Your value of 1000 means 1000 SECONDS! So code looping on stat waiting for a change will loop for more than 16 MINUTES. That's a lot of wasted CPU.
The correct thing to do is put a delay in your stat() loop so that your program isn't polling the disk. This will reduce both I/O and CPU load. However, if you can't do that, you need to choose a value for the caching interval that balances I/O and CPU. Higher values will increase CPU, lower values will increase I/O. I'd guess a value of 30 would be much better.
I'd also recommend AGAINST defining this as a system wide logical name. Different programs will have different requirements for caching data.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-02-2005 07:42 AM
03-02-2005 07:42 AM
Re: Java Process consuming more of CPU
There was once a time when increasing the memory available to an application was always a good thing for performance.
However, that doesn't always work for Java.
For best performance you need to set the maximum heap size the the *smallest* size that will correctly execute. Since Java doesn't have a "free memory" function, it allocates memory from the heap until it runs out, then performs a garbage collection to recover unused memory. If you set the heap size much larger than necessary, Java will simply leave more junk around. Overall paging is increased, since the application is touching more memory, and the garbage collections will take longer because there's more to be collected. By reducing the heap size, you (potentially) increase the *number* of garbage collections, but *decrease* their duration and keep the application in a smaller working set, so paging is decreased.
This is highly counter intuitive to those of us who grew up in a world where memory was expensive.
You need to carefully measure the peak heap size and set the maximum so that it's just higher than the high water mark.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2005 12:30 AM
03-07-2005 12:30 AM
Re: Java Process consuming more of CPU
You need to carefully measure the peak heap size and set the maximum so that it's just higher than the high water mark.
Sounds interestingly promising.
Forgive my lack of knowledge in this, but HOW do I do that, and HOW do I get the metrics to base my settings upon?
TIA
Proost.
Have one on me.
Jan