系统资源使用情况 [英] System resource usage

查看:62
本文介绍了系统资源使用情况的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不太确定哪些团体发布这个,所以没有一个庞大的

交叉点,我决定这两个。


我遇到了Win2k以及

系统上我们的应用程序的资源使用问题。在一些地方,我看到它说只有WinNT模型

限制了可用内存的资源。但是,我看到由于资源耗尽超过1GB可用内存的机器(运行

Win2k服务器)以及个人开发而导致的错误导致的错误机器(XP

专业)。


在终端服务器上,崩溃似乎恰好发生在
10,000个用户对象上(如任务管理员所示)。在我的系统上,它发生在大约7,000个用户对象的
上。在这种状态下,所有窗口都变得不稳定。

有些窗口不会显示,有些窗口会消失。似乎在

一段时间之后,Windows将决定关闭占用所有

资源的应用程序。这在终端服务器机器上花了很长时间。


我写了一个小测试项目,它只是弹出一个表格大约

a一百个控件。一旦你弹出了大约30个这样的表格,你就可以看到问题。我可以在这里发布代码,如果有人想要的话。


那么资源的限制是多少?我们该如何应对呢?在

a客户端站点,当出现错误时,他们会看到JIT调试器错误框。

任何帮助或参考将不胜感激。

Niall

解决方案

Niall,


当你说10000个用户对象时,你呢意味着10000个同时终端

服务器会话?如果你有10000个同时进行的Windows会话,即使只有几GB的内存,我也可以看到为什么机器会变得非常不稳定。


如果你只谈论10000个对象(就像你在.NET中用
写的自定义对象),那么我不明白为什么你会遇到这个问题,并且

发布代码有助于确定原因。

此外,你能否更好地描述出现的错误

当这种情况发生时?

-

