Mailing List
Home
Forum Home
Linux - General Red Hat Linux discussion list
Installation - Getting started with Red Hat Linux
Enterprise Linux 3 - Discussion of Red Hat Enterprise Linux 3 (Taroon)
Red Hat Linux 9 - Discussion of Red Hat Linux 9 (Shrike)
Red Hat Linux 7.2 - Discussion of Red Hat Linux 7.2 (Enigma)
Red Hat Linux 7.3 - Discussion of Red Hat Linux 7.3 (Valhalla)
Apache Web Server
Oracle database, Microsoft SQL server ...
Subjects
application/x mplayer2 plugin
RPM error: db4 error(16) from dbenv >remove: Device or resource
   busy
Command stream end of file while reading
X Windows problem (xauth)
Upgrading openoffice 1 1 rpm
FTP: connection refused
FTP: connection refused
mount: /dev/cdrom: is not a valid block device
Dell Precision 650, RedHat 9, no sound
how to trace the cause resulting in the crash of bind server
Virus on the list
UNINSTALL RPM MYSQL
usb pen drives: mounting as a user
broadcom network interface
make mrproper
Couldn 't open PID file /var/run/named/named pid Permission denied
sendmail configuration on redhat
kernel 2 6 and /dev/sound/mixer not found
Promise 378 controller
Problem using up2date
mrtg step by step howto/configuration for a newbie?
Compiling and Installing Kernel 2 6
Can 't locate module ppp0, can 't locate module ppp compress 21
Lotus Notes under Wine
HOW I CAN MAKE BOOTABLE FLOPPY DISKET
/etc/security/limits conf question
Intel E/1000 driver
rpm database corrupt
Command stream end of file while reading
qla2300 modules
 
-none-

-none-

2007-10-09       - By Nilesh

 Back
I am using jboss 4.2, java5.0 and RedHat Linux
Enterprise Version 4.0 with kernel 2.6 and NPTL 2.3.4

I am using open source network chart generation API
provided by geosoft ( http://geosoft.no/graphics/).
This API generates chart into swing window.



I wrote the code to change this swing window into web
browser compatible jpeg image. I used thread to
generate the image. It is working fine, for one user
and no other processes running on the application.



ISSUE:-

When more than 5 users hit the application at the same
time, some images get generated, some donot, there is
no fixed trend to this image generation process.  I
analyzed CPU timing, it is using 100% CPU and after
the images are generated / not generated,  the CU
usage goes down to zero.



When I used the same code with Linux 9.0 (kernel 2.4,
NPTL ? 0.6), rest remain the same, it is working
perfectly fine with more than 10 users, with all
images being generated, only that it is a lil slower.



Can somebody help me out to figure out whether it is a
kernel issue / NPTL issue? Does it have something to
do with thread processing?



Code for network chart generation :-



NetworkGenerator ntw=new NetworkGenerator();

       BufferedImage img;

       ntw.setVectRootNodes(vectRootNodes);

       ntw.setHashChildNodeNames(hashNodeData);

       ntw.setHashNodeRelation(hashNodeRelation);

       ntw.setHashNodesCreated(hashNodesCreated);

       ntw.setSupplyChainBean(supplyChainBean);

       Thread t=new Thread(ntw);        

       t.setPriority(Thread.MAX_PRIORITY);

       t.start();

       

       try{

           t.join();

       }

       catch(Exception e)

       {

         
DebugManager.doDebug(className.toString(),e);

       }

       if(t!=null)

       {

           System.out.println(t.getState().name());

           System.out.println(t.isAlive());

       }



public class NetworkGenerator extends JFrame
implements Runnable{

 public void run()

   {

       //call the garbage collector

       System.gc();

       // Create the graphic canvas



       window = new no.geosoft.cc.graphics.GWindow();

     
window.getCanvas().setSize(screenWidth,screenHt );



       // Create the GUI

       JPanel topLevel = new JPanel();

       topLevel.setBackground(new Color(255,255,255))
;

       topLevel.setLayout (new BorderLayout());

       getContentPane().add (topLevel);

       topLevel.add (window.getCanvas(),
BorderLayout.CENTER);

       topLevel.setVisible(true);

       // Create scene with default viewport



       scene = new
no.geosoft.cc.graphics.GScene(window, "My Scene"+ (new
Date().getTime()));

       no.geosoft.cc.graphics.GStyle style = new
no.geosoft.cc.graphics.GStyle();

       style.setForegroundColor (new Color (0, 0,
0));

       style.setBackgroundColor (new Color (255, 255,
255));

      style.setFont (new Font ("Arial", Font.BOLD,
10));

       scene.setStyle (style);

       int xPos=minY ;

       int yPos=0;

       int noofChild=vectRootNodes.size();

       int dev=(screenHt -minY )/(noofChild+1);

       int newDev=Math.round(dev-(dev/5));

     
//log.debug("-- ------noofChild-- ---- ---- ---- ---- ---- ---- --"+noofChild);

       if(!hashNodesCreated.isEmpty())

       {

           for(int i=0;i<noofChild;i++)

           {

               yPos=minY +(dev*(i+1));

               String nodeName =
vectRootNodes.get(i).toString();

               log.debug("root
nodename===="+nodeName+" with ypos :"+yPos);

               //log.debug("nodeName=="+nodeName);

               //create root nodes

               Node rootNode = createChildNode(
nodeName,minY,screenHt,xPos, yPos ,newDev,1);

               scene.add(rootNode);

           }

       }

       log.debug("screenWidth ===="+screenWidth );

//        if(screenWidth>minExtXval)

//            minExtXval = screenWidth;



//                 w2 o

//        *           |

//        *           |

//        *           |

//        *        w0 o-- ----o w1

       double w0[] = {0.0,screenHt ,0.0};

       double w1[] = {screenWidth,screenHt,0.0};

       double w2[] = {0.0,0.0,0.0};

       scene.setWorldExtent (w0, w1, w2);

       this.pack();

     





   }

}




     
__ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ______
__ __
Boardwalk for $500? In 2007? Ha! Play Monopoly Here and Now (it's updated for
today's economy) at Yahoo! Games.
http://get.games.yahoo.com/proddesc?gamekey=monopolyherenow  

--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@(protected)?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list