Java servlets and multiple processors

Discussion in 'Java' started by Bura Tino, Apr 15, 2004.

  1. Bura Tino

    Bura Tino Guest

    Hi,


    Sorry if I'm posting to the wrong group. If I have a Java servlets
    application running on a multiprocessor machine will the engine be
    able to take advantage of that on its own or do I have to do something
    to ensure that?

    Thanks,

    Bura
     
    Bura Tino, Apr 15, 2004
    #1
    1. Advertising

  2. Bura Tino

    Chris Smith Guest

    Bura Tino wrote:
    > Sorry if I'm posting to the wrong group. If I have a Java servlets
    > application running on a multiprocessor machine will the engine be
    > able to take advantage of that on its own or do I have to do something
    > to ensure that?


    You'll gain that advantage automatically. Servlet-based applications
    are inherently multithreaded.

    --
    www.designacourse.com
    The Easiest Way to Train Anyone... Anywhere.

    Chris Smith - Lead Software Developer/Technical Trainer
    MindIQ Corporation
     
    Chris Smith, Apr 15, 2004
    #2
    1. Advertising

  3. Bura Tino

    Roedy Green Guest

    On 14 Apr 2004 20:25:07 -0700, (Bura Tino) wrote or
    quoted :

    >Sorry if I'm posting to the wrong group. If I have a Java servlets
    >application running on a multiprocessor machine will the engine be
    >able to take advantage of that on its own or do I have to do something
    >to ensure that?


    So long as your OS supports the dual processor, so will Java.

    IIRC with some versions of Windows you have to do something special to
    turn dual processor mode on and off. In some, it figures out
    automatically on each boot.

    --
    Canadian Mind Products, Roedy Green.
    Coaching, problem solving, economical contract programming.
    See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.
     
    Roedy Green, Apr 15, 2004
    #3
  4. Bura Tino

    Bura Tino Guest

    Chris Smith <> wrote in message news:<4.net>...
    > Bura Tino wrote:
    > > Sorry if I'm posting to the wrong group. If I have a Java servlets
    > > application running on a multiprocessor machine will the engine be
    > > able to take advantage of that on its own or do I have to do something
    > > to ensure that?

    >
    > You'll gain that advantage automatically. Servlet-based applications
    > are inherently multithreaded.


    Thanks for this reply and the one by Roedy.

    This has now become a pure java question. Is "multithreaded" enough to
    take advantage of multiple processors? You don't need to be
    "multi-processed"?
     
    Bura Tino, Apr 15, 2004
    #4
  5. Bura Tino wrote:

    >
    > This has now become a pure java question. Is "multithreaded" enough to
    > take advantage of multiple processors?


    Yes.

    > You don't need to be "multi-processed"?


    No. Unless you're using an old Java implementation and use "green threads".
    In that case, the java process itself manages your threads, but as far as
    the kernel is concerned, there is only 1 thread.


    --
    Kind regards,
    Christophe Vanfleteren
     
    Christophe Vanfleteren, Apr 15, 2004
    #5
  6. Bura Tino

    Bura Tino Guest

    "Christophe Vanfleteren" <> wrote in message
    news:kgufc.71944$-ops.be...
    > Bura Tino wrote:
    >
    > >
    > > This has now become a pure java question. Is "multithreaded" enough to
    > > take advantage of multiple processors?

    >
    > Yes.
    >
    > > You don't need to be "multi-processed"?

    >
    > No. Unless you're using an old Java implementation and use "green

    threads".
    > In that case, the java process itself manages your threads, but as far as
    > the kernel is concerned, there is only 1 thread.
    >
    >

    Thanks. Then (and this is almost not a java question) hypothetically
    speaking, is it better to have a dual system 1ghz each and a single
    processor 2ghz system. If the application is multithreaded and threads are
    running at the same time, does it particularly matter whether it runs on a
    single processor or not?

    Bura

    > --
    > Kind regards,
    > Christophe Vanfleteren
     
    Bura Tino, Apr 15, 2004
    #6
  7. Bura Tino wrote:

    > Thanks. Then (and this is almost not a java question) hypothetically
    > speaking, is it better to have a dual system 1ghz each and a single
    > processor 2ghz system. If the application is multithreaded and threads are
    > running at the same time, does it particularly matter whether it runs on a
    > single processor or not?


    You can't answer this with a general yes/no for all cases. It depends on the
    workload, OS kernel, wether a process is cpu or io driven, ...

    But most of the time it is wrong to say that 2 1GHz cpu's will perform just
    as good as a 2GHz one. They can get very close though in optimal
    conditions.

    --
    Kind regards,
    Christophe Vanfleteren
     
    Christophe Vanfleteren, Apr 15, 2004
    #7
  8. Christophe Vanfleteren wrote:

    >>Thanks. Then (and this is almost not a java question) hypothetically
    >>speaking, is it better to have a dual system 1ghz each and a single
    >>processor 2ghz system. If the application is multithreaded and threads are
    >>running at the same time, does it particularly matter whether it runs on a
    >>single processor or not?

    >
    >
    > You can't answer this with a general yes/no for all cases. It depends on the
    > workload, OS kernel, wether a process is cpu or io driven, ...
    >
    > But most of the time it is wrong to say that 2 1GHz cpu's will perform just
    > as good as a 2GHz one. They can get very close though in optimal
    > conditions.


    They can also perform better, if the measure of performance is latency
    instead of throughput.
     
    Michael Borgwardt, Apr 16, 2004
    #8
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    3
    Views:
    313
  2. Michael Schmitt
    Replies:
    3
    Views:
    302
    Ulrich Petri
    Nov 3, 2003
  3. Replies:
    1
    Views:
    930
    Kai Schwebke
    Mar 14, 2007
  4. rym3k
    Replies:
    1
    Views:
    973
    =?UTF-8?B?QXJuZSBWYWpow7hq?=
    Jul 6, 2007
  5. Bryan Richardson

    Multiple Processors on Windows 64-bit

    Bryan Richardson, Oct 14, 2008, in forum: Ruby
    Replies:
    9
    Views:
    139
    Robert Klemme
    Oct 16, 2008
Loading...

Share This Page