- Nicholas Paldino [.NET / C#MVP]

- mv*@spam.guard.caspershouse.com


" Niall" <关于** @ me.com>在消息中写道

新闻:%2 **************** @ TK2MSFTNGP11.phx.gbl ...

我'我不太确定将这个发布到哪个群体,因此没有大量的交叉链接,我决定使用这两个。

我遇到了Win2k上我们应用的资源使用问题和系统上方的
。在一些地方,我看到它说WinNT模型只限制可用内存的资源。但是,我看到错误导致
的资源耗尽超过1GB可用内存的机器
(运行Win2k服务器),以及我的个人开发机器(XP
专业版)在终端服务器上,崩溃似乎恰好发生在10,000个用户对象上(如任务管理器所示)。在我的系统上,大约7,000个用户对象发生
。在这种状态下,所有的窗户都会变得不稳定。
有些窗户不会出现,有些窗户会消失。似乎在
一段时间后,Windows将决定关闭应用程序占用所有的资源。这在终端服务器机器上花了很长时间。

我写了一个小测试项目,它所做的就是弹出一个表格,上面有
大约一百个控件。一旦弹出大约30个这些表单,您就可以看到问题。如果有人想要,我可以在这里发布代码。

那么资源的限制是多少?我们该如何应对呢?
在客户端站点,当出现错误时,他们会看到JIT调试器错误
框。任何帮助或参考将不胜感激。

Niall



用户对象是从桌面堆分配的在W2K上有一个系统宽的
大小为48MB,这个堆由三个共享部分组成,第一个

对所有桌面都是通用的,第二个是每个交互式桌面,以及

第三个是为非交互式桌面保留的。




时,三个不同堆的值取自注册表CSRSS流程开始

(参见:HKEY_LOCAL_MACHINE \SYSTEM \ CurrentControlSet \ C ontrol \Session

Manager \ SubSystems \ Windows),你能做的就是在那里找到了

值,并注意所有堆的总和必须符合48

MB !!!


Willy。


" Niall" <关于** @ me.com>在消息中写道

新闻:%2 **************** @ TK2MSFTNGP11.phx.gbl ...

我'我不太确定将这个发布到哪个群体,因此没有大量的交叉链接,我决定使用这两个。

我遇到了Win2k上我们应用的资源使用问题和系统上方的
。在一些地方,我看到它说WinNT模型只限制可用内存的资源。但是,我看到错误导致
的资源耗尽超过1GB可用内存的机器
(运行Win2k服务器),以及我的个人开发机器(XP
专业版)在终端服务器上,崩溃似乎恰好发生在10,000个用户对象上(如任务管理器所示)。在我的系统上,大约7,000个用户对象发生
。在这种状态下,所有的窗户都会变得不稳定。
有些窗户不会出现,有些窗户会消失。似乎在
一段时间后,Windows将决定关闭应用程序占用所有的资源。这在终端服务器机器上花了很长时间。

我写了一个小测试项目,它所做的就是弹出一个表格,上面有
大约一百个控件。一旦弹出大约30个这些表单,您就可以看到问题。如果有人想要,我可以在这里发布代码。

那么资源的限制是多少?我们该如何应对呢?
在客户端站点,当出现错误时,他们会看到JIT调试器错误
框。任何帮助或参考将不胜感激。

Niall



Nicholas,

对不起,看来我的帖子很混乱。我指的是Windows资源

用户对象(您可以在任务管理器中看到给定进程),

不是托管堆或终端服务器会话上的对象。根据我的意思,请参阅Willy的

帖子。这与旧的Windows 95东西类似的问题

,当你用完GDI或用户资金后,计算机变得非常不稳定。我读过这些资源是无限制的。在NT模型中,

但Willy似乎比我读过的地方更有知名度。


测试代码我只是有一个简单的形式,我只是与设计师一起扔了一堆

控件。在我的机器上打开大约30个该表格的实例将导致资源问题,新窗口将无法显示等等,直到我关闭应用程序和XP可以收回所有资源。


Niall


Nicholas Paldino [.NET / C#MVP]" < mv*@spam.guard.caspershouse.com>写在

消息新闻:uA ************** @ TK2MSFTNGP12.phx.gbl ...

Niall,
当你说10000个用户对象时,你的意思是10000个同时
终端服务器会话?如果你有10000个同时进行的Windows会话,即使是带有几GB内存的
,我也可以看到为什么机器会变得非常不稳定。

如果你说的只是10000对象(如在.NET中编写的自定义对象
),然后我不明白为什么会出现这个问题,并且发布代码将有助于确定原因。另外,当这种情况发生时,你能更好地描述出现的错误吗?

-
- Nicholas Paldino [.NET / C#MVP]
- mv*@spam.guard.caspershouse.com

;尼尔" <关于** @ me.com>在消息中写道
新闻:%2 **************** @ TK2MSFTNGP11.phx.gbl ...

我不太喜欢确定哪些团体发布到这里,如此短暂的大量交叉点,我决定了这两个。

我遇到了在Win2k上我们的应用程序的资源使用问题和

上面的

系统。在一些地方,我看到它说WinNT模型
只限制可用内存的资源。但是,我看到

错误导致


在超过1GB可用内存的机器上耗尽资源


(运行

Win2k服务器),以及我的个人开发机器(XP
专业)。

在终端服务器机器上,崩溃似乎恰好发生在
10,000个用户对象(如任务管理器所示)。在我的系统上,它发生在

大约7,000个用户对象的


。在这种状态下,所有窗口都变为
不稳定。有些窗户不会出现,有些窗户会消失。看起来像
一段时间后,windows将决定关闭应用程序占用所有的资源。这在终端服务器机器上花了很长时间。

我写了一个小测试项目,它只是弹出一个带


的表格,关于

一百个控件。一旦你弹出大约30个这样的表格,你
可以看到问题。如果有人想要,我可以在这里发布代码。

那么资源的限制是多少?我们应该如何处理这个?


一个客户端站点,当出现错误时,他们会看到JIT调试器错误


框。

非常感谢任何帮助或参考。

Niall




I''m not quite sure which groups to post this to, so short of a massive
crosspost, I decided on these two.

I am running into troubles with resource usage of our app on Win2k and above
systems. In several places, I have seen it said that the WinNT model only
limits resources to available memory. However, I have seen errors caused by
running out of resources on a machine with over 1GB of free memory (running
Win2k server), as well as on my personal development machine (XP
professional).

On the terminal server machine, the crash appears to happen at exactly
10,000 user objects (as shown by task manager). On my system, it happens at
around 7,000 user objects. In this state, all of windows becomes unstable.
Some windows will not show up, others will disappear. It seems like after
some time, windows will decide to shut down the app hogging all the
resources. This took a very long time on the terminal server machine.

I have written a small test project, all it does is pop up a form with about
a hundred controls on it. Once you pop up about 30 of these forms, you can
see the problem. I can post the code here, if anyone wants it.

So what is the limit with resources? How are we supposed to handle this? At
a client site, when the error comes up, they see the JIT debugger error box.
Any help or references would be greatly appreciated.

Niall

解决方案

Niall,

When you say 10000 user objects, do you mean 10000 simultaneous terminal
server sessions? If you have 10000 simultaneous windows sessions, even with
a few GB of memory, I can see why the machine would become extremely
unstable.

If you are speaking about just 10000 objects (as in a custom object you
wrote in .NET), then I don''t see why you would have this problem, and
posting the code would be helpful in determining the cause.

Also, can you be more descriptive about the error that is popping up
when this situation occurs?
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Niall" <as**@me.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...

I''m not quite sure which groups to post this to, so short of a massive
crosspost, I decided on these two.

I am running into troubles with resource usage of our app on Win2k and above systems. In several places, I have seen it said that the WinNT model only
limits resources to available memory. However, I have seen errors caused by running out of resources on a machine with over 1GB of free memory (running Win2k server), as well as on my personal development machine (XP
professional).

On the terminal server machine, the crash appears to happen at exactly
10,000 user objects (as shown by task manager). On my system, it happens at around 7,000 user objects. In this state, all of windows becomes unstable.
Some windows will not show up, others will disappear. It seems like after
some time, windows will decide to shut down the app hogging all the
resources. This took a very long time on the terminal server machine.

I have written a small test project, all it does is pop up a form with about a hundred controls on it. Once you pop up about 30 of these forms, you can
see the problem. I can post the code here, if anyone wants it.

So what is the limit with resources? How are we supposed to handle this? At a client site, when the error comes up, they see the JIT debugger error box. Any help or references would be greatly appreciated.

Niall



User objects are allocated from the desktop heap which has a system wide
size of 48MB on W2K, this heap consists of three sharedsections, the first
is common to all desktops, the second is per interactive deskto, and the
third is reserved for non interactive desktops.

The values for the three distinct heaps is taken from the registry when the
CSRSS process starts
(see:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\C ontrol\Session
Manager\SubSystems\Windows), what you could do is paly a little bit with the
values found in there taking care that the sum of all heaps must fit into 48
MB!!!

Willy.

"Niall" <as**@me.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...

I''m not quite sure which groups to post this to, so short of a massive
crosspost, I decided on these two.

I am running into troubles with resource usage of our app on Win2k and above systems. In several places, I have seen it said that the WinNT model only
limits resources to available memory. However, I have seen errors caused by running out of resources on a machine with over 1GB of free memory (running Win2k server), as well as on my personal development machine (XP
professional).

On the terminal server machine, the crash appears to happen at exactly
10,000 user objects (as shown by task manager). On my system, it happens at around 7,000 user objects. In this state, all of windows becomes unstable.
Some windows will not show up, others will disappear. It seems like after
some time, windows will decide to shut down the app hogging all the
resources. This took a very long time on the terminal server machine.

I have written a small test project, all it does is pop up a form with about a hundred controls on it. Once you pop up about 30 of these forms, you can
see the problem. I can post the code here, if anyone wants it.

So what is the limit with resources? How are we supposed to handle this? At a client site, when the error comes up, they see the JIT debugger error box. Any help or references would be greatly appreciated.

Niall



Nicholas,

Sorry, it appears my post was confusing. I was referring to Windows Resource
User Objects (which you can see in the task manager for a given process),
not objects on the managed heap or terminal server sessions. See Willy''s
post for what I mean. This is a similar problem to the old Windows 95 stuff
where the computer became terribly unstable after you ran out of GDI or User
resources. I had read that these resources are "unlimited" in the NT model,
but Willy seems to be more in the know than the places I''ve been reading.

The test code I have just has a plain form which I just chucked a bunch of
controls onto with the designer. Opening up about 30 instances of that form
on my machine will cause resource problems, new windows won''t be able to
show, etc, until I close the app and XP can reclaim all the resources.

Niall

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote in
message news:uA**************@TK2MSFTNGP12.phx.gbl...

Niall,

When you say 10000 user objects, do you mean 10000 simultaneous terminal server sessions? If you have 10000 simultaneous windows sessions, even with a few GB of memory, I can see why the machine would become extremely
unstable.

If you are speaking about just 10000 objects (as in a custom object you wrote in .NET), then I don''t see why you would have this problem, and
posting the code would be helpful in determining the cause.

Also, can you be more descriptive about the error that is popping up
when this situation occurs?
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Niall" <as**@me.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...

I''m not quite sure which groups to post this to, so short of a massive
crosspost, I decided on these two.

I am running into troubles with resource usage of our app on Win2k and


above

systems. In several places, I have seen it said that the WinNT model only limits resources to available memory. However, I have seen errors caused


by

running out of resources on a machine with over 1GB of free memory


(running

Win2k server), as well as on my personal development machine (XP
professional).

On the terminal server machine, the crash appears to happen at exactly
10,000 user objects (as shown by task manager). On my system, it happens


at

around 7,000 user objects. In this state, all of windows becomes unstable. Some windows will not show up, others will disappear. It seems like after some time, windows will decide to shut down the app hogging all the
resources. This took a very long time on the terminal server machine.

I have written a small test project, all it does is pop up a form with


about

a hundred controls on it. Once you pop up about 30 of these forms, you can see the problem. I can post the code here, if anyone wants it.

So what is the limit with resources? How are we supposed to handle this?


At

a client site, when the error comes up, they see the JIT debugger error


box.

Any help or references would be greatly appreciated.

Niall




这篇关于系统资源使用情况的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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