Java threads and WinLogon processes taking CPU!

We are seeing a strange problem. We have a multi-threaded java application
that is deployed on a Microsoft Windows 2000 server (SP4) with Citrix
Metaframe XP (Feature release 2). When this application starts, we start to see
multiple WINLOGON.EXE processes (20 plus) each taking up 1-2% of CPU -
this raises the CPU usage on the server significantly, impacting performance.
We have tested with JDK 1.3, 1.4, and 1.5 and see the same issues. If we
run the java application in a single thread, we dont see the same issue.
Has any one seen this problem before? Any suggestion on how this can be resolved?
Thanks in advance!

Thanks for your replies. This is a Citrix environment where there are 50 plus
users logged in and there are 50 plus instances of Winlogon.exe always
running. Most of the time the cpu usage of these processes is 0.
We tried a multi-threaded program that lists files in a directory every few
seconds. There are 40 plus servers in the farm that we are deploying this
application on. We are seeing this problem on only some of the servers.
If we run a single thread from main(), we dont see the issue. But if we spawn
10 threads doing the scans periodically, we notice that as soon as all the threads
start, the WinLogons appear to start to take up CPU. When we stop the java
program, the WinLogon processes drop in CPU usage.
Is it possible that Java and WinLogon share some dlls that could be triggering
the WinLogon processes off?
We have tried running the single thread and multi-threaded programs around
same time and the correlation with the winlogons is clearly visible. If we add
sleep() soon after we start a thread, the winlogons seem to kick in later.

