游戏公司 - Java服务器线程优先级 [英] Game Company- Java Server Thread Priority

查看:79
本文介绍了游戏公司 - Java服务器线程优先级的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好!


这是我的第二篇文章。 Ppl真的帮了我第一个。我希望

也是这个的答案


我拥有一家游戏公司( www.aepoxgames.net )在大约2周内发布我们的第一个

科幻空间游戏的测试版( www.andromedaonline.net


我们有多台服务器,但是游戏引擎(游戏服务器程序)是一个在Windows 2003企业系统上的Java程序(不要问为什么),带有双处理器和4GB的4GB处理器。内存。这个程序需要尽快处理成千上万艘船的订单。


当我们第一次设置时,游戏服务器程序正好占了50%空闲时的
CPU周期,工作时高达80%或90%(处理转弯,例如
)并且可以处理10,000个船只15秒。


我们修改了一些主要系统(代码和计算机本身),

在另一个系统上重新安装了Windows 2003 (仍然是双Xeon,

但更快的MB和CPU),迁移了游戏服务器程序,更改了代码中的

线程池优先级等。


我们现在已经注意到,在空闲时(IE不处理转弯),游戏服务器

程序占用CPU负载的0%,并且处理转弯时上升到
3-7%。它永远不会超过7%,并且在处理转弯时现在需要FOREVER。它是
是机器上运行的唯一程序,服务最少。

即使有99%的CPU资源空闲(IE on System Idle),游戏将会花费大约7%的处理器时间。


这是非常严重的。


我们已经尝试过提高Java的优先级,但是

a)我知道这样做的唯一方法是通过任务管理器,这意味着

它必须是每次我们运行服务器时都会完成

b)我将优先级提高到实时这对服务器进程完全没有影响
。 CPU负载没有变化。


这是唯一一个打算在这台计算机上运行的程序。我们需要它来赚取尽可能多的资源。数据库,开发,一切都在

不同的系统。这台机器有一个工作,运行这个Java程序,并且它没有认真对待这个工作。


我们不知道是不是'是Windows问题,或Java问题,但我怀疑它是两个组合的
。我们所知道的是,它曾经像地狱一样快速运行,而且现在已经b / b
了。


这篇文章是基于Java组和Windows组的假设

可以在每一端做一些改进的事情(也许有一个

命令行参数告诉java以更高的优先级运行,也许

有一个窗口问题没有给Java App提供适当的时间。)


有什么想法吗?


谢谢你你的时间。

Nick Soutter

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

推荐答案

如果Windows的所有底层系统和设置都与
第一个系统(硬件更改除外更快

组件)。然后,除非是硬件问题(BIOS中的一些设置

错误地设置主板或CPU);那么你关于

的声明修改了一些主要系统(代码和计算机本身), -

会导致您使用原始代码库重新测试系统

用于在旧服务器上运行的应用程序。这将有助于消除代码更改,因为它是错误的来源。 (替代

路径是将新代码版本放在旧服务器上并重新测试)


-

问候,


迈克

-

Mike Brannigan [微软]


这个帖子是提供按原样没有保证,并且不授予

权利


请注意我无法回复电子邮件问题,请使用这些

新闻组


" BlackHawke" < BL ******** @ legacygames.net>在消息中写道

新闻:C _ ***************** @ newsread2.news.pas.earthl ink.net ...
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...
你好!

这是我的第二篇文章。 Ppl真的帮了我第一个。我希望有这个答案也是这个答案

我拥有一家游戏公司( www.aepoxgames.net )在大约2周内发布我们的第一个科幻太空游戏的测试版( www.andromedaonline.net

我们有多个服务器,但游戏引擎(Game Server Program)是一个
Java程序(不要问为什么)在具有双xoon p4处理器和4GB RAM的Windows 2003企业系统上。该程序需要尽快处理成千上万艘船的订单


当我们第一次设置时,游戏服务器程序占用了50%的CPU周期闲置时,工作时高达80%或90%(例如处理
转弯)并可在15秒内处理10,000发船。

我们改造了一些主要系统(代码和计算机本身),在不同的系统上完成了Windows 2003的全新安装(仍然是双重
Xeon,但更快的MB和CPU),迁移了游戏服务器程序,改变了
代码中的线程池优先级等。

我们现在已经注意到,在空闲时(IE不处理转弯),游戏服务器
程序占用了0%的CPU负载,处理转弯时上升到3-7%。它永远不会超过7%,并且在处理转弯时现在需要FOREVER。
它是机器上运行的唯一程序,服务至少是。
即使99%的CPU资源空闲(IE on System Idle),游戏也将永远不会占用超过7%的处理器时间。

这是非常严重的。

我们已经尝试过提高Java的优先级,但是
a)我知道这样做的唯一方法是通过任务管理器,这意味着每次我们运行服务器时都必须这样做。
b)我将优先级提高到实时状态。这对服务器进程完全没有影响。 CPU负载没有变化。

这是唯一一个打算在这台计算机上运行的程序。我们需要它尽可能多地占用资源。数据库,开发,不同系统上的所有东西都是
。这台机器有一个工作,运行这个Java程序,并且
它没有认真对待这个工作。

我们不知道它是Windows问题还是Java问题,但我怀疑它是
a两者的组合。我们所知道的是,它过去常常运行得快,而且
现在正在爬行。

这篇文章是假设
假设
可以做些事情的Java组和Windows组在每一端改进的东西(也许有一个命令行参数告诉java以更高的优先级运行,也许
有一个窗口问题没有给Java App提供适当的时间)。

有什么想法吗?

感谢您的时间。
Nick Soutter
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


如果Windows的所有底层系统和设置都与

