Game Company- Java Server Thread Priority

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

    Game Company- Java Server Thread Priority

    Hello!

    This is my second post. Ppl really helped me with the first. I hope there
    are answers for this one as well

    I own a game company (www.aepoxgames.net) releasing the beta for our first
    sci-fi space game in about 2 weeks (www.andromedaonline.net)

    We have multiple servers, but the game engine (Game Server Program) is a
    Java program (don't ask why) on a windows 2003 enterprise system with dual
    xeon p4 processors and 4GB of RAM. This program needs to process orders for
    thousands of ships as fast as possible.

    When we first set this up, the Game Server Program took exactly 50% of the
    CPU cycles when idle, and up to 80% or 90% when working (processing a turn,
    for example) and could process a turn of 10,000 ships in 15 seconds.

    We revamped some of the major systems (the code and the computer itself),
    did a fresh install of Windows 2003 on a different system (still dual Xeon,
    but faster MB and CPU), migrated the Game Server Program there, changed the
    threadpool priorities in the code, etc.

    We've now noticed that on idle (IE not processing turns), the Game Server
    Program takes 0% of the CPU load, and when processing a turn goes up to
    3-7%. It never exceeds 7%, and takes FOREVER now when processing a turn. It
    is the only program running on the machine, and services are at a minimum.
    Even with 99% of the CPU resources free (IE on System Idle), the game will
    never take more than about 7% of the processor time.

    This is extremely serious.

    We've tried increasing the priority of Java, but
    a) The only way I know to do this is through the Task manager, meaning
    it would have to be done every time we run the server
    b) I increased the priority to "Real Time" and this had absolutely no
    impact on the server process. The CPU load didn't change.

    This is the only program intended to run on this computer. We need it
    hogging as many resources as it can. Database, development, everything's on
    different systems. This machine has one job, run this Java program, and it's
    not taking that job seriously.

    We don't know if it's a Windows issue, or a Java issue, but I suspect it's a
    combination of the two. All we know is it used to run fast as hell, and now
    crawls.

    This post is going to Java groups and Windows groups on the assumption that
    something can be done on each end to improve things (perhaps there's a
    command line parameter to tell java to run at a higher priority, perhaps
    there's a windows issue not giving proper time to the Java App).

    Any thoughts?

    Thank you for your time.
    Nick Soutter


  • Mike Brannigan [MSFT]

    #2
    Re: Game Company- Java Server Thread Priority

    If all of the underlying system and setup of Windows is identical to the
    first system (with the exception of the hardware changes to faster
    components). Then unless it is a hardware issue (some setting in the BIOS
    to incorrectly set up the mother board or CPUs); then your statement about
    "revamped some of the major systems (the code and the computer itself)," -
    would lead you to possibly retest the system using the original code base
    for the application that was running on the old server. This will help
    eliminate your code changes as being the source of the error. (alternative
    path is to put your new code version on the old server and retest)

    --
    Regards,

    Mike
    --
    Mike Brannigan [Microsoft]

    This posting is provided "AS IS" with no warranties, and confers no
    rights

    Please note I cannot respond to e-mailed questions, please use these
    newsgroups

    "BlackHawke " <blackhawke@leg acygames.net> wrote in message
    news:C_4Qb.2347 3$1e.6174@newsr ead2.news.pas.e arthlink.net...[color=blue]
    > Hello!
    >
    > This is my second post. Ppl really helped me with the first. I hope there
    > are answers for this one as well
    >
    > I own a game company (www.aepoxgames.net) releasing the beta for our first
    > sci-fi space game in about 2 weeks (www.andromedaonline.net)
    >
    > We have multiple servers, but the game engine (Game Server Program) is a
    > Java program (don't ask why) on a windows 2003 enterprise system with dual
    > xeon p4 processors and 4GB of RAM. This program needs to process orders[/color]
    for[color=blue]
    > thousands of ships as fast as possible.
    >
    > When we first set this up, the Game Server Program took exactly 50% of the
    > CPU cycles when idle, and up to 80% or 90% when working (processing a[/color]
    turn,[color=blue]
    > for example) and could process a turn of 10,000 ships in 15 seconds.
    >
    > We revamped some of the major systems (the code and the computer itself),
    > did a fresh install of Windows 2003 on a different system (still dual[/color]
    Xeon,[color=blue]
    > but faster MB and CPU), migrated the Game Server Program there, changed[/color]
    the[color=blue]
    > threadpool priorities in the code, etc.
    >
    > We've now noticed that on idle (IE not processing turns), the Game Server
    > Program takes 0% of the CPU load, and when processing a turn goes up to
    > 3-7%. It never exceeds 7%, and takes FOREVER now when processing a turn.[/color]
    It[color=blue]
    > is the only program running on the machine, and services are at a minimum.
    > Even with 99% of the CPU resources free (IE on System Idle), the game will
    > never take more than about 7% of the processor time.
    >
    > This is extremely serious.
    >
    > We've tried increasing the priority of Java, but
    > a) The only way I know to do this is through the Task manager, meaning
    > it would have to be done every time we run the server
    > b) I increased the priority to "Real Time" and this had absolutely no
    > impact on the server process. The CPU load didn't change.
    >
    > This is the only program intended to run on this computer. We need it
    > hogging as many resources as it can. Database, development, everything's[/color]
    on[color=blue]
    > different systems. This machine has one job, run this Java program, and[/color]
    it's[color=blue]
    > not taking that job seriously.
    >
    > We don't know if it's a Windows issue, or a Java issue, but I suspect it's[/color]
    a[color=blue]
    > combination of the two. All we know is it used to run fast as hell, and[/color]
    now[color=blue]
    > crawls.
    >
    > This post is going to Java groups and Windows groups on the assumption[/color]
    that[color=blue]
    > something can be done on each end to improve things (perhaps there's a
    > command line parameter to tell java to run at a higher priority, perhaps
    > there's a windows issue not giving proper time to the Java App).
    >
    > Any thoughts?
    >
    > Thank you for your time.
    > Nick Soutter
    >
    >[/color]


    Comment

    • Mike Brannigan [MSFT]

      #3
      Re: Game Company- Java Server Thread Priority

      If all of the underlying system and setup of Windows is identical to the
      first system (with the exception of the hardware changes to faster
      components). Then unless it is a hardware issue (some setting in the BIOS
      to incorrectly set up the mother board or CPUs); then your statement about
      "revamped some of the major systems (the code and the computer itself)," -
      would lead you to possibly retest the system using the original code base
      for the application that was running on the old server. This will help
      eliminate your code changes as being the source of the error. (alternative
      path is to put your new code version on the old server and retest)

      --
      Regards,

      Mike
      --
      Mike Brannigan [Microsoft]

      This posting is provided "AS IS" with no warranties, and confers no
      rights

      Please note I cannot respond to e-mailed questions, please use these
      newsgroups

      "BlackHawke " <blackhawke@leg acygames.net> wrote in message
      news:C_4Qb.2347 3$1e.6174@newsr ead2.news.pas.e arthlink.net...[color=blue]
      > Hello!
      >
      > This is my second post. Ppl really helped me with the first. I hope there
      > are answers for this one as well
      >
      > I own a game company (www.aepoxgames.net) releasing the beta for our first
      > sci-fi space game in about 2 weeks (www.andromedaonline.net)
      >
      > We have multiple servers, but the game engine (Game Server Program) is a
      > Java program (don't ask why) on a windows 2003 enterprise system with dual
      > xeon p4 processors and 4GB of RAM. This program needs to process orders[/color]
      for[color=blue]
      > thousands of ships as fast as possible.
      >
      > When we first set this up, the Game Server Program took exactly 50% of the
      > CPU cycles when idle, and up to 80% or 90% when working (processing a[/color]
      turn,[color=blue]
      > for example) and could process a turn of 10,000 ships in 15 seconds.
      >
      > We revamped some of the major systems (the code and the computer itself),
      > did a fresh install of Windows 2003 on a different system (still dual[/color]
      Xeon,[color=blue]
      > but faster MB and CPU), migrated the Game Server Program there, changed[/color]
      the[color=blue]
      > threadpool priorities in the code, etc.
      >
      > We've now noticed that on idle (IE not processing turns), the Game Server
      > Program takes 0% of the CPU load, and when processing a turn goes up to
      > 3-7%. It never exceeds 7%, and takes FOREVER now when processing a turn.[/color]
      It[color=blue]
      > is the only program running on the machine, and services are at a minimum.
      > Even with 99% of the CPU resources free (IE on System Idle), the game will
      > never take more than about 7% of the processor time.
      >
      > This is extremely serious.
      >
      > We've tried increasing the priority of Java, but
      > a) The only way I know to do this is through the Task manager, meaning
      > it would have to be done every time we run the server
      > b) I increased the priority to "Real Time" and this had absolutely no
      > impact on the server process. The CPU load didn't change.
      >
      > This is the only program intended to run on this computer. We need it
      > hogging as many resources as it can. Database, development, everything's[/color]
      on[color=blue]
      > different systems. This machine has one job, run this Java program, and[/color]
      it's[color=blue]
      > not taking that job seriously.
      >
      > We don't know if it's a Windows issue, or a Java issue, but I suspect it's[/color]
      a[color=blue]
      > combination of the two. All we know is it used to run fast as hell, and[/color]
      now[color=blue]
      > crawls.
      >
      > This post is going to Java groups and Windows groups on the assumption[/color]
      that[color=blue]
      > something can be done on each end to improve things (perhaps there's a
      > command line parameter to tell java to run at a higher priority, perhaps
      > there's a windows issue not giving proper time to the Java App).
      >
      > Any thoughts?
      >
      > Thank you for your time.
      > Nick Soutter
      >
      >[/color]


      Comment

      • Roman

        #4
        Re: Game Company- Java Server Thread Priority

        What is the JDK you are running this Java program on?
        Have you considered running this application on a Linux system?

        Roman.

        "BlackHawke " <blackhawke@leg acygames.net> wrote in message
        news:C_4Qb.2347 3$1e.6174@newsr ead2.news.pas.e arthlink.net...[color=blue]
        > Hello!
        >
        > This is my second post. Ppl really helped me with the first. I hope there
        > are answers for this one as well
        >
        > I own a game company (www.aepoxgames.net) releasing the beta for our first
        > sci-fi space game in about 2 weeks (www.andromedaonline.net)
        >
        > We have multiple servers, but the game engine (Game Server Program) is a
        > Java program (don't ask why) on a windows 2003 enterprise system with dual
        > xeon p4 processors and 4GB of RAM. This program needs to process orders[/color]
        for[color=blue]
        > thousands of ships as fast as possible.
        >
        > When we first set this up, the Game Server Program took exactly 50% of the
        > CPU cycles when idle, and up to 80% or 90% when working (processing a[/color]
        turn,[color=blue]
        > for example) and could process a turn of 10,000 ships in 15 seconds.
        >
        > We revamped some of the major systems (the code and the computer itself),
        > did a fresh install of Windows 2003 on a different system (still dual[/color]
        Xeon,[color=blue]
        > but faster MB and CPU), migrated the Game Server Program there, changed[/color]
        the[color=blue]
        > threadpool priorities in the code, etc.
        >
        > We've now noticed that on idle (IE not processing turns), the Game Server
        > Program takes 0% of the CPU load, and when processing a turn goes up to
        > 3-7%. It never exceeds 7%, and takes FOREVER now when processing a turn.[/color]
        It[color=blue]
        > is the only program running on the machine, and services are at a minimum.
        > Even with 99% of the CPU resources free (IE on System Idle), the game will
        > never take more than about 7% of the processor time.
        >
        > This is extremely serious.
        >
        > We've tried increasing the priority of Java, but
        > a) The only way I know to do this is through the Task manager, meaning
        > it would have to be done every time we run the server
        > b) I increased the priority to "Real Time" and this had absolutely no
        > impact on the server process. The CPU load didn't change.
        >
        > This is the only program intended to run on this computer. We need it
        > hogging as many resources as it can. Database, development, everything's[/color]
        on[color=blue]
        > different systems. This machine has one job, run this Java program, and[/color]
        it's[color=blue]
        > not taking that job seriously.
        >
        > We don't know if it's a Windows issue, or a Java issue, but I suspect it's[/color]
        a[color=blue]
        > combination of the two. All we know is it used to run fast as hell, and[/color]
        now[color=blue]
        > crawls.
        >
        > This post is going to Java groups and Windows groups on the assumption[/color]
        that[color=blue]
        > something can be done on each end to improve things (perhaps there's a
        > command line parameter to tell java to run at a higher priority, perhaps
        > there's a windows issue not giving proper time to the Java App).
        >
        > Any thoughts?
        >
        > Thank you for your time.
        > Nick Soutter
        >
        >[/color]


        Comment

        • Roman

          #5
          Re: Game Company- Java Server Thread Priority

          What is the JDK you are running this Java program on?
          Have you considered running this application on a Linux system?

          Roman.

          "BlackHawke " <blackhawke@leg acygames.net> wrote in message
          news:C_4Qb.2347 3$1e.6174@newsr ead2.news.pas.e arthlink.net...[color=blue]
          > Hello!
          >
          > This is my second post. Ppl really helped me with the first. I hope there
          > are answers for this one as well
          >
          > I own a game company (www.aepoxgames.net) releasing the beta for our first
          > sci-fi space game in about 2 weeks (www.andromedaonline.net)
          >
          > We have multiple servers, but the game engine (Game Server Program) is a
          > Java program (don't ask why) on a windows 2003 enterprise system with dual
          > xeon p4 processors and 4GB of RAM. This program needs to process orders[/color]
          for[color=blue]
          > thousands of ships as fast as possible.
          >
          > When we first set this up, the Game Server Program took exactly 50% of the
          > CPU cycles when idle, and up to 80% or 90% when working (processing a[/color]
          turn,[color=blue]
          > for example) and could process a turn of 10,000 ships in 15 seconds.
          >
          > We revamped some of the major systems (the code and the computer itself),
          > did a fresh install of Windows 2003 on a different system (still dual[/color]
          Xeon,[color=blue]
          > but faster MB and CPU), migrated the Game Server Program there, changed[/color]
          the[color=blue]
          > threadpool priorities in the code, etc.
          >
          > We've now noticed that on idle (IE not processing turns), the Game Server
          > Program takes 0% of the CPU load, and when processing a turn goes up to
          > 3-7%. It never exceeds 7%, and takes FOREVER now when processing a turn.[/color]
          It[color=blue]
          > is the only program running on the machine, and services are at a minimum.
          > Even with 99% of the CPU resources free (IE on System Idle), the game will
          > never take more than about 7% of the processor time.
          >
          > This is extremely serious.
          >
          > We've tried increasing the priority of Java, but
          > a) The only way I know to do this is through the Task manager, meaning
          > it would have to be done every time we run the server
          > b) I increased the priority to "Real Time" and this had absolutely no
          > impact on the server process. The CPU load didn't change.
          >
          > This is the only program intended to run on this computer. We need it
          > hogging as many resources as it can. Database, development, everything's[/color]
          on[color=blue]
          > different systems. This machine has one job, run this Java program, and[/color]
          it's[color=blue]
          > not taking that job seriously.
          >
          > We don't know if it's a Windows issue, or a Java issue, but I suspect it's[/color]
          a[color=blue]
          > combination of the two. All we know is it used to run fast as hell, and[/color]
          now[color=blue]
          > crawls.
          >
          > This post is going to Java groups and Windows groups on the assumption[/color]
          that[color=blue]
          > something can be done on each end to improve things (perhaps there's a
          > command line parameter to tell java to run at a higher priority, perhaps
          > there's a windows issue not giving proper time to the Java App).
          >
          > Any thoughts?
          >
          > Thank you for your time.
          > Nick Soutter
          >
          >[/color]


          Comment

          • thoff

            #6
            Re: Game Company- Java Server Thread Priority

            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=blue]
            > We've now noticed that on idle (IE not processing turns), the Game Server
            > Program takes 0% of the CPU load, and when processing a turn goes up to
            > 3-7%. It never exceeds 7%, and takes FOREVER now when processing a turn. It
            > is the only program running on the machine, and services are at a minimum.
            > Even with 99% of the CPU resources free (IE on System Idle), the game will
            > never take more than about 7% of the processor time.[/color]

            Comment

            • thoff

              #7
              Re: Game Company- Java Server Thread Priority

              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=blue]
              > We've now noticed that on idle (IE not processing turns), the Game Server
              > Program takes 0% of the CPU load, and when processing a turn goes up to
              > 3-7%. It never exceeds 7%, and takes FOREVER now when processing a turn. It
              > is the only program running on the machine, and services are at a minimum.
              > Even with 99% of the CPU resources free (IE on System Idle), the game will
              > never take more than about 7% of the processor time.[/color]

              Comment

              • Y2KYZFR1

                #8
                Re: Game Company- Java Server Thread Priority

                "BlackHawke " <blackhawke@leg acygames.net> wrote in message news:<C_4Qb.234 73$1e.6174@news read2.news.pas. earthlink.net>. ..
                [color=blue]
                > We revamped some of the major systems (the code and the computer itself),[/color]

                you have introduced a major race condition somewhere, do some research
                on profilers and look at where the hotspot is.

                "We should forget about small efficiencies, say about 97% of the time:
                premature optimization is the root of all evil."

                - Knuth

                Comment

                • Y2KYZFR1

                  #9
                  Re: Game Company- Java Server Thread Priority

                  "BlackHawke " <blackhawke@leg acygames.net> wrote in message news:<C_4Qb.234 73$1e.6174@news read2.news.pas. earthlink.net>. ..
                  [color=blue]
                  > We revamped some of the major systems (the code and the computer itself),[/color]

                  you have introduced a major race condition somewhere, do some research
                  on profilers and look at where the hotspot is.

                  "We should forget about small efficiencies, say about 97% of the time:
                  premature optimization is the root of all evil."

                  - Knuth

                  Comment

                  • BlackHawke

                    #10
                    Re: Game Company- Java Server Thread Priority

                    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


                    "Mike Brannigan [MSFT]" <mikebran@onlin e.microsoft.com > wrote in message
                    news:OL2tQEZ4DH A.540@tk2msftng p13.phx.gbl...[color=blue]
                    > If all of the underlying system and setup of Windows is identical to the
                    > first system (with the exception of the hardware changes to faster
                    > components). Then unless it is a hardware issue (some setting in the BIOS
                    > to incorrectly set up the mother board or CPUs); then your statement about
                    > "revamped some of the major systems (the code and the computer itself)," -
                    > would lead you to possibly retest the system using the original code base
                    > for the application that was running on the old server. This will help
                    > eliminate your code changes as being the source of the error. (alternative
                    > path is to put your new code version on the old server and retest)
                    >
                    > --
                    > Regards,
                    >
                    > Mike
                    > --
                    > Mike Brannigan [Microsoft]
                    >
                    > This posting is provided "AS IS" with no warranties, and confers no
                    > rights
                    >
                    > Please note I cannot respond to e-mailed questions, please use these
                    > newsgroups
                    >
                    > "BlackHawke " <blackhawke@leg acygames.net> wrote in message
                    > news:C_4Qb.2347 3$1e.6174@newsr ead2.news.pas.e arthlink.net...[color=green]
                    > > Hello!
                    > >
                    > > This is my second post. Ppl really helped me with the first. I hope[/color][/color]
                    there[color=blue][color=green]
                    > > are answers for this one as well
                    > >
                    > > I own a game company (www.aepoxgames.net) releasing the beta for our[/color][/color]
                    first[color=blue][color=green]
                    > > sci-fi space game in about 2 weeks (www.andromedaonline.net)
                    > >
                    > > We have multiple servers, but the game engine (Game Server Program) is a
                    > > Java program (don't ask why) on a windows 2003 enterprise system with[/color][/color]
                    dual[color=blue][color=green]
                    > > xeon p4 processors and 4GB of RAM. This program needs to process orders[/color]
                    > for[color=green]
                    > > thousands of ships as fast as possible.
                    > >
                    > > When we first set this up, the Game Server Program took exactly 50% of[/color][/color]
                    the[color=blue][color=green]
                    > > CPU cycles when idle, and up to 80% or 90% when working (processing a[/color]
                    > turn,[color=green]
                    > > for example) and could process a turn of 10,000 ships in 15 seconds.
                    > >
                    > > We revamped some of the major systems (the code and the computer[/color][/color]
                    itself),[color=blue][color=green]
                    > > did a fresh install of Windows 2003 on a different system (still dual[/color]
                    > Xeon,[color=green]
                    > > but faster MB and CPU), migrated the Game Server Program there, changed[/color]
                    > the[color=green]
                    > > threadpool priorities in the code, etc.
                    > >
                    > > We've now noticed that on idle (IE not processing turns), the Game[/color][/color]
                    Server[color=blue][color=green]
                    > > Program takes 0% of the CPU load, and when processing a turn goes up to
                    > > 3-7%. It never exceeds 7%, and takes FOREVER now when processing a turn.[/color]
                    > It[color=green]
                    > > is the only program running on the machine, and services are at a[/color][/color]
                    minimum.[color=blue][color=green]
                    > > Even with 99% of the CPU resources free (IE on System Idle), the game[/color][/color]
                    will[color=blue][color=green]
                    > > never take more than about 7% of the processor time.
                    > >
                    > > This is extremely serious.
                    > >
                    > > We've tried increasing the priority of Java, but
                    > > a) The only way I know to do this is through the Task manager,[/color][/color]
                    meaning[color=blue][color=green]
                    > > it would have to be done every time we run the server
                    > > b) I increased the priority to "Real Time" and this had absolutely[/color][/color]
                    no[color=blue][color=green]
                    > > impact on the server process. The CPU load didn't change.
                    > >
                    > > This is the only program intended to run on this computer. We need it
                    > > hogging as many resources as it can. Database, development, everything's[/color]
                    > on[color=green]
                    > > different systems. This machine has one job, run this Java program, and[/color]
                    > it's[color=green]
                    > > not taking that job seriously.
                    > >
                    > > We don't know if it's a Windows issue, or a Java issue, but I suspect[/color][/color]
                    it's[color=blue]
                    > a[color=green]
                    > > combination of the two. All we know is it used to run fast as hell, and[/color]
                    > now[color=green]
                    > > crawls.
                    > >
                    > > This post is going to Java groups and Windows groups on the assumption[/color]
                    > that[color=green]
                    > > something can be done on each end to improve things (perhaps there's a
                    > > command line parameter to tell java to run at a higher priority, perhaps
                    > > there's a windows issue not giving proper time to the Java App).
                    > >
                    > > Any thoughts?
                    > >
                    > > Thank you for your time.
                    > > Nick Soutter
                    > >
                    > >[/color]
                    >
                    >[/color]


                    Comment

                    • BlackHawke

                      #11
                      Re: Game Company- Java Server Thread Priority

                      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


                      "Mike Brannigan [MSFT]" <mikebran@onlin e.microsoft.com > wrote in message
                      news:OL2tQEZ4DH A.540@tk2msftng p13.phx.gbl...[color=blue]
                      > If all of the underlying system and setup of Windows is identical to the
                      > first system (with the exception of the hardware changes to faster
                      > components). Then unless it is a hardware issue (some setting in the BIOS
                      > to incorrectly set up the mother board or CPUs); then your statement about
                      > "revamped some of the major systems (the code and the computer itself)," -
                      > would lead you to possibly retest the system using the original code base
                      > for the application that was running on the old server. This will help
                      > eliminate your code changes as being the source of the error. (alternative
                      > path is to put your new code version on the old server and retest)
                      >
                      > --
                      > Regards,
                      >
                      > Mike
                      > --
                      > Mike Brannigan [Microsoft]
                      >
                      > This posting is provided "AS IS" with no warranties, and confers no
                      > rights
                      >
                      > Please note I cannot respond to e-mailed questions, please use these
                      > newsgroups
                      >
                      > "BlackHawke " <blackhawke@leg acygames.net> wrote in message
                      > news:C_4Qb.2347 3$1e.6174@newsr ead2.news.pas.e arthlink.net...[color=green]
                      > > Hello!
                      > >
                      > > This is my second post. Ppl really helped me with the first. I hope[/color][/color]
                      there[color=blue][color=green]
                      > > are answers for this one as well
                      > >
                      > > I own a game company (www.aepoxgames.net) releasing the beta for our[/color][/color]
                      first[color=blue][color=green]
                      > > sci-fi space game in about 2 weeks (www.andromedaonline.net)
                      > >
                      > > We have multiple servers, but the game engine (Game Server Program) is a
                      > > Java program (don't ask why) on a windows 2003 enterprise system with[/color][/color]
                      dual[color=blue][color=green]
                      > > xeon p4 processors and 4GB of RAM. This program needs to process orders[/color]
                      > for[color=green]
                      > > thousands of ships as fast as possible.
                      > >
                      > > When we first set this up, the Game Server Program took exactly 50% of[/color][/color]
                      the[color=blue][color=green]
                      > > CPU cycles when idle, and up to 80% or 90% when working (processing a[/color]
                      > turn,[color=green]
                      > > for example) and could process a turn of 10,000 ships in 15 seconds.
                      > >
                      > > We revamped some of the major systems (the code and the computer[/color][/color]
                      itself),[color=blue][color=green]
                      > > did a fresh install of Windows 2003 on a different system (still dual[/color]
                      > Xeon,[color=green]
                      > > but faster MB and CPU), migrated the Game Server Program there, changed[/color]
                      > the[color=green]
                      > > threadpool priorities in the code, etc.
                      > >
                      > > We've now noticed that on idle (IE not processing turns), the Game[/color][/color]
                      Server[color=blue][color=green]
                      > > Program takes 0% of the CPU load, and when processing a turn goes up to
                      > > 3-7%. It never exceeds 7%, and takes FOREVER now when processing a turn.[/color]
                      > It[color=green]
                      > > is the only program running on the machine, and services are at a[/color][/color]
                      minimum.[color=blue][color=green]
                      > > Even with 99% of the CPU resources free (IE on System Idle), the game[/color][/color]
                      will[color=blue][color=green]
                      > > never take more than about 7% of the processor time.
                      > >
                      > > This is extremely serious.
                      > >
                      > > We've tried increasing the priority of Java, but
                      > > a) The only way I know to do this is through the Task manager,[/color][/color]
                      meaning[color=blue][color=green]
                      > > it would have to be done every time we run the server
                      > > b) I increased the priority to "Real Time" and this had absolutely[/color][/color]
                      no[color=blue][color=green]
                      > > impact on the server process. The CPU load didn't change.
                      > >
                      > > This is the only program intended to run on this computer. We need it
                      > > hogging as many resources as it can. Database, development, everything's[/color]
                      > on[color=green]
                      > > different systems. This machine has one job, run this Java program, and[/color]
                      > it's[color=green]
                      > > not taking that job seriously.
                      > >
                      > > We don't know if it's a Windows issue, or a Java issue, but I suspect[/color][/color]
                      it's[color=blue]
                      > a[color=green]
                      > > combination of the two. All we know is it used to run fast as hell, and[/color]
                      > now[color=green]
                      > > crawls.
                      > >
                      > > This post is going to Java groups and Windows groups on the assumption[/color]
                      > that[color=green]
                      > > something can be done on each end to improve things (perhaps there's a
                      > > command line parameter to tell java to run at a higher priority, perhaps
                      > > there's a windows issue not giving proper time to the Java App).
                      > >
                      > > Any thoughts?
                      > >
                      > > Thank you for your time.
                      > > Nick Soutter
                      > >
                      > >[/color]
                      >
                      >[/color]


                      Comment

                      • BlackHawke

                        #12
                        Re: Game Company- Java Server Thread Priority

                        We have, but honestly no one here is an experienced Linux Admin. We can't
                        afford an admin (we're WAY over budget), but we all know windows systems
                        pretty well, so.....

                        I'd do it if I could...

                        Nick
                        "Roman" <anonuser@shaw. ca> wrote in message
                        news:lIJQb.2528 34$JQ1.103869@p d7tw1no...[color=blue]
                        > What is the JDK you are running this Java program on?
                        > Have you considered running this application on a Linux system?
                        >
                        > Roman.
                        >
                        > "BlackHawke " <blackhawke@leg acygames.net> wrote in message
                        > news:C_4Qb.2347 3$1e.6174@newsr ead2.news.pas.e arthlink.net...[color=green]
                        > > Hello!
                        > >
                        > > This is my second post. Ppl really helped me with the first. I hope[/color][/color]
                        there[color=blue][color=green]
                        > > are answers for this one as well
                        > >
                        > > I own a game company (www.aepoxgames.net) releasing the beta for our[/color][/color]
                        first[color=blue][color=green]
                        > > sci-fi space game in about 2 weeks (www.andromedaonline.net)
                        > >
                        > > We have multiple servers, but the game engine (Game Server Program) is a
                        > > Java program (don't ask why) on a windows 2003 enterprise system with[/color][/color]
                        dual[color=blue][color=green]
                        > > xeon p4 processors and 4GB of RAM. This program needs to process orders[/color]
                        > for[color=green]
                        > > thousands of ships as fast as possible.
                        > >
                        > > When we first set this up, the Game Server Program took exactly 50% of[/color][/color]
                        the[color=blue][color=green]
                        > > CPU cycles when idle, and up to 80% or 90% when working (processing a[/color]
                        > turn,[color=green]
                        > > for example) and could process a turn of 10,000 ships in 15 seconds.
                        > >
                        > > We revamped some of the major systems (the code and the computer[/color][/color]
                        itself),[color=blue][color=green]
                        > > did a fresh install of Windows 2003 on a different system (still dual[/color]
                        > Xeon,[color=green]
                        > > but faster MB and CPU), migrated the Game Server Program there, changed[/color]
                        > the[color=green]
                        > > threadpool priorities in the code, etc.
                        > >
                        > > We've now noticed that on idle (IE not processing turns), the Game[/color][/color]
                        Server[color=blue][color=green]
                        > > Program takes 0% of the CPU load, and when processing a turn goes up to
                        > > 3-7%. It never exceeds 7%, and takes FOREVER now when processing a turn.[/color]
                        > It[color=green]
                        > > is the only program running on the machine, and services are at a[/color][/color]
                        minimum.[color=blue][color=green]
                        > > Even with 99% of the CPU resources free (IE on System Idle), the game[/color][/color]
                        will[color=blue][color=green]
                        > > never take more than about 7% of the processor time.
                        > >
                        > > This is extremely serious.
                        > >
                        > > We've tried increasing the priority of Java, but
                        > > a) The only way I know to do this is through the Task manager,[/color][/color]
                        meaning[color=blue][color=green]
                        > > it would have to be done every time we run the server
                        > > b) I increased the priority to "Real Time" and this had absolutely[/color][/color]
                        no[color=blue][color=green]
                        > > impact on the server process. The CPU load didn't change.
                        > >
                        > > This is the only program intended to run on this computer. We need it
                        > > hogging as many resources as it can. Database, development, everything's[/color]
                        > on[color=green]
                        > > different systems. This machine has one job, run this Java program, and[/color]
                        > it's[color=green]
                        > > not taking that job seriously.
                        > >
                        > > We don't know if it's a Windows issue, or a Java issue, but I suspect[/color][/color]
                        it's[color=blue]
                        > a[color=green]
                        > > combination of the two. All we know is it used to run fast as hell, and[/color]
                        > now[color=green]
                        > > crawls.
                        > >
                        > > This post is going to Java groups and Windows groups on the assumption[/color]
                        > that[color=green]
                        > > something can be done on each end to improve things (perhaps there's a
                        > > command line parameter to tell java to run at a higher priority, perhaps
                        > > there's a windows issue not giving proper time to the Java App).
                        > >
                        > > Any thoughts?
                        > >
                        > > Thank you for your time.
                        > > Nick Soutter
                        > >
                        > >[/color]
                        >
                        >[/color]


                        Comment

                        • BlackHawke

                          #13
                          Re: Game Company- Java Server Thread Priority

                          We have, but honestly no one here is an experienced Linux Admin. We can't
                          afford an admin (we're WAY over budget), but we all know windows systems
                          pretty well, so.....

                          I'd do it if I could...

                          Nick
                          "Roman" <anonuser@shaw. ca> wrote in message
                          news:lIJQb.2528 34$JQ1.103869@p d7tw1no...[color=blue]
                          > What is the JDK you are running this Java program on?
                          > Have you considered running this application on a Linux system?
                          >
                          > Roman.
                          >
                          > "BlackHawke " <blackhawke@leg acygames.net> wrote in message
                          > news:C_4Qb.2347 3$1e.6174@newsr ead2.news.pas.e arthlink.net...[color=green]
                          > > Hello!
                          > >
                          > > This is my second post. Ppl really helped me with the first. I hope[/color][/color]
                          there[color=blue][color=green]
                          > > are answers for this one as well
                          > >
                          > > I own a game company (www.aepoxgames.net) releasing the beta for our[/color][/color]
                          first[color=blue][color=green]
                          > > sci-fi space game in about 2 weeks (www.andromedaonline.net)
                          > >
                          > > We have multiple servers, but the game engine (Game Server Program) is a
                          > > Java program (don't ask why) on a windows 2003 enterprise system with[/color][/color]
                          dual[color=blue][color=green]
                          > > xeon p4 processors and 4GB of RAM. This program needs to process orders[/color]
                          > for[color=green]
                          > > thousands of ships as fast as possible.
                          > >
                          > > When we first set this up, the Game Server Program took exactly 50% of[/color][/color]
                          the[color=blue][color=green]
                          > > CPU cycles when idle, and up to 80% or 90% when working (processing a[/color]
                          > turn,[color=green]
                          > > for example) and could process a turn of 10,000 ships in 15 seconds.
                          > >
                          > > We revamped some of the major systems (the code and the computer[/color][/color]
                          itself),[color=blue][color=green]
                          > > did a fresh install of Windows 2003 on a different system (still dual[/color]
                          > Xeon,[color=green]
                          > > but faster MB and CPU), migrated the Game Server Program there, changed[/color]
                          > the[color=green]
                          > > threadpool priorities in the code, etc.
                          > >
                          > > We've now noticed that on idle (IE not processing turns), the Game[/color][/color]
                          Server[color=blue][color=green]
                          > > Program takes 0% of the CPU load, and when processing a turn goes up to
                          > > 3-7%. It never exceeds 7%, and takes FOREVER now when processing a turn.[/color]
                          > It[color=green]
                          > > is the only program running on the machine, and services are at a[/color][/color]
                          minimum.[color=blue][color=green]
                          > > Even with 99% of the CPU resources free (IE on System Idle), the game[/color][/color]
                          will[color=blue][color=green]
                          > > never take more than about 7% of the processor time.
                          > >
                          > > This is extremely serious.
                          > >
                          > > We've tried increasing the priority of Java, but
                          > > a) The only way I know to do this is through the Task manager,[/color][/color]
                          meaning[color=blue][color=green]
                          > > it would have to be done every time we run the server
                          > > b) I increased the priority to "Real Time" and this had absolutely[/color][/color]
                          no[color=blue][color=green]
                          > > impact on the server process. The CPU load didn't change.
                          > >
                          > > This is the only program intended to run on this computer. We need it
                          > > hogging as many resources as it can. Database, development, everything's[/color]
                          > on[color=green]
                          > > different systems. This machine has one job, run this Java program, and[/color]
                          > it's[color=green]
                          > > not taking that job seriously.
                          > >
                          > > We don't know if it's a Windows issue, or a Java issue, but I suspect[/color][/color]
                          it's[color=blue]
                          > a[color=green]
                          > > combination of the two. All we know is it used to run fast as hell, and[/color]
                          > now[color=green]
                          > > crawls.
                          > >
                          > > This post is going to Java groups and Windows groups on the assumption[/color]
                          > that[color=green]
                          > > something can be done on each end to improve things (perhaps there's a
                          > > command line parameter to tell java to run at a higher priority, perhaps
                          > > there's a windows issue not giving proper time to the Java App).
                          > >
                          > > Any thoughts?
                          > >
                          > > Thank you for your time.
                          > > Nick Soutter
                          > >
                          > >[/color]
                          >
                          >[/color]


                          Comment

                          • BlackHawke

                            #14
                            Re: Game Company- Java Server Thread Priority

                            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=blue]
                            > 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=green]
                            > > We've now noticed that on idle (IE not processing turns), the Game[/color][/color]
                            Server[color=blue][color=green]
                            > > Program takes 0% of the CPU load, and when processing a turn goes up to
                            > > 3-7%. It never exceeds 7%, and takes FOREVER now when processing a turn.[/color][/color]
                            It[color=blue][color=green]
                            > > is the only program running on the machine, and services are at a[/color][/color]
                            minimum.[color=blue][color=green]
                            > > Even with 99% of the CPU resources free (IE on System Idle), the game[/color][/color]
                            will[color=blue][color=green]
                            > > never take more than about 7% of the processor time.[/color][/color]


                            Comment

                            • BlackHawke

                              #15
                              Re: Game Company- Java Server Thread Priority

                              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=blue]
                              > 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=green]
                              > > We've now noticed that on idle (IE not processing turns), the Game[/color][/color]
                              Server[color=blue][color=green]
                              > > Program takes 0% of the CPU load, and when processing a turn goes up to
                              > > 3-7%. It never exceeds 7%, and takes FOREVER now when processing a turn.[/color][/color]
                              It[color=blue][color=green]
                              > > is the only program running on the machine, and services are at a[/color][/color]
                              minimum.[color=blue][color=green]
                              > > Even with 99% of the CPU resources free (IE on System Idle), the game[/color][/color]
                              will[color=blue][color=green]
                              > > never take more than about 7% of the processor time.[/color][/color]


                              Comment

                              Working...