最大.net进程可以使用 [英] maximum .net process can use

查看:63
本文介绍了最大.net进程可以使用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




我的生产机器有2G的内存,当aspnet_wp.exe上升到大约

~1.2G的内存使用量时,我开始得到内存不足的异常。其他进程

不要使用尽可能多的内存,我添加了所有

进程(包括aspnet_wp.exe)的所有峰值内存使用量,它达到了超过1.5。


怎么可能?有谁知道请帮忙吗?谢谢!

Hi,

My production machine has 2G of memory, when aspnet_wp.exe goes up to about
~1.2G of memory usage, I start get out-of-memory exception. Other processes
don''t use as much memory and I added all the peak memory usage of all the
processes (including aspnet_wp.exe), it goes up to no more than 1.5.

How is that possible? Would anyone know please help? thanks!

推荐答案

首先在任务管理器中查看提交费用。这是总体上承诺各个进程的内存

,加上操作系统的内存要求


见如何总与限制相比较。限制将实际上是你拥有的物理内存量加上你的调页空间。


" Zen" < ze*@nononospam.com>在留言中写道

新闻:%2 **************** @ TK2MSFTNGP14.phx.gbl ...
Firstly in Task Manager look at your "Commit Charge". This is the memory
committed to individual processes in total, plus the operating system''s
memory requirements.

See how the "total" compares to the "limit". The limit will effectively be
the amount of physical RAM that you have plus your paging space.

"Zen" <ze*@nononospam.com> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...


我的生产机器有2G的内存,当aspnet_wp.exe上升到大约1.2G的内存使用量时,我开始得到内存不足的异常。其他
进程没有使用尽可能多的内存,我添加了所有进程的峰值内存使用量(包括aspnet_wp.exe),它不超过1.5。

这怎么可能?有谁知道请帮忙吗?谢谢!
Hi,

My production machine has 2G of memory, when aspnet_wp.exe goes up to
about ~1.2G of memory usage, I start get out-of-memory exception. Other
processes don''t use as much memory and I added all the peak memory usage
of all the processes (including aspnet_wp.exe), it goes up to no more than
1.5.

How is that possible? Would anyone know please help? thanks!





" Zen" < ze*@nononospam.com>在留言中写道

news:%2 **************** @ TK2MSFTNGP14.phx.gbl ...

|

|

|我的生产机器有2G内存,当aspnet_wp.exe上升到

大约

| ~1.2G的内存使用量,我开始得到内存不足异常。其他

流程

|不要使用尽可能多的内存,我添加了所有

|的所有峰值内存使用量进程(包括aspnet_wp.exe),最多不超过1.5。

|

|怎么可能?有谁知道请帮忙吗?谢谢!

|

|


RAM的数量是一回事,但最重要的是
您的进程已分配的虚拟内存。

每个Windows进程(32位未启用/ 4GT)最多为2GB虚拟

地址空间(VAS )。这个空间用于映射ASP.NET

worker的代码,CLR是C运行时的代码,还有一些其他的DLL加上你的

应用程序代码( IL和JIT'代码)原生进程堆和GC

堆。

所以当你说aspnet_wp.exe达到~1.2GB时你必须知道

正是你正在看什么以及你正在使用什么工具。

无论如何,你永远不应该假设你有2GB可用,你应该知道

你的应用程序并仔细查看你的分配模式和你要分配的

类型的对象,注意大对象(> 85kb)

这些往往会破坏大对象堆(特别是在v1.x中),并且你应该总是准备
,以便特别在

服务器应用程序中抛出OOM异常。


Willy。

"Zen" <ze*@nononospam.com> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
| Hi,
|
| My production machine has 2G of memory, when aspnet_wp.exe goes up to
about
| ~1.2G of memory usage, I start get out-of-memory exception. Other
processes
| don''t use as much memory and I added all the peak memory usage of all the
| processes (including aspnet_wp.exe), it goes up to no more than 1.5.
|
| How is that possible? Would anyone know please help? thanks!
|
|

The amount of RAM is one thing, but the most important is the amount of
Virtual memory your process has allocated.
Each windows process (32 bit not /4GT enabled) has a maximum of 2GB Virtual
Address Space (VAS). This space is used to map the code of the ASP.NET
worker the CLR the C runtime and a couple of other DLL''s plus your
application code (the IL and JIT''d code) the native process heaps and the GC
heaps.
So when you say that aspnet_wp.exe goes up to ~1.2GB you have to know
exactly what you are looking at and what tool you are using for this.
Anyway, you should never assume you have 2GB available, you should profile
your application and have a close look at your allocation patterns and the
type of objects you are allocating, take care about large objects (>85kb)
these tend to fragment the large object heap (especially in v1.x), and you
should always be prepared to get OOM exceptions thrown on you especially in
server applications.

Willy.


我使用随窗口附带的taskmanager来查看内存使用情况info。


如果我向服务器添加另一个G或2会有帮助吗?显然每个进程

最多只能使用2G内存,但其他项目包括操作系统本身

将占用大量内存总量,为asp留下更少的内存.net。

我不知道问题的答案,因为以下2项

相互矛盾:

1 )随着虚拟内存系统和足够的硬盘空间,asp.net进程

