Reduce number of running thread under Linux

Hello,
How can reduce the number of running thread for coldfusion MX
7.0.2 server under Linux (they are almost 30; )

If you create a pool of any sort you will need a point where all requests for a resource from the pool must go via, and that piece of code could potentially become a bottle neck. But if you develop it well there will be a very small piece of code that is sychrnonized that will either put a request in a queue as there are no resources available, or it will provide the requested resource. As far as i am aware there is no safe way around this as you will have multiple threads requesting the resource.

Similar Messages

  • How to control the number of running thread

    I need to maintain the number of running thread in the system or in a threadgroup, as too many running thread will make the system throughput drop tremendously because of the context swtich and memory problem. The threadgroup is not a solution as its active count is the number of the threads that are alive, it includes the thread being blocked as well. I don't know whether there is any way to control it without the use of an expensive monitor?
    Thanks for any help

    If you create a pool of any sort you will need a point where all requests for a resource from the pool must go via, and that piece of code could potentially become a bottle neck. But if you develop it well there will be a very small piece of code that is sychrnonized that will either put a request in a queue as there are no resources available, or it will provide the requested resource. As far as i am aware there is no safe way around this as you will have multiple threads requesting the resource.

  • Number of nfsd threads under Solaris 10

    In solaris 9 it was possible to get the Number of max. NFS Servers (threads) currently running with this command:
    echo "$<svcpool_list" | adb -k
    This does not work with Solaris 10. How can I get this information from the kernel?

    In 10.3 usually work managers are used for this purpose. (http://download.oracle.com/docs/cd/E12840_01/wls/docs103/upgrade/compat.html#wp1117123)
    You can use the 8.1 thread pool if you want (http://download.oracle.com/docs/cd/E12840_01/wls/docs103/perform/appb_queues.html#use81)
    but generally work managers are the preferred way: http://download.oracle.com/docs/cd/E12840_01/wls/docs103/config_wls/self_tuned.html
    Coming back to your original question:
    "I was trying to increase the Min number of executable threads using the following startup argument "set USER_MEM_ARGS=-Dweblogic.threadpool.MinPoolSize=30" in startWeblogic.cmd. But doing so haven't increased the "execute thread total count" to the desired number when I verified it in console."
    Can you add the option in the setDomainEnv file, located in the ${DOMAIN_HOME}/bin directory, for example,
    @REM *************************************************************************
    set WL_HOME=C:\bea\wlserver_10.3
    for %%i in ("%WL_HOME%") do set WL_HOME=%%~fsi
    set BEA_JAVA_HOME=C:\bea\jrockit_160_24_D1.1.2-4
    set USER_MEM_ARGS=-jrockit -Xms512m -Xmx512m -Xgc:throughput -Dweblogic.threadpool.MinPoolSize=100
    set SUN_JAVA_HOME=To check if it indeed shows the number of threads you can follow the steps presented here: http://m-button.blogspot.com/2009/02/tuning-default-workmanager-on-weblogic.html

  • Can't run eclipse under Linux OS

    When I run eclipse_linux_gtk 3.1 under Linux ( kernel 2.6.7, gnome 2.8, sun jdk 1.5.0), I got the following error message.
    What is wrong with it?How should I do to make it work?
    !SESSION Oct 11, 2004 00:36:59.306 ---------------------------------------------
    eclipse.buildId=M200409161125
    java.version=1.5.0
    java.vendor=Sun Microsystems Inc.
    BootLoader constants: OS=linux, ARCH=x86, WS=gtk, NL=en_US
    !ENTRY org.eclipse.osgi Oct 11, 2004 00:36:59.334
    !MESSAGE Startup error
    !STACK 1
    java.lang.RuntimeException: Exception while creating System Bundle: Unable to find system bundle manifest file.
    at org.eclipse.osgi.framework.internal.core.Framework.createSystemBundle(Framework.java:253)
    at org.eclipse.osgi.framework.internal.core.Framework.initialize(Framework.java:152)
    at org.eclipse.osgi.framework.internal.core.Framework.(Framework.java:95)
    at org.eclipse.osgi.framework.internal.core.OSGi.createFramework(OSGi.java:90)
    at org.eclipse.osgi.framework.internal.core.OSGi.(OSGi.java:31)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.startup(EclipseStarter.java:215)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:127)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.eclipse.core.launcher.Main.basicRun(Main.java:185)
    at org.eclipse.core.launcher.Main.run(Main.java:704)
    at org.eclipse.core.launcher.Main.main(Main.java:688)
    !SESSION Mon Oct 11 00:36:59 GMT 2004 ------------------------------------------
    !ENTRY org.eclipse.core.launcher 4 0 Oct 11, 2004 24:36:59.376
    !MESSAGE Exception launching the Eclipse Platform:
    !STACK
    java.lang.NullPointerException
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:138)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.eclipse.core.launcher.Main.basicRun(Main.java:185)
    at org.eclipse.core.launcher.Main.run(Main.java:704)
    at org.eclipse.core.launcher.Main.main(Main.java:688)

    I love eclipse and run it under windows very well.
    Now,I install a Linux OS in my computer,and want to work under it, but I get the same error log everytime.
    What others do who use eclipse under Linux?Is it work well?

  • Running a jar vs running classes under Linux

    I still can't figure this out.
    I have a jar file that I am trying to run on my Linux server.
    The jar file runs on my local machine.
    If I try to run the jar file on the linux box I get -
    Exception in thread "main" java.lang.NoClassDefFoundError:
    javax/sql/ConnectionPoolDataSource
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:120)
    If I un jar the file, all classes run correctly.
    I have explicitly set the classpath from the command line on each try. Can anyone explain why it works one way and not the other?

    Thank you for your help. HOW DO I DO THAT?
    And, If I don't already have that information in the jar manifest, why does the jar work on my other machines?
    And, I thought the reason you would jar the files up is to make it easy to port to other systems. If I have to change the manifest for each machine that doesn't make it very portable.
    I am really frustrated with it and can't seem to find the solution.

  • Run Oracle under Linux

    Hi
    I am a newbie on Linux environment, now I am using Redhat AS 2.1. I've just finished installed oracle 9i on my Linux and it went successfully.
    The problem is, I can't find the Oracle menu on my Redhat GUI (as in Windows), so I need a guidance of how to access & run my oracle on my Linux.
    any helps / clues will be appreciated
    thx

    Hi,
    The installation on Linux doesn't create icons on the GUI as in Windows environment.
    You can run the tools and the sqlplus from a terminal.
    The tools should be find in: /your oraclehome/bin
    Use oemapp to load Enterprise Manager and other tools to create, modify users, instances, etc.
    Good Luck!!
    Eduardo

  • Exception in html parser under Linux

    Hi all,
    Following code is copied from Tech Tip 23Sep1999. I have compiled it and run it under Win98. It works fine for any uri. However, when I try to run it under Linux, it throws exceptions. I noticed that some web site can be parsered with the program in Linux but some can't. I wonder the different between those platforms. Anyone can tell me how to make the program works under Linux.
    Rgds,
    unplug
    configuration
    RedHat 7.1
    JDK1.3.1
    Failed: java GetLinks http://java.sun.com
    Worked: java GetLinks http://www.apache.org
    --begining of code
    import java.io.*;
    import java.net.*;
    import javax.swing.text.*;
    import javax.swing.text.html.*;
    class GetLinks {
    public static void main(String[] args) {
    EditorKit kit = new HTMLEditorKit();
    Document doc = kit.createDefaultDocument();
    // The Document class does not yet
    // handle charset's properly.
    doc.putProperty("IgnoreCharsetDirective",
    Boolean.TRUE);
    try {
    // Create a reader on the HTML content.
    Reader rd = getReader(args[0]);
    // Parse the HTML.
    kit.read(rd, doc, 0);
    // Iterate through the elements
    // of the HTML document.
    ElementIterator it = new ElementIterator(doc);
    javax.swing.text.Element elem;
    while ((elem = it.next()) != null) {
    SimpleAttributeSet s = (SimpleAttributeSet)
    elem.getAttributes().getAttribute(HTML.Tag.A);
    if (s != null) {
    System.out.println(
    s.getAttribute(HTML.Attribute.HREF));
    } catch (Exception e) {
    e.printStackTrace();
    System.exit(1);
    // Returns a reader on the HTML data. If 'uri' begins
    // with "http:", it's treated as a URL; otherwise,
    // it's assumed to be a local filename.
    static Reader getReader(String uri)
    throws IOException {
    if (uri.startsWith("http:")) {
    // Retrieve from Internet.
    URLConnection conn=
    new URL(uri).openConnection();
    return new
    InputStreamReader(conn.getInputStream());
    } else {
    // Retrieve from file.
    return new FileReader(uri);
    --End of code
    --Exception in Linux
    Exception in thread "main" java.lang.NoClassDefFoundError
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:120)
    at java.awt.Toolkit$2.run(Toolkit.java:512)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:503)
    at javax.swing.text.html.CSS.getValidFontNameMapping(CSS.java:932)
    at javax.swing.text.html.CSS$FontFamily.parseCssValue(CSS.java:1789)
    at javax.swing.text.html.CSS.getInternalCSSValue(CSS.java:531)
    at javax.swing.text.html.CSS.addInternalCSSValue(CSS.java:516)
    at javax.swing.text.html.StyleSheet.addCSSAttribute(StyleSheet.java:436)
    at javax.swing.text.html.HTMLDocument$HTMLReader$ConvertAction.start(HTM
    LDocument.java:2536)
    at javax.swing.text.html.HTMLDocument$HTMLReader.handleStartTag(HTMLDocu
    ment.java:1992)
    at javax.swing.text.html.parser.DocumentParser.handleStartTag(DocumentPa
    rser.java:145)
    at javax.swing.text.html.parser.Parser.startTag(Parser.java:333)
    at javax.swing.text.html.parser.Parser.parseTag(Parser.java:1786)
    at javax.swing.text.html.parser.Parser.parseContent(Parser.java:1821)
    at javax.swing.text.html.parser.Parser.parse(Parser.java:1980)
    at javax.swing.text.html.parser.DocumentParser.parse(DocumentParser.java
    :109)
    at javax.swing.text.html.parser.ParserDelegator.parse(ParserDelegator.ja
    va:74)
    at javax.swing.text.html.HTMLEditorKit.read(HTMLEditorKit.java:239)
    at GetLinks.main(GetLinks.java:23)

    Support for CSS and clearly defined.Also Dictionary getDocumentProperties() is not properly exaplained meaning it doesnt give methods to get all the properties a HTML document can have.

  • Running jar in Linux and Windows

    Hi
    I created a jar file in Linux and it is running fine under Linux.
    But when I tried to run the same jar under windows,I got the following error
    Exception in thread "main" java.lang.NoClassDefFoundError:
    Is there any difference between running jar files in Linux and Windows?

    Hi
    I have a jar(say program.jar) containing a program which uses some libraries(again some jar files).The manifest file is written to look for the library jar files in the current directory.
    Main-Class: package_name.program_name
    Class-Path: fits.jar image.jar util.jar myutil.jar
    But while running the jar file in WINDOWS (java -jar program.jar <parameter list>)
    the following error occurs:
    Exception in thread "main" java.lang.NoClassDefFoundError:
    nom/tam/fits/Data"
    the class Data is present in the fits.jar jarfile.
    The same jar(run in the same manner)does not give any problems in Linux

  • SubNotFoundException under Linux not under Windows

    Hi,
    I got a RMI client server application. The server runs normal on my windows machine with JRE 1.5. But when I want to run it on my linux server with JRE 1.4, I get the following error:
    java.rmi.StubNotFoundException: Stub class not found: .....
    I used an Ant Build.xml file to create jar (2 --> 1 remote.jar and 1 server.jar) files. In the javac I set the target to 1.1. In rmic I used stubversion and set to 1.1. All my remote objects are in a seperate jar file that is included in my path when I start my server. I start my server with a bat and a sh file.
    run.bat (under Windows)
    set CPBEFORE=%CLASSPATH%
    set CLASSPATH=%CLASSPATH%;PpdaRemote.jar
    start rmiregistry 10001 -J- Djava.rmi.server.hostname=willemc
    set CLASSPATH=%CPBEFORE%;
    java -jar PpdaServer.jar
    run.sh (under Linux)
    CPBEFORE=$CLASSPATH
    export CLASSPATH="$CLASSPATH:PpdaRemote.jar"
    rmiregistry 10001 -J- Djava.rmi.server.hostname=willemc &
    export CLASSPATH=$CPBEFORE
    java -jar PpdaServer.jar
    Can anybody think of a solution for this. I have been working on it for a couple of hours. Upgrading my server to 1.5 is not possible (it's a sgi server).
    Thanks,
    Willem

    Nevermind. Fixed my own problem.

  • Running java in linux script

    Suppose to package all necessary *.class in example.jar in following way,
    bin.start.class
    business.bus.class
    and the class file that contain main is bin.start.class.
    There is no problem to run following under linux shell prompt. java VM is under PATH searching path. i.e.
    $java -classpath example.jar bin.start
    However, there is some problem to run a script which contains 'java -classpath example.jar bin.start' under linux shell prompt.
    May I have any clue to identify this problem?
    Thanks in advance.

    For case 1: Does any case work? When I see "[un]able to locate the main method" then I think that that the class was found but that the main method is not declared properly.
    Of course, main must be declared with exactly these keywords:
    static public void main( String arg[]) {
    ...For case 2: you still have some kind of classpath problem.
    If your script really has the line
    java -classpath example.jar bin.start
    then I still think your current working directory at the time that this line is run not that same directory as where the jar file is.
    If you have JAVA_HOME defined, you might want to try:
    pwd
    $JAVA_HOME/bin/java -classpath example.jar bin.start
    Another suggestion: If your $PATH variable is long, try to shorten it to a short list of directories. You can test with just /bin:/usr/bin .
    Also, is your shell Bash or C-shell? Is your script Bourne shell (/bin/sh) or Bourne?

  • Running JVM in Linux with execl

    Why if I run JVM under Linux and with execl the first argument is lost?
    For example if I want to run java -version I have to do:
    execl("/usr/lib/java5/bin/java","nothing","-version");
    If I do execl("/usr/lib/java5/bin/java","-version"); it doesn't works and appears the help message that appears when you are wrong with the parameters.
    This is an innocent thing when you know it, but that has caused me a lot of headaches and debug time and now I'm curios about it ;)
    PD: I use jdk-1_5_0_01 and Suse 9.1
    A lot of thanks in advance,

    /* a.c */
    #include <stdio.h>
    #include <stdlib.h>
    int main() {
    int r=execl("./b","nothing","-version",NULL);
    printf("%d\n",r);
    /* b.c */
    #include <stdio.h>
    int main(int argc,char *argv[]) {
    int i;
            for(i=0;i<argc;i++) printf("%d %s\n",i,argv);
    $ gcc a.c -o a
    $ gcc b.c- o b
    $ ./a
    0 nothing
    1 -version

  • Portege Z930 - slow Wi-Fi on battery under Linux

    Hi,
    I've just bought a Z930 and I run it under Linux Mint and Windows 7.
    I've a problem under Linux that I don't have on Windows.
    When I put my computer on battery, there is a significative signal lowering.
    Do somebody why there is such a problem ? Can we fix it by configuring my network device ?
    Thanks for your help !
    Badmaul

    Sounds like the Wifi driver needs updating, perhaps try an Ubuntu Live CD v12 and see how that goes. Ubuntu is very Toshiba friendly now.

  • Vhost configuration for Adobe Media Server running under linux.

    Please help me with Vhost configuration for Adobe Media Server running under linux.
    I was running a media sharing website for which I wanted to use Adobe Media Server.
    To use, AMS, I disabled the already installed Apache server and installed AMS along with the built in Apache server. I could successfully install AMS and could login to AMS Admin Console through my IP number.
    My existing website, www.mydomain.com is having its contents located at:
    /home/mydomain/public_html
    (Directory created under the old version of Apache not bundled with AMS)
    Users will be uploading their videos, which will get transcoded and will be delivered to the website visitors in the existing scenario.
    To use this website with AMS, this is what I did:
    I created a folder for my domain, www.mydomain.com as below
    /opt/adobe/ams/conf/_defaultRoot_/www.mydomain.com
    Copied Application.xml and Vhost.xml from /opt/adobe/ams/conf/_defaultRoot_/   and pasted them in /opt/adobe/ams/conf/_defaultRoot_/www.mydomain.com
    In the Application.xml file there are 2 entries:
    <Alias name="mydomain.com"></Alias>
    <AppsDir>${/home/mydomain/public_html}</AppsDir>
    Please help me with further steps to be completed:
    Do I need to create a separate VirtualHost entry in the Apache installed with AMS?
    If yes, can I specify already existing document root for my website (/home/mydomain/public_html) or do I need to create a separate folder under webroot/Apache ?
    If yes to point 2 above, then do I need to copy all the existing contents from /home/mydomain/public_html to the newly created folder ?
    I hope, I can serve all my static contents like html pages and php and media like video/audio. In that case do I need create alias to my Media/Alias folder or AMS will automatically start streaming when a video/audio is requested ?
    What other steps do i need to complete?
    Any help in this regard would be highly appreciated.
    Thanks and Regards

    Dear sir or madam,
    Here is Letswin Technology, which specializes in global servers, web hosting, VPS, VPNj. If anything I can do for you, pls contact us!
    Have a nice day!

  • Java running under linux with crontab

    I'm having a problem:
    i want to run a java program under linux with crontab.
    my classes are in a directory and aren't in a package. i run em by invoking ./start which is a small script that i wrote. The script is in the same dir as the classes and invokes java by "java Main >>logjava.txt " but this doesn't seem to work all i get is an empty logfile
    i need to run the program every day at 0800 so i inserted the following in crontab:
    0 8 * 1-5 /var/"path"/start > logjava (where path is the path to the classes dir)
    if i run the cmdline from anywhere on the prompt i get the result i want. I think it's because the cron runs it from the root dir thus making java unable to find the classes
    Any suggestions would be welcome. or can some1 tell me how to make linux executables from the java (i usually use jsmooth for the windows exe)

    You can execute several commands in the process started by cron. You separate them using semicolons.
    Have you tried a cron entry like this:
    0 8 * 1-5 cd /var/"path";pwd;echo $PATH; ./start > logjavaOr, you may need to make sure the process started by cron gets the same environment as your interactive shells do, by explicitly loading your setup or .login scripts:
    0 8 * 1-5 . $HOME/.setup;cd /var/"path";pwd;echo $PATH; ./start > logjava

  • Loss of keyboard focus in Java appl running under linux

    I have a small sample program that replicates my problem. When this program is run a window is created. If you select File->New another instance of the program window is created. Now if you try to go back and bring to front the first window, keyboard focus is not
    transferred when run under linux. You can only type in the second window. The expected behavior does happen in Windows.
    > uname -a
    Linux watson 2.6.20-1.2933.fc6 #1 SMP Mon Mar 19 11:38:26 EDT 2007 i686 i686 i386 GNU/Linux
    java -versionjava version "1.5.0_11"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_11-b03)
    Java HotSpot(TM) Client VM (build 1.5.0_11-b03, mixed mode, sharing)
    javac -versionjavac 1.5.0_11
    import java.awt.event.*;
    import javax.swing.*;
    class SwingWindow extends JFrame {
        SwingWindow() {
         super("SwingWindow");
         JMenuBar menuBar = new JMenuBar();     
            JMenu fileMenu = new JMenu("File");
            JMenuItem newItem = new JMenuItem("New");
            newItem.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent event) {
              SwingWindow.createAndShowGUI();
         fileMenu.add(newItem);
            menuBar.add(fileMenu);
            setJMenuBar(menuBar);
            setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);       
         JTextField text = new JTextField(200);
         getContentPane().add(text);
         pack();
         setSize(700, 275);
        public static void createAndShowGUI() {
            JFrame frame = new SwingWindow();
            frame.setVisible(true);
        public static void main(String[] args) {
            javax.swing.SwingUtilities.invokeLater(new Runnable() {
                public void run() {
                    createAndShowGUI();
    }

    You can implement the FocusListener interface. When
    the first JFrame gains focus, call
    text.requestFocusInWindow(). I hope this helps.The call requestFocusInWindow is not helping, perhaps even making it worse.
    The problem seems to be that I am in the situation where the call
    KeyboardFocusManager.getCurrentKeyboardFocusManager().getPermanentFocusOwner()
    is returning the expected Component. The problem is that the KeyListener class that is registered with the Component is not being called when a key is being pressed.
    The issue is that I have a component that has the keyboard focus, but the KeyListener class
    is not responding.
    This seems to be a linux only problem which makes it only mysterious.

Maybe you are looking for