Similar Messages

  • Pause a thread and still process information?

    I've got the following code:
    if(option.equalsIgnoreCase("b"))
    String mapChoice = JOptionPane.showInputDialog("What map would you like to load?");
    mapReader(mapChoice);
    bufferGraphics.clearRect(0,0,800,600);
    printMap(g);
    option = "";
    gameStart = true;
    g.drawImage(offscreen,0,0,this);
    This is an applet and i start a thread in the init() method,
    so when a user selects option "b" the "String mapChoice = JOptionPane.showInputDialog("What map would you like to load?");"
    keeps on reloading and causes lots of screens to appear,
    also making it impossible to add input.
    Is there a way to pause(or sleep) the thread and still get
    the user input from "String mapChoice = JOptionPane.showInputDialog("What map would you like to load?");"
    thanks in advance

    This won't run, but this is about the just of the code, don't know if it will help
    public void init()
    boolean firstRun = false;
    Images();
    play = new Thread(this);
    play.start();
    setSize(40*sizeX,40*sizeY);
    addMouseMotionListener(this);
    addKeyListener( this );
    addMouseListener(this);
    offscreen = createImage(40*sizeX,40*sizeY);
    bufferGraphics = offscreen.getGraphics();
    public void update(Graphics g)
    if(option.equalsIgnoreCase("a"))
    mapReader("homeentrance");
    bufferGraphics.clearRect(0,0,800,600);
    printMap(g);
    option = "";
    gameStart = true;
    g.drawImage(offscreen,0,0,this);
    if(option.equalsIgnoreCase("b"))
    String mapChoice = JOptionPane.showInputDialog("What map would you like to load?");
    mapReader(mapChoice);
    bufferGraphics.clearRect(0,0,800,600);
    printMap(g);
    option = "";
    gameStart = true;
    g.drawImage(offscreen,0,0,this);
    public void keyPressed( KeyEvent e )
    if(gameStart == false)
    option = ""+e.getKeyChar();

  • Question About Java Threads and Blocking

    I'm helping someone rehost a tool from the PC to the Sun. We're using the Netbeans IDE and the Java programming language. I took a Java course several years ago, but need some help with something now. We're developing a front-end GUI using Swing to allow users to select different options to perform their tasks. I have a general question that will apply to all cases where we run an external process from the GUI. We have a "CommandProcessor" class that will call an external process using the "ProcessBuilder" class. I'm including the snippet of code below where this happens. We pass in a string which is the command we want to run. We also instantiate a class called "StreamGobbler" my coworker got off the Internet for redirecting I/O to a message window. I'm also including the "StreamGobbler" class below for reference. Here's the "CommandProcessor" class:
    // Test ProcessBuilder
    public class CommandProcessor {
    public static void Run(String[] cmd) throws Exception {
    System.out.println("inside CommandProcessor.Run function...");
    Process p = new ProcessBuilder(cmd).start();
    StreamGobbler s1 = new StreamGobbler("stdin", p.getInputStream());
    StreamGobbler s2 = new StreamGobbler("stderr", p.getErrorStream());
    s1.start();
    s2.start();
    //p.waitFor();
    System.out.println("Process Returned");
    Here's the "StreamGobbler" class:
    import java.lang.*;
    import java.io.*;
    // Attempt to make the output of the process go to the message window
    // as it is produced rather that waiting for the process to finish
    public class StreamGobbler implements Runnable {
    String name;
    InputStream is;
    Thread thread;
    public StreamGobbler (String name, InputStream is){
    this.name = name;
    this.is = is;
    public void start(){
    thread = new Thread (this);
    thread.start();
    public void run(){
    try{
    InputStreamReader isr = new InputStreamReader(is);
    BufferedReader br = new BufferedReader(isr);
    while (true){
    String s = br.readLine();
    if (s == null) break;
    System.out.println(s);
    //messageWindow.writeToMessageArea("[" + name + "]" + s);
    is.close();
    catch(Exception ex){
    System.out.println("Problem reading stream" + name + "...:" + ex);
    ex.printStackTrace();
    The "CommandProcessor" class calls two (2) instances of the "StreamGobbler" class, one for "stdin" and one for "stderr". My coworker discovered these are the 2 I/O descriptors that are needed for the external command we're running in this case. We're actually called the Concurrent Versions System (cvs) command from the GUI. Here's what we need it to do:
    We want to display the output real-time as the external process is executing, but we want to block any actions being performed on the GUI itself until the process finishes. In other words, we want to show the user any generated output from the process, but don't want to alllow them to perform any other actions on the GUI until this process has finished. If we use the "waitFor()" function associated with a process, it blocks all external process output until the process has completed and then spews all the output to the screen all at once. That's NOT what we want. Also, if we don't use the "waitFor()" function, the code just continues on as it should, but we don't know how to block any actions on the GUI until this process has finished. My coworker tried the following code, but it also blocked any output until the process had finished:
    while (s1.thread.isAlive() || s2.thread.isAlive())
    // We really don't do anything here
    I'm pretty sure we have to use threads for the output, but how do we instantly show all output and block any GUI actions?
    Thank you in advance for your help!

    You're talking about a GUI, but there's nothing in that code which is putting events into the GUI update thread. You also say that nothing happens to the GUI until the CommandProcessor.Run() method returns if you wait for the process.
    This implies that you're calling CommandProcessor.Run() in an ActionListener. This will block the GUI thread until it completes.
    I was going to explain what to do, but a quick Google informed me that there's a new class which is designed to help in these situations SwingWorker (or as a [separate library|https://swingworker.dev.java.net/] if you're not up-to-date yet).

  • High number of threads and high CPU usage on a single instance

    Without any apparent reason, in some moments of day the website reports an increment of the HTTP Queue Length from an average of 10/20 queued requests to 100/200 and more.
    In that period of time the Average Response Time increases but the number of the requests on the website don't. Even increasing the instances it doesn't help to resolve the problem (maybe it just reduced it).
    It seems that the problem is not related to the traffic on the site. This issue happens either when the traffic is high or low.
    The autoscaling works well, we don't have peak of traffic but always a slow increasing of requests and the CPU is always below the 50% (memory too). The issue is resolved by the swap of the site and sometimes it's resolve by itself after a while.
    What I discovered when the issue happens, is that there's an instance (just an instance only), that has an high number of threads and CPU usage on the W3WP.exe process and these values are above the mean than the other instances. Eg, instances are around
    50/60 threads and 10/20% of CPU, the instance with the problem has 200 threads and 50/60% of CPU. If I kill the W3WP process on that instance the issue is resolved. 
    I monitored the HTTP requests, I tried the website extension "Diagnostics as service" but I can't discover anything that can help me to understand the problem. Of course, there are many requests that go in timeout but it is a consequences of a
    unresponsive instance.
    On the web hosting plan there are only two sites: the production site and its staging which is used for update of the production only and it's always sleeping. Plus, no webjobs are running on this site.
    What can I do to gather useful information that can help me to understand the reason of this problem?
    Thank you!

    "Does the instance with the high counts receive more traffic than the other instances? Is it possible that the load balancer not
    working the way it should be?"
    How can I get that information? I can't see metrics for a specific instance
    "Does it always happen to the first instance?"
    I will check it better, but in the order given by the Processes panel it's the second instance which has the issue. The scaling is at 2 instances for the most part of the time (it's the minimum).
    Maybe one time it was the 3th instance but I'm not sure, I'll give it more attention.
    " How long do these moment last?"
    The time can be 10 to 30 minutes, but I fix it as soon as I see the problem. It's not the down-scaling to resolve it because in these situations the CPU as well is high so the scaling holds or increases the number of instances.
    "- How often do these moments occurs?"
    It occurs quite often, 2/4 times a week.

  • Multiple java threads in a JVM created by the invocation interface

    Hi,
    I have a certain application APP that calls functions of a C library. One of these functions creates a JVM through the invocation interface. In the JVM I create some other threads and a Swing GUI. From the java "main" thread as well as the other threads (including the Swing event dispatcher thread) I need to call dll functions through native java methods. The latter indirectly (through another dll) invoke functions of an API of application APP.
    I have problems when making calls from the java threads to the java native library. In some cases everything works well i.e., I'm able to make calls to the java native library from both the "main" java thread and the other threads. In other cases a crash occurs when attempting to access the native library from any threads but the "main" thread.
    Can anyone help me on this? Is there any requirement that only the main java thread makes callbacks to C code?
    Thanks.

    > why later sets of java application is taking longer?
    Probably because of CPU usage.  But could be memory.
    >Can I do something here so that later sets of apps also completes in 3 mins
    You tune the task, the complete task, to the box.  That means you must understand in detail what is taking time and then architect that to make the best use of the available CPUs and memory (and other resources as used by the task.)

  • Java thread not working in windows 7

    I have a Java app that runs just fine on Windows XP. However, on Windows 7 there is a problem related to a job being done via a Java thread.
    Background: The app spawns a separate job via a Java thread and continues on while the spawned job executes. In other words, 2 things happen at once.
    Problem: On Windows 7, when the app spawns the job, Windows sits and waits for the spawned job to complete before it continues on. In other words, 2 things DO NOT happen at once.
    It's as if Java threading does not work in Windows 7. Any input would be greatly appreciated. Thanks.

    l_sleven wrote:
    Thanks for the input, guys. From now on I'll be sure to include a SSCCE.
    I'm beginning to believe this is actually my ignorance of threading in SWT, and XP was more forgiving than 7.
    I would include a SSCCE, but of the 4 different ways I tried to get this to work I wouldn't know which to include since all failed to fix the problem.
    If you want to identify a link to a web page identifying 'best practices' for SWT threading, that would be great. Be aware though that there's a good chance I've already googled the page.
    A programmer smarter than me once said, "The road to best practices is a bumpy ride".[Concurrency in Swing|http://download.oracle.com/javase/tutorial/uiswing/concurrency/index.html]

  • How to use Java threads in ColdFusion

    Hello Everybody,
    I have a question in concerns to threads. We all know that in
    CF8 we have this fantastic tag called <cfthread> which give
    us the ability to create assyncronous code, however, I was
    concerned about earlier versions of ColdFusion, like CF7 and CF
    6.1.
    How can I create a Java thread and use it in my CF code?
    Please, any help is much appreciated. Thanks in advance.
    Alvaro Costa
    Systems Analyst
    [email protected]

    A bean is obtain by <jsp:useBean> tag nd once bean is obtained we can get its property by using getProperty tag.

  • Java threads consume CPU in sleep state (??)

    Hi,
    I'm using the PRSTAT command on Solaris for the first time.
    I am investigating high CPU usage problem in my application. So to monitor the CPU usage I used the prstat and mpstat command. My machine is a 2-CPU box.
    The prstat -L -p <pid> command output is as follows:
    PID     UNAME  ... ....  STATE           CPU      PROCESS / LWPID
    2962   bea                   run           7.6%           java / 5
    2962   bea                   run           5.6%           java / 38
    2962   bea                   run           5.6%           java / 22
    2962   bea                   sleep         5.5%           java / 21
    2962   bea                   sleep         5.4%           java / 36
    2962   bea                   cpu2          5.2%           java / 23
    2962   bea                   sleep         5.1%           java / 29
    2962   bea                   run           5.1%           java / 37
    2962   bea                   sleep         4.9%           java / 34
    2962   bea                   run           4.9%           java / 15
    2962   bea                   run           1.1%           java / 12
    2962   bea                   sleep         1.0%          java / 33
    2962   bea                   run           0.6%           java / 14
    2962   bea                   run           0.0%           java / 17
    ..... This shows that of all the threads in my app only one thread(23) is currently on the CPU and is using 5.2% of CPU. But why are the threads in sleep and runnable state consuming CPU?
    Also the mpstat output shows high CPU usage:
    CPU minf mjf xcal  intr ithr  csw icsw migr smtx  srw syscl  usr sys  wt idl
      0   8   0  366  428   61   994   387  40   70     0 10941  95   4    0    1
      2   3   0  370  1003  563 1362  648   42   61    0  5374    92   2   0    6If my application is taking only ~57% according to sum of values from prstat, why is my mpstat showing 95% and 92% usage on EACH of my CPUs...??
    I'm unable to interpret the result.
    Any help would be really useful to me at this moment.
    .

    Hi,
    Your question should be posted in a unix forum instead of a java forum. The question, and the answer is not related to java.
    The reason that prstat shows processes in sleaping state is that it doesn't create a snaphost at one point in time. It does instead show an average over some time (don't know the period), so the process has been running and consumed cpu, or is generally running, but currently sleeping.
    Kaj

  • Server Process taking all CPU time intermittently on Solaris

    Hi,
    What does my program do :-
    We have been facing this problem from many days, We have a server
    process which is continuously listening at a port on Solaris 5.8.
    Whenever a request is sent to this server a new thread & a socket is created for that client.
    This process is running as a proxy server, which connects to some other machine on client request.
    Problem:
    The process start taking whole CPU after few days, happens in a weeks
    period. The process remain in this state for few hours & after that it
    stops responding to any requests.
    & the only thing which can be done, to make it work is to restart the
    process.
    If someone has faced a similar problem then please let me know if you
    have found a solution for that.
    I will give 10 duke dollars to you if you can provide a solution for this problem.
    Regards,
    Sachin

    Here is another class which is used in my code:
    package com.ge.med.service.olea.telnetapplet.proxy;
    import java.io.*;
    import java.net.*;
    import java.util.*;
    * This class is a generic framework for a flexible, multi-threaded server.
    * It listens on any number of specified ports, and, when it receives a
    * connection on a port, passes input and output streams to a specified Service
    * object which provides the actual service. It can limit the number of
    * concurrent connections, and logs activity to a specified stream.
    public class Server {
    // This is the state for the server
    ConnectionManager connectionManager; // The ConnectionManager object
    Hashtable services; // The current services and their ports
    ThreadGroup threadGroup; // The threadgroup for all our threads
    PrintWriter logStream; // Where we send our logging output to
    * This is the Server() constructor. It must be passed a stream
    * to send log output to (may be null), and the limit on the number of
    * concurrent connections. It creates and starts a ConnectionManager
    * thread which enforces this limit on connections.
    public Server(OutputStream logStream, int maxConnections) {
    setLogStream(logStream);
    log("Starting server");
    threadGroup = new ThreadGroup("Server");
    connectionManager = new ConnectionManager(threadGroup, maxConnections);
    connectionManager.start();
    services = new Hashtable();
    * A public method to set the current logging stream. Pass null
    * to turn logging off
    public void setLogStream(OutputStream out) {
    if (out != null) logStream = new PrintWriter(new OutputStreamWriter(out));
    else logStream = null;
    /** Write the specified string to the log */
    protected synchronized void log(String s) {
    if (logStream != null) {
    logStream.println("[" + new Date() + "] " + s);
    logStream.flush();
    /** Write the specified object to the log */
    protected void log(Object o) { log(o.toString()); }
    * This method makes the server start providing a new service.
    * It runs the specified Service object on the specified port.
    public void addService(Service service, int port) throws IOException {
    Integer key = new Integer(port); // the hashtable key
    // Check whether a service is already on that port
    if (services.get(key) != null)
    throw new IllegalArgumentException("Port " + port + " already in use.");
    // Create a Listener object to listen for connections on the port
    Listener listener = new Listener(threadGroup, port, service);
    // Store it in the hashtable
    services.put(key, listener);
    // Log it
    log("Starting service " + service.getClass().getName() +
    " on port " + port);
    // Start the listener running.
    listener.start();
    * This method makes the server stop providing a service on a port.
    * It does not terminate any pending connections to that service, merely
    * causes the server to stop accepting new connections
    public void removeService(int port) {
    Integer key = new Integer(port); // hashtable key
    // Look up the Listener object for the port in the hashtable of services
    final Listener listener = (Listener) services.get(key);
    if (listener == null) return;
    // Ask the listener to stop
    listener.pleaseStop();
    // Remove it from the hashtable
    services.remove(key);
    // And log it.
    log("Stopping service " + listener.service.getClass().getName() +
    " on port " + port);
    * This nested class manages client connections for the server.
    * It maintains a list of current connections and enforces the
    * maximum connection limit. It creates a separate thread (one per
    * server) that sits around and wait()s to be notify()'d that a connection
    * has terminated. When this happens, it updates the list of connections.
    public class ConnectionManager extends Thread {
    int maxConnections; // The maximum number of allowed connections
    Vector connections; // The current list of connections
    * Create a ConnectionManager in the specified thread group to enforce
    * the specified maximum connection limit. Make it a daemon thread so
    * the interpreter won't wait around for it to exit.
    public ConnectionManager(ThreadGroup group, int maxConnections) {
    super(group, "ConnectionManager");
    this.setDaemon(true);
    this.maxConnections = maxConnections;
    connections = new Vector(maxConnections);
    log("Starting connection manager. Max connections: " + maxConnections);
    * This is the method that Listener objects call when they accept a
    * connection from a client. It either creates a Connection object
    * for the connection and adds it to the list of current connections,
    * or, if the limit on connections has been reached, it closes the
    * connection.
    synchronized void addConnection(Socket s, Service service) {
    // If the connection limit has been reached
    if (connections.size() >= maxConnections) {
    try {
    PrintWriter out = new PrintWriter(s.getOutputStream());
    // Then tell the client it is being rejected.
    out.println("Connection refused; " +
    "server has reached maximum number of clients.");
    out.flush();
    // And close the connection to the rejected client.
    s.close();
    // And log it, of course
    log("Connection refused to " + s.getInetAddress().getHostAddress() +
    ":" + s.getPort() + ": max connections reached.");
    } catch (IOException e) {log(e);}
    else {  // Otherwise, if the limit has not been reached
    // Create a Connection thread to handle this connection
    Connection c = new Connection(s, service);
    // Add it to the list of current connections
    connections.addElement(c);
    // Log this new connection
    log("Connected to " + s.getInetAddress().getHostAddress() +
    ":" + s.getPort() + " on port " + s.getLocalPort() +
    " for service " + service.getClass().getName());
    // And start the Connection thread running to provide the service
    c.start();
    * A Connection object calls this method just before it exits.
    * This method uses notify() to tell the ConnectionManager thread
    * to wake up and delete the thread that has exited.
    public synchronized void endConnection() { this.notify(); }
    /** Change the current connection limit */
    public synchronized void setMaxConnections(int max) { maxConnections=max; }
    * Output the current list of connections to the specified stream.
    * This method is used by the Control service defined below.
    public synchronized void printConnections(PrintWriter out) {
    for(int i = 0; i < connections.size(); i++) {
    Connection c = (Connection)connections.elementAt(i);
    out.println("CONNECTED TO " +
    c.client.getInetAddress().getHostAddress() + ":" +
    c.client.getPort() + " ON PORT " + c.client.getLocalPort()+
    " FOR SERVICE " + c.service.getClass().getName());
    * The ConnectionManager is a thread, and this is the body of that
    * thread. While the ConnectionManager methods above are called by other
    * threads, this method is run in its own thread. The job of this thread
    * is to keep the list of connections up to date by removing connections
    * that are no longer alive. It uses wait() to block until notify()'d by
    * the endConnection() method.
    public void run() {
    while(true) {  // infinite loop
    // Check through the list of connections, removing dead ones
    for(int i = 0; i < connections.size(); i++) {
    Connection c = (Connection)connections.elementAt(i);
    if (c != null && !c.isAlive()) {
    connections.removeElementAt(i);
                   try      {
                        //close server socket. SPR SVCge16539. Sachin Joshi.
                        Socket server = ProxyServer.Proxy.getServerSocket(c.client);                    
                        if (server != null)
                             server.close();
                        //close client socket.
                        if (c.client != null)
                             c.client.close();                    
                   catch (java.io.IOException e)     {
                        System.err.println("Error closing connection " + e);
                   catch (Exception e)     {
                        System.err.println("Cannot Establish Connection !! " + e);
    log("Connection to " + c.client.getInetAddress().getHostAddress() +
    ":" + c.client.getPort() + " closed.");
              System.out.println("Total Connections now = " + connections.size());
    // Now wait to be notify()'d that a connection has exited
    // When we wake up we'll check the list of connections again.
    try { synchronized(this) { this.wait(); } }
    catch(InterruptedException e) {}
    * This class is a subclass of Thread that handles an individual connection
    * between a client and a Service provided by this server. Because each
    * such connection has a thread of its own, each Service can have multiple
    * connections pending at once. Despite all the other threads in use, this
    * is the key feature that makes this a multi-threaded server implementation.
    public class Connection extends Thread {
    Socket client; // The socket to talk to the client through
    Service service; // The service being provided to that client
    * This constructor just saves some state and calls the superclass
    * constructor to create a thread to handle the connection. Connection
    * objects are created by Listener threads. These threads are part of
    * the server's ThreadGroup, so all Connection threads are part of that
    * group, too.
    public Connection(Socket client, Service service) {
    super("Server.Connection:" + client.getInetAddress().getHostAddress() +
    ":" + client.getPort());
    this.client = client;
    this.service = service;
    * This is the body of each and every Connection thread.
    * All it does is pass the client input and output streams to the
    * serve() method of the specified Service object. That method
    * is responsible for reading from and writing to those streams to
    * provide the actual service. Recall that the Service object has been
    * passed from the Server.addService() method to a Listener object
    * to the ConnectionManager.addConnection() to this Connection object,
    * and is now finally getting used to provide the service.
    * Note that just before this thread exits it calls the
    * ConnectionManager.endConnection() method to wake up the
    * ConnectionManager thread so that it can remove this Connection
    * from its list of active connections.
    public void run() {
    try {
    InputStream in = client.getInputStream();
    OutputStream out = client.getOutputStream();
    // service.serve(in, out);
    ((ProxyServer.Proxy)service).serve(in, out,client);
    catch (IOException e) {log(e);}
    finally { connectionManager.endConnection(); }
    * Here is the Service interface that we have seen so much of.
    * It defines only a single method which is invoked to provide the service.
    * serve() will be passed an input stream and an output stream to the client.
    * It should do whatever it wants with them, and should close them before
    * returning.
    * All connections through the same port to this service share a single
    * Service object. Thus, any state local to an individual connection must
    * be stored in local variables within the serve() method. State that should
    * be global to all connections on the same port should be stored in
    * instance variables of the Service class. If the same Service is running
    * on more than one port, there will typically be different Service instances
    * for each port. Data that should be global to all connections on any port
    * should be stored in static variables.
    * Note that implementations of this interface must have a no-argument
    * constructor if they are to be dynamically instantiated by the main()
    * method of the Server class.
    public interface Service {
    public void serve(InputStream in, OutputStream out) throws IOException;     
         }

  • Java thread with high CPU usage

    Hi,
    Running prstat -L -p pid on Solaris produces a list of lwp threads running in that process that are consuming the most CPU. Out of about 7 threads that were associated with kernel threads in pstack output, only 5 of them were mapped to a JVM thread dump. How is it possible to have a Java thread consuming CPU that doesn't show up in a thread dump?
    Thanks,
    J.S.

    And, any idea what this thread is doing?
    Here's pstack output for this missing thread 12:
    ----------------- lwp# 18 / thread# 12 --------------------
    fe0e48b4 __1cHCompileSflatten_alias_type6kMpknHTypePtr__3_ (b6001780, 100360, fe4c8000, b6001780, 100360, 0) + 4d8
    fe0f42ac __1cHCompilePget_alias_index6kMpknHTypePtr__I_ (b6001780, 100360, b6001264, 7e2bb8, 41f4, 7e2bb8) + 8
    fe11131c __1cJStoreNodeFIdeal6MpnIPhaseGVN_pnLPhaseDefUse__pnENode__ (0, 7dd5b4, 5035ec, 7e2bb8, b6001144, b6001264) + 128
    fe0c1224 __1cMPhaseIterGVNNtransform_old6MpnENode__2_ (0, b6001144, 7e2bb8, b6001264, 7e2bb8, b600116c) + 47c
    fe17349c __1cMPhaseIterGVNIoptimize6M_v_ (24, 0, a37700, b6001110, b6001100, 3442f0) + b4
    fe1943b0 __1cOPhaseIdealLoop2t6MrnMPhaseIterGVN_pk0_v_ (b6000ee8, a3772c, 1, 4ff37c, 2000, 269568) + 7cc
    fe1cc89c __1cHCompileIOptimize6M_v_ (b6001780, b60015b8, b6001780, b60015dc, 0, b60013dc) + a0
    fe1cb69c __1cHCompile2t6MpnFciEnv_pnHciScope_pnIciMethod_ill_v_ (91f504, b6001800, db8a24, fe5296b4, b60018a0, b60018b0) + 7bc
    fe1c73f8 __1cKC2CompilerOcompile_method6MpnFciEnv_pnHciScope_pnIciMethod_il_v_ (27b18, b6001af8, db8a24, db8938, ffffffff, 1) + 70
    fe1c79fc __1cNCompileBrokerZinvoke_compiler_on_method6FpnLCompileTask__v_ (db8938, db8a24, fe4eacec, 0, 0, 8d9) + 40c
    fe280964 __1cNCompileBrokerUcompiler_thread_loop6F_v_ (28758, 13a570, fe4c8000, b6001d10, fe4c8000, ffffffff) + 168
    fe216200 __1cKJavaThreadDrun6M_v_ (b5e02000, fe4d3e34, fe4c8000, 1ffd70, 13a570, 1ffd70) + 3d8
    fe213ec8 _start   (fe4c8000, ff325d10, 0, 5, 1, fe401000) + 20
    ff36b734 threadstart (13a570, 0, 0, 0, 0, 0) + 40

  • Java process - high CPU usage

    Hi,
    I'm describing a high CPU scenario which gets triggered randomly ( I'm not able to replicate it on my lab setup).
    There are around 120 threads which are running in my java process. The jvm is running on a high traffic (through put) site, where there are a lot of async events coming to the java process.( around 220 events per 60 seconds ). The java process works fine in this scenario, the normal CPU consumption hovers around 1.5 % to 2.0 %.
    But, at times, I've seen CPU to be as high as 43 %, and it stays at that value for hours altogther. In those situations, I usually do a failover to standby java process. I tried debugging the issue to see which java thread could be causing the issue, but, I could not come to a conclusion or replicate the situation in lab environment.
    Here are the details of the execution environment
    java -version
    java version "1.4.2_11"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_11-b06)
    Java HotSpot(TM) Client VM (build 1.4.2_11-b06, mixed mode)
    prstat during high CPU
    PID USERNAME THR PRI NICE SIZE RES STATE TIME CPU COMMAND
    10485 root 120 10 0 570M 381M cpu1 268:10 43.64% java
    prstat -Lm -p output
    PID USERNAME USR SYS TRP TFL DFL LCK SLP LAT VCX ICX SCL SIG PROCESS/LWPID
    10485 root 53 0.5 0.2 0.0 0.0 30 0.2 16 69 1K 118 0 java/2
    10485 root 31 0.0 0.1 0.0 0.0 53 0.2 16 23 778 93 0 java/26
    10485 root 0.4 0.0 0.0 0.0 0.0 99 0.0 0.1 10 16 106 0 java/12
    10485 root 0.1 0.0 0.0 0.0 0.0 100 0.0 0.0 3 2 7 0 java/15
    10485 root 0.1 0.0 0.0 0.0 0.0 97 0.0 2.4 120 3 128 0 java/41
    10485 root 0.1 0.0 0.0 0.0 0.0 97 0.0 2.5 120 4 131 0 java/410
    Some more points about the last prstat -Lm output.
    java/2 is "VM Thread" ( responsible for GC). "VM Thread" is having a NORMAL priority ( 5 )
    java/26 is a "Worker" thread, with priority MINIMUM ( 1 ).
    Could you suggest what could be issue, and what other information I could collect to find out the issue. Its difficult to profile the process because the problem scenario is difficult to ascertain and the process is running on a production setup.
    Any help is appreciated.
    Thanks
    Sanjay

    Hi,
    Thanks for your response. Both, the production setup and lab setup have have 2 physical CPUs.
    Actually, there are two java threads ( machine is solaris 10) one is "VM Thread" and other is my applications worker thread. (there are 10 of them with priority 1). If you look at the top two lwps in the prstat -Lm , both are showing high value of ICX.
    I'm still not able to drill down to my code level. (Worker thread is waiting on a queue to de-queue server request). Could you give some hint to move foward?
    rgds
    Sanjay

  • How to create parent and chile process in java

    i'm beginning in java, and i want to ask something, please help me...
    1. i want to ask how to create parent and child process in java???
    example :
    if have one window and explore menu, when i click the explore menu.
    new window come out.
    how if i close the parent window the child window will close too...
    2. what is the method from runtime class to get available memory and Active Threads count

    ONE way to do what you wanted is this.
    class Parent{
    Child c = new Child
    allChildren.add(c);
    //if close
    iterate through list
    (Child)allChildren.get(index).close();
    ArrayList allChildren;
    class Child{
    public void close(){ }
    i dont know if you can get the thread count. but you can
    get the current thread by using System.
    Memory: Runtime.freeMemory() .maxMemory() .totalMemory()
    http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Runtime.html
    Careful though you have to do a calculation to get the
    actual memory because those 3 methods refer to freeMemory
    of the CURRENT heap not the total memory.
    i think its: total - (max - free)

  • SMON process taking more CPU approx.49% of total CPU

    Hi,
    we have one isuue with one of our production database.
    database version 10.2.0.4
    OS Version AIX 5.3
    DB SIZE=450Gb
    when i check in database one delete Query is running in database is as follows and smon process of that perticular database consuming about 49%CPU.
    delete from smon_scn_time where thread=0 and scn = (select min(scn) from smon_scn_time where thread=0)
    please help me to resolved this issue.
    Thanks.

    SMON   and unaccessible   SMON_SCN_TIME table
    Please check the mentioned MOS doc in first place.

  • How to assigne Java thread to a specific cpu core

    Hello everyone,
    I want to ask a complicated question. How can I assign Java threads to specific core in a multi-threaded application. The underlyinsg OS can be Linux or Windows. Is there any option provided in JVM can do it?
    If I want to fork a process using C, how can I mix the Java and C together.
    I am looking forward your suggestions.
    Thank you.

    yang2007 wrote:
    Can I fork several Java processes using C and letting each Java process run on a core? These would be questions for a C forum, or one for the OS on which you wish to run this.
    The benefit may be to reduce the interference.You're assuming that you are smarter at thread scheduling than the algorithms written, tested, and honed over decades by people whose job is specifically that.

  • Difference between Thread and Process

    Hi!
    I was googling about this subject, and I found this old thread on google: http://forum.java.sun.com/thread.jspa?threadID=580508&messageID=2939031
    My specific doubt is: can one thread inside in a process affect other thread inside in other process?
    But, actually, the terms thread and process are not clear for me yet. I don't know what is the exact difference yet.

    > If I start a JVM, and Microsoft Word, and a web
    browser, that's three processes. A process is an
    OS-level construct.
    Threads refer to concurrent execution paths withina
    given process. Just like multiple processes canrun
    in parallel within the OS, so can multiple threads
    run in parallel within a process.
    That's exactly what I understood. So, I suppose that
    a thread in a process cannot affect other thread in
    other process, can it?Not at the Java language level.
    I mean, the wait( ), notify(
    ), etc, methods do not make sense if you consider
    threads of different process, right?Right. Those are just methods that you call on objects. The same rules apply to them as to other methods. Now, with RMI, it might be possible to call wait(), etc. on a remote object. I've never use RMI, but I don't think that actually works. If it does, I expect it would be in an RMI tutorial.
    Indeed, very confusing. They could facilitate,
    defining a clear distinction between thread and
    process.Well, there is a distinction in their "interface," if you will. It's just that their implementations can overlap.
    Kind of like how a List and a Set are different, but you could implement a Set by composing it with a List.

Maybe you are looking for

  • Mainstage crashes every time I try to open it!

    Today when I opened (tried to at least) Mainstage, it crashed. This is (unfortunally) not too unusual, but the problem now is that no matter what I try, IT WILL NOT OPEN! I've restarted the MBP several times, and everytime, it crashes. Been trying fo

  • Can't share files with Macbook Air L 10.5.2 with windows XP

    Just brought new macbook Air. Main fault so far is that depsite seeing shared files in finder the error massages: 'unable to find original item' or file cannot be mounted occur. i also can only connect as 'guest' worst still on some attempts to conne

  • Save Work to File

    All, I have an application where students work on a graph drawing directly in Flash. They draw the graph with the mouse and I capture it and display it using Flash drawing API. I would like to save that drawing (either as data or as a graphic) to a f

  • BAPI_DOCUMENT_CHANGE2 - Characteristic Number of User-Defined Data Type

    We are using classifications in the DMS system (it is the same classification system as the sales order and a few other transaction types). We also have defined our own characteristic data types.  If we manually go into CV01n and enter in values into

  • Taken 2 has been deleted from my iTunes purchase history, has it for anyone else?

    Just went to watch it on my Apple TV and it's been deleted from my purchase history, has this happened to anyone else?