第一个系统相同(除了硬件更改为更快的

组件)。然后,除非是硬件问题(BIOS中的一些设置

错误地设置主板或CPU);那么你关于

的声明修改了一些主要系统(代码和计算机本身), -

会导致您使用原始代码库重新测试系统

用于在旧服务器上运行的应用程序。这将有助于消除代码更改,因为它是错误的来源。 (替代

路径是将新代码版本放在旧服务器上并重新测试)


-

问候,


迈克

-

Mike Brannigan [微软]


这个帖子是提供按原样没有保证,并且不授予

权利


请注意我无法回复电子邮件问题,请使用这些

新闻组


" BlackHawke" < BL ******** @ legacygames.net>在消息中写道

新闻:C _ ***************** @ newsread2.news.pas.earthl ink.net ...
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...
你好!

这是我的第二篇文章。 Ppl真的帮了我第一个。我希望有这个答案也是这个答案

我拥有一家游戏公司( www.aepoxgames.net )在大约2周内发布我们的第一个科幻太空游戏的测试版( www.andromedaonline.net

我们有多个服务器,但游戏引擎(Game Server Program)是一个
Java程序(不要问为什么)在具有双xoon p4处理器和4GB RAM的Windows 2003企业系统上。该程序需要尽快处理成千上万艘船的订单


当我们第一次设置时,游戏服务器程序占用了50%的CPU周期闲置时,工作时高达80%或90%(例如处理
转弯)并可在15秒内处理10,000发船。

我们改造了一些主要系统(代码和计算机本身),在不同的系统上完成了Windows 2003的全新安装(仍然是双重
Xeon,但更快的MB和CPU),迁移了游戏服务器程序,改变了
代码中的线程池优先级等。

我们现在已经注意到,在空闲时(IE不处理转弯),游戏服务器
程序占用了0%的CPU负载,处理转弯时上升到3-7%。它永远不会超过7%,并且在处理转弯时现在需要FOREVER。
它是机器上运行的唯一程序,服务至少是。
即使99%的CPU资源空闲(IE on System Idle),游戏也将永远不会占用超过7%的处理器时间。

这是非常严重的。

我们已经尝试过提高Java的优先级,但是
a)我知道这样做的唯一方法是通过任务管理器,这意味着每次我们运行服务器时都必须这样做。
b)我将优先级提高到实时状态。这对服务器进程完全没有影响。 CPU负载没有变化。

这是唯一一个打算在这台计算机上运行的程序。我们需要它尽可能多地占用资源。数据库,开发,不同系统上的所有东西都是
。这台机器有一个工作,运行这个Java程序,并且
它没有认真对待这个工作。

我们不知道它是Windows问题还是Java问题,但我怀疑它是
a两者的组合。我们所知道的是,它过去常常运行得快,而且
现在正在爬行。

这篇文章是假设
假设
可以做些事情的Java组和Windows组在每一端改进的东西(也许有一个命令行参数告诉java以更高的优先级运行,也许
有一个窗口问题没有给Java App提供适当的时间)。

有什么想法吗?

感谢您的时间。
Nick Soutter
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


您运行此Java程序的JDK是什么?

您是否考虑过在Linux系统上运行此应用程序?


Roman。


" BlackHawke" < BL ******** @ legacygames.net>在消息中写道

新闻:C _ ***************** @ newsread2.news.pas.earthl ink.net ...
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...
你好!

这是我的第二篇文章。 Ppl真的帮了我第一个。我希望有这个答案也是这个答案

我拥有一家游戏公司( www.aepoxgames.net )在大约2周内发布我们的第一个科幻太空游戏的测试版( www.andromedaonline.net

我们有多个服务器,但游戏引擎(Game Server Program)是一个
Java程序(不要问为什么)在具有双xoon p4处理器和4GB RAM的Windows 2003企业系统上。该程序需要尽快处理成千上万艘船的订单


当我们第一次设置时,游戏服务器程序占用了50%的CPU周期闲置时,工作时高达80%或90%(例如处理
转弯)并可在15秒内处理10,000发船。

我们改造了一些主要系统(代码和计算机本身),在不同的系统上完成了Windows 2003的全新安装(仍然是双重
Xeon,但更快的MB和CPU),迁移了游戏服务器程序,改变了
代码中的线程池优先级等。

我们现在已经注意到,在空闲时(IE不处理转弯),游戏服务器
程序占用了0%的CPU负载,处理转弯时上升到3-7%。它永远不会超过7%,并且在处理转弯时现在需要FOREVER。
它是机器上运行的唯一程序,服务至少是。
即使99%的CPU资源空闲(IE on System Idle),游戏也将永远不会占用超过7%的处理器时间。

这是非常严重的。

我们已经尝试过提高Java的优先级,但是
a)我知道这样做的唯一方法是通过任务管理器,这意味着每次我们运行服务器时都必须这样做。
b)我将优先级提高到实时状态。这对服务器进程完全没有影响。 CPU负载没有变化。

这是唯一一个打算在这台计算机上运行的程序。我们需要它尽可能多地占用资源。数据库,开发,不同系统上的所有东西都是
。这台机器有一个工作,运行这个Java程序,并且
它没有认真对待这个工作。

我们不知道它是Windows问题还是Java问题,但我怀疑它是
a两者的组合。我们所知道的是,它过去常常运行得快,而且
现在正在爬行。

这篇文章是假设
假设
可以做些事情的Java组和Windows组在每一端改进的东西(也许有一个命令行参数告诉java以更高的优先级运行,也许
有一个窗口问题没有给Java App提供适当的时间)。

有什么想法吗?

感谢您的时间。
Nick Soutter
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


这篇关于游戏公司 - Java服务器线程优先级的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