473,473 Members | 1,415 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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
Jul 17 '05 #1
23 3618
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" <bl********@legacygames.net> wrote in message
news:C_*****************@newsread2.news.pas.earthl ink.net...
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

Jul 17 '05 #2
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" <bl********@legacygames.net> wrote in message
news:C_*****************@newsread2.news.pas.earthl ink.net...
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

Jul 17 '05 #3
What is the JDK you are running this Java program on?
Have you considered running this application on a Linux system?

Roman.

"BlackHawke" <bl********@legacygames.net> wrote in message
news:C_*****************@newsread2.news.pas.earthl ink.net...
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

Jul 17 '05 #4
What is the JDK you are running this Java program on?
Have you considered running this application on a Linux system?

Roman.

"BlackHawke" <bl********@legacygames.net> wrote in message
news:C_*****************@newsread2.news.pas.earthl ink.net...
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

Jul 17 '05 #5
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:
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.

Jul 17 '05 #6
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:
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.

Jul 17 '05 #7
"BlackHawke" <bl********@legacygames.net> wrote in message news:<C_*****************@newsread2.news.pas.earth link.net>...
We revamped some of the major systems (the code and the computer itself),


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
Jul 17 '05 #8
"BlackHawke" <bl********@legacygames.net> wrote in message news:<C_*****************@newsread2.news.pas.earth link.net>...
We revamped some of the major systems (the code and the computer itself),


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
Jul 17 '05 #9
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 "performance"
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]" <mi******@online.microsoft.com> wrote in message
news:OL*************@tk2msftngp13.phx.gbl...
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" <bl********@legacygames.net> wrote in message
news:C_*****************@newsread2.news.pas.earthl ink.net...
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


Jul 17 '05 #10
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 "performance"
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]" <mi******@online.microsoft.com> wrote in message
news:OL*************@tk2msftngp13.phx.gbl...
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" <bl********@legacygames.net> wrote in message
news:C_*****************@newsread2.news.pas.earthl ink.net...
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


Jul 17 '05 #11
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" <an******@shaw.ca> wrote in message
news:lIJQb.252834$JQ1.103869@pd7tw1no...
What is the JDK you are running this Java program on?
Have you considered running this application on a Linux system?

Roman.

"BlackHawke" <bl********@legacygames.net> wrote in message
news:C_*****************@newsread2.news.pas.earthl ink.net...
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


Jul 17 '05 #12
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" <an******@shaw.ca> wrote in message
news:lIJQb.252834$JQ1.103869@pd7tw1no...
What is the JDK you are running this Java program on?
Have you considered running this application on a Linux system?

Roman.

"BlackHawke" <bl********@legacygames.net> wrote in message
news:C_*****************@newsread2.news.pas.earthl ink.net...
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


Jul 17 '05 #13
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" <tm*@possibility.com> wrote in message
news:10*************@news.supernews.com...
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:
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.

Jul 17 '05 #14
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" <tm*@possibility.com> wrote in message
news:10*************@news.supernews.com...
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:
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.

Jul 17 '05 #15
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" <bl********@legacygames.net> wrote in message
news:av******************@newsread1.news.pas.earth link.net...
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" <tm*@possibility.com> wrote in message
news:10*************@news.supernews.com...
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:
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.


Jul 17 '05 #16
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" <bl********@legacygames.net> wrote in message
news:av******************@newsread1.news.pas.earth link.net...
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" <tm*@possibility.com> wrote in message
news:10*************@news.supernews.com...
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:
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.


Jul 17 '05 #17
BlackHawke wrote:
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 "performance"
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


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 : nm*@ion.le.ac.uk
Phone : +44 (0)116 2523548, Fax : +44 (0)116 2523555

Jul 17 '05 #18
BlackHawke wrote:
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 "performance"
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


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 : nm*@ion.le.ac.uk
Phone : +44 (0)116 2523548, Fax : +44 (0)116 2523555

Jul 17 '05 #19
[Followup set]

BlackHawke wrote:
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....


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.

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

Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation
Jul 17 '05 #20
[Followup set]

BlackHawke wrote:
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....


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.

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

Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation
Jul 17 '05 #21
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" <nm*@ion.le.ac.uk> wrote in message
news:bv**********@south.jnrs.ja.net...
BlackHawke wrote:
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 "performance" 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


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 : nm*@ion.le.ac.uk
Phone : +44 (0)116 2523548, Fax : +44 (0)116 2523555

Jul 17 '05 #22
BlackHawke wrote:
We do have dual Xeon processors...

Out of curiosity, is there a problem with hyperthreading?
Not that I know of.
Will we run faster
if we disable it?


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 : nm*@ion.le.ac.uk
Phone : +44 (0)116 2523548, Fax : +44 (0)116 2523555

Jul 17 '05 #23
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:
http://www.microsoft.com/windows2000...yperthread.asp
/>

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:
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" <nm*@ion.le.ac.uk> wrote in message
news:bv**********@south.jnrs.ja.net...
BlackHawke wrote:
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 "performance" 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


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.


--
| Grant Wagner <gw*****@agricoreunited.com>

Jul 17 '05 #24

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: step_y | last post by:
Those who is interested in computers, games can check out a free massive online strategy scifi game at http://www.spacefederation.net This game is also looking for staff, especially those in the...
1
by: BlackHawke | last post by:
Hello! My name is Nick Soutter, I am the owner of a small game company in San Diego, CA called Aepox Games (www.aepoxgames.net). Our first product, Andromeda Online...
138
by: theodp | last post by:
--> From http://www.techdirt.com/articles/20040406/1349225.shtml Microsoft Patents Saving The Name Of A Game Contributed by Mike on Tuesday, April 6th, 2004 @ 01:49PM from the...
1
by: step_y | last post by:
Those who is interested in computers, games can check out a free massive online strategy scifi game at http://www.spacefederation.net This game is also looking for staff, especially those in the...
1
by: step_y | last post by:
Those who is interested in computers, games can check out a free massive online strategy scifi game at http://www.spacefederation.net This game is also looking for staff, especially those in the...
0
by: step_y | last post by:
Those who is interested in computers, games can check out a free massive online strategy scifi game at http://www.spacefederation.net This game is also looking for staff, especially those in the...
1
by: fowle040 | last post by:
I underlined and bold print my files. I need to know how to make this code into a working game. The object of the game is to have two players 1- belle and 2-beast. I want them to lose and gain...
7
by: Gasten | last post by:
Hello. The last weeks I've been coding a roguelike (you know, like nethack) in python using the nCurses library. Some week ago I ran into a problem: When I made the object for messagebar-output, I...
2
by: senarup | last post by:
Hi I am a Flash Game Developer. Already developed more than 20 games for different companies. I need to change my present company. i hv more than 3 yrs, experience in 2D and 3d Game...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.