Game Company- Java Server Thread Priority

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • BlackHawke

    #16
    Re: Game Company- Java Server Thread Priority

    Nevermind, looked it up!

    I think maybe in an attempt to avoid deadlock the programmers added some
    random element to the timing of threads... Perhaps that is the issue....

    Nick
    "BlackHawke " <blackhawke@leg acygames.net> wrote in message
    news:av3Rb.2796 4$zj7.4757@news read1.news.pas. earthlink.net.. .[color=blue]
    > You know, this started RIGHT AFTER a revamp of all of the communications
    > protocols (and some threading issues too)....
    >
    > Can you explain deadlock to me a bit more?
    >
    > Thank you.
    >
    > Nick
    > "thoff" <tmh@possibilit y.com> wrote in message
    > news:1017r20545 ogd7b@news.supe rnews.com...[color=green]
    > > Sounds like deadlock. Turn on logging. If you don't have logging
    > > then add it so you can solve these kinds of dynamic problems.
    > > Deadlock can be in your communication protocols or threading.
    > >
    > > It also sounds like you need spend some time with a profiler.
    > >
    > >
    > > BlackHawke wrote:[color=darkred]
    > > > We've now noticed that on idle (IE not processing turns), the Game[/color][/color]
    > Server[color=green][color=darkred]
    > > > Program takes 0% of the CPU load, and when processing a turn goes up[/color][/color][/color]
    to[color=blue][color=green][color=darkred]
    > > > 3-7%. It never exceeds 7%, and takes FOREVER now when processing a[/color][/color][/color]
    turn.[color=blue]
    > It[color=green][color=darkred]
    > > > is the only program running on the machine, and services are at a[/color][/color]
    > minimum.[color=green][color=darkred]
    > > > Even with 99% of the CPU resources free (IE on System Idle), the game[/color][/color]
    > will[color=green][color=darkred]
    > > > never take more than about 7% of the processor time.[/color][/color]
    >
    >[/color]


    Comment

    • BlackHawke

      #17
      Re: Game Company- Java Server Thread Priority

      Nevermind, looked it up!

      I think maybe in an attempt to avoid deadlock the programmers added some
      random element to the timing of threads... Perhaps that is the issue....

      Nick
      "BlackHawke " <blackhawke@leg acygames.net> wrote in message
      news:av3Rb.2796 4$zj7.4757@news read1.news.pas. earthlink.net.. .[color=blue]
      > You know, this started RIGHT AFTER a revamp of all of the communications
      > protocols (and some threading issues too)....
      >
      > Can you explain deadlock to me a bit more?
      >
      > Thank you.
      >
      > Nick
      > "thoff" <tmh@possibilit y.com> wrote in message
      > news:1017r20545 ogd7b@news.supe rnews.com...[color=green]
      > > Sounds like deadlock. Turn on logging. If you don't have logging
      > > then add it so you can solve these kinds of dynamic problems.
      > > Deadlock can be in your communication protocols or threading.
      > >
      > > It also sounds like you need spend some time with a profiler.
      > >
      > >
      > > BlackHawke wrote:[color=darkred]
      > > > We've now noticed that on idle (IE not processing turns), the Game[/color][/color]
      > Server[color=green][color=darkred]
      > > > Program takes 0% of the CPU load, and when processing a turn goes up[/color][/color][/color]
      to[color=blue][color=green][color=darkred]
      > > > 3-7%. It never exceeds 7%, and takes FOREVER now when processing a[/color][/color][/color]
      turn.[color=blue]
      > It[color=green][color=darkred]
      > > > is the only program running on the machine, and services are at a[/color][/color]
      > minimum.[color=green][color=darkred]
      > > > Even with 99% of the CPU resources free (IE on System Idle), the game[/color][/color]
      > will[color=green][color=darkred]
      > > > never take more than about 7% of the processor time.[/color][/color]
      >
      >[/color]


      Comment

      • Nigel Wade

        #18
        Re: Game Company- Java Server Thread Priority

        BlackHawke wrote:[color=blue]
        > I know that there is CPU Throttling in Windows 2003... Is that only for IIS?
        >
        > We found a way to compile this into native code... It's now revved up to 25%
        > of the CPU cycles during intense work... I notice that in the "performanc e"
        > section of the task manager it lists 4 CPU's (we only have 2)... It's
        > letting us max out one of the "4" to 100%.... Any way to let it max them
        > all?
        >
        > Again, I increased the priority, but no luck....
        >
        > Nick
        >[/color]

        That implies you've got dual Xeon processors with Hyperthreading enabled.
        That might be confusing Windows into thinking you've got 4 processors. How
        many processors is the verion of w3k on that system licensed for? It could
        be ignoring processors for which you don't have a license. Of course, this
        is pure speculation on my part...

        Try disabling Hyperthreading in the BIOS so Windows only sees the 2
        processors you actually have, and see what happens.


        --
        Nigel Wade, System Administrator, Space Plasma Physics Group,
        University of Leicester, Leicester, LE1 7RH, UK
        E-mail : nmw@ion.le.ac.u k
        Phone : +44 (0)116 2523548, Fax : +44 (0)116 2523555

        Comment

        • Nigel Wade

          #19
          Re: Game Company- Java Server Thread Priority

          BlackHawke wrote:[color=blue]
          > I know that there is CPU Throttling in Windows 2003... Is that only for IIS?
          >
          > We found a way to compile this into native code... It's now revved up to 25%
          > of the CPU cycles during intense work... I notice that in the "performanc e"
          > section of the task manager it lists 4 CPU's (we only have 2)... It's
          > letting us max out one of the "4" to 100%.... Any way to let it max them
          > all?
          >
          > Again, I increased the priority, but no luck....
          >
          > Nick
          >[/color]

          That implies you've got dual Xeon processors with Hyperthreading enabled.
          That might be confusing Windows into thinking you've got 4 processors. How
          many processors is the verion of w3k on that system licensed for? It could
          be ignoring processors for which you don't have a license. Of course, this
          is pure speculation on my part...

          Try disabling Hyperthreading in the BIOS so Windows only sees the 2
          processors you actually have, and see what happens.


          --
          Nigel Wade, System Administrator, Space Plasma Physics Group,
          University of Leicester, Leicester, LE1 7RH, UK
          E-mail : nmw@ion.le.ac.u k
          Phone : +44 (0)116 2523548, Fax : +44 (0)116 2523555

          Comment

          • Chris Smith

            #20
            Re: Game Company- Java Server Thread Priority

            [Followup set]

            BlackHawke wrote:[color=blue]
            > Nevermind, looked it up!
            >
            > I think maybe in an attempt to avoid deadlock the programmers added some
            > random element to the timing of threads... Perhaps that is the issue....[/color]

            I seriously hope not. If so, you need to fire the programmers that did
            so. Developers who don't understand the difference between a correct
            application and a lucky application are *not* a good thing to have
            around.

            In all, I'd consider this hypothesis entirely unlikely.

            As was said the last time you brought up issues about your game here,
            why don't you ask a programmer to come and discuss the issue? It's a
            waste of everyone's time (including your own) to post here when you
            can't provide most of the information needed to solve the problem.

            --

            The Easiest Way to Train Anyone... Anywhere.

            Chris Smith - Lead Software Developer/Technical Trainer
            MindIQ Corporation

            Comment

            • Chris Smith

              #21
              Re: Game Company- Java Server Thread Priority

              [Followup set]

              BlackHawke wrote:[color=blue]
              > Nevermind, looked it up!
              >
              > I think maybe in an attempt to avoid deadlock the programmers added some
              > random element to the timing of threads... Perhaps that is the issue....[/color]

              I seriously hope not. If so, you need to fire the programmers that did
              so. Developers who don't understand the difference between a correct
              application and a lucky application are *not* a good thing to have
              around.

              In all, I'd consider this hypothesis entirely unlikely.

              As was said the last time you brought up issues about your game here,
              why don't you ask a programmer to come and discuss the issue? It's a
              waste of everyone's time (including your own) to post here when you
              can't provide most of the information needed to solve the problem.

              --

              The Easiest Way to Train Anyone... Anywhere.

              Chris Smith - Lead Software Developer/Technical Trainer
              MindIQ Corporation

              Comment

              • BlackHawke

                #22
                Re: Game Company- Java Server Thread Priority

                We do have dual Xeon processors...

                Out of curiosity, is there a problem with hyperthreading? Will we run faster
                if we disable it?

                Nick

                "Nigel Wade" <nmw@ion.le.ac. uk> wrote in message
                news:bv3426$rrc $1@south.jnrs.j a.net...[color=blue]
                > BlackHawke wrote:[color=green]
                > > I know that there is CPU Throttling in Windows 2003... Is that only for[/color][/color]
                IIS?[color=blue][color=green]
                > >
                > > We found a way to compile this into native code... It's now revved up to[/color][/color]
                25%[color=blue][color=green]
                > > of the CPU cycles during intense work... I notice that in the[/color][/color]
                "performanc e"[color=blue][color=green]
                > > section of the task manager it lists 4 CPU's (we only have 2)... It's
                > > letting us max out one of the "4" to 100%.... Any way to let it max them
                > > all?
                > >
                > > Again, I increased the priority, but no luck....
                > >
                > > Nick
                > >[/color]
                >
                > That implies you've got dual Xeon processors with Hyperthreading enabled.
                > That might be confusing Windows into thinking you've got 4 processors. How
                > many processors is the verion of w3k on that system licensed for? It could
                > be ignoring processors for which you don't have a license. Of course, this
                > is pure speculation on my part...
                >
                > Try disabling Hyperthreading in the BIOS so Windows only sees the 2
                > processors you actually have, and see what happens.
                >
                >
                > --
                > Nigel Wade, System Administrator, Space Plasma Physics Group,
                > University of Leicester, Leicester, LE1 7RH, UK
                > E-mail : nmw@ion.le.ac.u k
                > Phone : +44 (0)116 2523548, Fax : +44 (0)116 2523555
                >[/color]


                Comment

                • Nigel Wade

                  #23
                  Re: Game Company- Java Server Thread Priority

                  BlackHawke wrote:[color=blue]
                  > We do have dual Xeon processors...
                  >
                  > Out of curiosity, is there a problem with hyperthreading?[/color]

                  Not that I know of.
                  [color=blue]
                  > Will we run faster
                  > if we disable it?[/color]

                  The easiest way to answer that is to try it and see.

                  I thought that Windows desktop was licensed for a single processor, base
                  server for 2 and advanced server for more. I might be wrong though as I use
                  Linux not Windows.

                  What Windows does if you run desktop on dual processors, or basic server on
                  dual hyperthreading processors (which appear as 4) someone else will have to
                  answer. But if it totally disables your 2nd processor and allows the single,
                  hyperthread processor then it will most definitely run slower with
                  hyperthreading enabled.


                  --
                  Nigel Wade, System Administrator, Space Plasma Physics Group,
                  University of Leicester, Leicester, LE1 7RH, UK
                  E-mail : nmw@ion.le.ac.u k
                  Phone : +44 (0)116 2523548, Fax : +44 (0)116 2523555

                  Comment

                  • Grant Wagner

                    #24
                    Re: Game Company- Java Server Thread Priority

                    Just to clarify, CPUs with hyperthreading don't "confuse" Windows into thinking
                    there are more CPUs, its the way it's supposed to work. You may be interested in
                    reading the document at:

                    <url:

                    />

                    No, there is no problem with hyperthreading, but read the article at the URL I
                    provided because it discusses issues about CPU licensing and how incorrect
                    enumeration of hyperthreaded processors could cause Windows to be using two
                    logical processors on the same physical CPU instead of two logical processors.

                    "It is critical that the BIOS count logical processors in the manner described;
                    otherwise, Windows 2000 or its applications may use logical processors when they
                    should be using physical processors instead. For example, consider an
                    application that is licensed to use two processors on the system diagrammed in
                    Figure 1. Such an application will achieve better performance using two separate
                    physical processors (such as 1 and 2) than it would using two logical processors
                    on the same physical processor (such as 1 and 5)."

                    Also note that if you have a 2 CPU license for your application, the 2nd logical
                    processor on each CPU simply won't be used, so you might as well disable
                    hyperthreading to avoid any overhead it causes.

                    I apologize that it's specific to Windows 2000, I was in a hurry and didn't try
                    to locate a similar document for Windows 2003, but I'd assume most of the
                    information in that document applies to Windows 2003 as well.

                    BlackHawke wrote:
                    [color=blue]
                    > We do have dual Xeon processors...
                    >
                    > Out of curiosity, is there a problem with hyperthreading? Will we run faster
                    > if we disable it?
                    >
                    > Nick
                    >
                    > "Nigel Wade" <nmw@ion.le.ac. uk> wrote in message
                    > news:bv3426$rrc $1@south.jnrs.j a.net...[color=green]
                    > > BlackHawke wrote:[color=darkred]
                    > > > I know that there is CPU Throttling in Windows 2003... Is that only for[/color][/color]
                    > IIS?[color=green][color=darkred]
                    > > >
                    > > > We found a way to compile this into native code... It's now revved up to[/color][/color]
                    > 25%[color=green][color=darkred]
                    > > > of the CPU cycles during intense work... I notice that in the[/color][/color]
                    > "performanc e"[color=green][color=darkred]
                    > > > section of the task manager it lists 4 CPU's (we only have 2)... It's
                    > > > letting us max out one of the "4" to 100%.... Any way to let it max them
                    > > > all?
                    > > >
                    > > > Again, I increased the priority, but no luck....
                    > > >
                    > > > Nick
                    > > >[/color]
                    > >
                    > > That implies you've got dual Xeon processors with Hyperthreading enabled.
                    > > That might be confusing Windows into thinking you've got 4 processors. How
                    > > many processors is the verion of w3k on that system licensed for? It could
                    > > be ignoring processors for which you don't have a license. Of course, this
                    > > is pure speculation on my part...
                    > >
                    > > Try disabling Hyperthreading in the BIOS so Windows only sees the 2
                    > > processors you actually have, and see what happens.[/color][/color]

                    --
                    | Grant Wagner <gwagner@agrico reunited.com>

                    Comment

                    Working...