已经基本上可以使用2G的内存,所以增加物理内存

只会加速(更少)交换页面错误)但是没有帮助减少OOM异常可能性。
我在硬盘上的最大页面文件大小是

1.5G。

2)然而,当我从1G移动到2G物理内存时,系统不再是

和以前一样经常进入OOM。使用1G,它永远不会将我的所有数据加载到内存中进行处理而不会看到OOM。显然添加更多

物理内存确实有帮助。


重新解释我原来的问题,如果我能负担任何我想要的内存大小,

哪个金额是我可以受益的最大金额?某处必须有一个停止点b $ b点。我认为这是2G但是我可能错了,希望

我错了,因为让我的代码工作的内存量更小将是非常昂贵的。

谢谢!

zeng


" Willy Denoyette [MVP]" <无线************* @ telenet.be>在消息中写道

news:eW ************** @ TK2MSFTNGP11.phx.gbl ...
I used taskmanager that came with window to look at the memory usage info.

Would it help if I add another G or 2 to the server? Apparently each process
can use only up to 2G max of memory, but other items including the OS itself
would occupy a big junk of total memory leaving less memory for the asp.net.
I don''t know the answer the question to that because the following 2 items
contradicting to each other:
1) With virtual memory system and enough harddisk space, the asp.net process
is already virtually working with 2G of memory, so adding physical memory
would only speed up (less swapping with page faults) but woudn''t help
reducing OOM exception likelihood. My max page file size on harddisk is
1.5G.
2) However, when I moved from 1G to 2G physical memory, the system no longer
ran into OOM as often as before. With 1G, it could never load all my data
into memory for processing without seeing OOMs. Apparently adding more
physical memory did help.

To rephrase my original question, if I can afford any memory size I want,
which amount would be the max I can benefit from? There must be a stopping
point somewhere. I thought it was 2G but I could be wrong and hoping that
I''m wrong because making my code to work with smaller memory amount would be
very costly.

thanks!
zeng

"Willy Denoyette [MVP]" <wi*************@telenet.be> wrote in message
news:eW**************@TK2MSFTNGP11.phx.gbl...

" ;禅" < ze*@nononospam.com>在消息中写道
新闻:%2 **************** @ TK2MSFTNGP14.phx.gbl ...
|
|
|我的生产机器有2G内存,当aspnet_wp.exe上升到

| ~1.2G的内存使用量,我开始得到内存不足异常。其他
过程
|不要使用尽可能多的内存,我添加了所有的峰值内存使用量

进程(包括aspnet_wp.exe),最多不超过1.5。
|
|怎么可能?有谁知道请帮忙吗?谢谢!
|
|

RAM的数量是一回事,但最重要的是你的进程分配的虚拟内存量。
每个窗口进程(32位未启用/ 4GT启用)最大为2GB
虚拟地址空间(VAS)。这个空间用于映射ASP.NET的工作人员CLR C运行时的代码以及一些其他的DLL加上你的应用程序代码(IL和JIT代码)本机进程堆积如上所示。
因此,当你说aspnet_wp.exe达到~1.2GB时,你必须知道你正在看什么和您正在使用什么工具。
无论如何,您永远不应该假设您有2GB可用,您应该剖析您的应用程序并仔细查看您的分配模式和对象的类型你正在分配,关注大对象(> 85kb)
这些往往会破坏大对象堆(特别是在v1.x中),你应该总是准备好抛出OOM异常你特别是
服务器应用程序。

Willy。

"Zen" <ze*@nononospam.com> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
| Hi,
|
| My production machine has 2G of memory, when aspnet_wp.exe goes up to
about
| ~1.2G of memory usage, I start get out-of-memory exception. Other
processes
| don''t use as much memory and I added all the peak memory usage of all
the
| processes (including aspnet_wp.exe), it goes up to no more than 1.5.
|
| How is that possible? Would anyone know please help? thanks!
|
|

The amount of RAM is one thing, but the most important is the amount of
Virtual memory your process has allocated.
Each windows process (32 bit not /4GT enabled) has a maximum of 2GB
Virtual
Address Space (VAS). This space is used to map the code of the ASP.NET
worker the CLR the C runtime and a couple of other DLL''s plus your
application code (the IL and JIT''d code) the native process heaps and the
GC
heaps.
So when you say that aspnet_wp.exe goes up to ~1.2GB you have to know
exactly what you are looking at and what tool you are using for this.
Anyway, you should never assume you have 2GB available, you should profile
your application and have a close look at your allocation patterns and the
type of objects you are allocating, take care about large objects (>85kb)
these tend to fragment the large object heap (especially in v1.x), and you
should always be prepared to get OOM exceptions thrown on you especially
in
server applications.

Willy.



这篇关于最大.net进程可以使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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