由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
DotNet版 - memory usage
相关主题
J2EE or DotNet?Visual Studio.net is buggy.
[公告] DotNet 板的投票结果[转载] 申请.NET 版
dotnet真的没有市场吗?C# on JVM?
open source dotNet IDE - Software Studioopen source dotNet IDE - sharpdevelop
Need Help: a very wierd Managed C++ interop problemMaverick for dotnet: MVC for web publish
[公告] DotNet 版的投票结果dotnet template engine - NVelocity
[合集] Need Help: a very wierd Managed C++ interop problem[转载] 提名LodossWar, away 为DotNET版副
感觉c#真是无聊人发明的[转载] Re: 我来支持Re: 提名LodossWar, away 为DotNET版副
相关话题的讨论汇总
话题: java话题: memory话题: c#话题: net话题: c++
进入DotNet版参与讨论
1 (共1页)
k****i
发帖数: 1072
1
one of the problem when using .net program is the huge memory usage.I remember
that even a blank windows form application,it eats up around 7M memory.
L*******r
发帖数: 1011
2
All the systems using garbage collection have the same problem. Java is even
worse.
7M memory is not a big deal for .Net installed machine. Because .Net requires
windows 2k, xp or 2003, which require more than 128 or 256M memory to run.
The points should be:
1. Does it start fast?
From my expeirence, it is at least faster than Java program. The start
speed of GUI program is in acceptable timing peoriod. Of course this is the
difference between two JIT system implementations makes .Net program

【在 k****i 的大作中提到】
: one of the problem when using .net program is the huge memory usage.I remember
: that even a blank windows form application,it eats up around 7M memory.

k****i
发帖数: 1072
3

requires
program.
gives
well,in our case,a superserver costs 45M-55M memory,plus sometimes the server
will create another process for report previewing on the fly which costs 21M
memory.If there are some other companies' .net application running on the same
machine,what would you expect?

【在 L*******r 的大作中提到】
: All the systems using garbage collection have the same problem. Java is even
: worse.
: 7M memory is not a big deal for .Net installed machine. Because .Net requires
: windows 2k, xp or 2003, which require more than 128 or 256M memory to run.
: The points should be:
: 1. Does it start fast?
: From my expeirence, it is at least faster than Java program. The start
: speed of GUI program is in acceptable timing peoriod. Of course this is the
: difference between two JIT system implementations makes .Net program

L*******r
发帖数: 1011
4

server
same
1. How much is 128M memory for a PC? :)
2. Optimize your algorithm. find out the bottle-neck. If necessary, using
unmaged code for that part to save memory.
3. In a distributed environment, this should be ok. Just provice one server
for your service. The web applicaiton will call your web service.
That's just my thought. Welcome comments. :)

【在 k****i 的大作中提到】
:
: requires
: program.
: gives
: well,in our case,a superserver costs 45M-55M memory,plus sometimes the server
: will create another process for report previewing on the fly which costs 21M
: memory.If there are some other companies' .net application running on the same
: machine,what would you expect?

m******t
发帖数: 2416
5

server
same
If not all of the applications are going to run actively at the same time,
the memory of those idle ones will be swapped out.
Besides, these days "super servers" can have 2G RAM, which can have almost 100
of your report preview processes all in the memory at the same time.
If it actually gets to that point, I suspect it will be your CPU, not memory
that
will become the bottleneck.

【在 k****i 的大作中提到】
:
: requires
: program.
: gives
: well,in our case,a superserver costs 45M-55M memory,plus sometimes the server
: will create another process for report previewing on the fly which costs 21M
: memory.If there are some other companies' .net application running on the same
: machine,what would you expect?

k****i
发帖数: 1072
6

21M
actually the superserver is a legacy program(c++) with some new .net add-ons
Yes,that's one of the ways to get things done.But for some legacy
programs,it's
2 cumbersome to rewrite the whole things.:)

【在 L*******r 的大作中提到】
:
: server
: same
: 1. How much is 128M memory for a PC? :)
: 2. Optimize your algorithm. find out the bottle-neck. If necessary, using
: unmaged code for that part to save memory.
: 3. In a distributed environment, this should be ok. Just provice one server
: for your service. The web applicaiton will call your web service.
: That's just my thought. Welcome comments. :)

k****i
发帖数: 1072
7

21M
100
You can not ask all the clients to purchase a 2G Ram machine.What you can do
is to optimize your program to fit in the clients' request before your boss
yells at you.:)
BTW,the report engine is only a tiny part of the superserver.This is just an
example here.Actually I encountered the memeory problem when I run a
stress-test of the report engine:Multiple threads generate hundreds of stand
alone report viewer processes simoutaneousely,and,of course you can imagine
what happened.:).But ac

【在 m******t 的大作中提到】
:
: server
: same
: If not all of the applications are going to run actively at the same time,
: the memory of those idle ones will be swapped out.
: Besides, these days "super servers" can have 2G RAM, which can have almost 100
: of your report preview processes all in the memory at the same time.
: If it actually gets to that point, I suspect it will be your CPU, not memory
: that
: will become the bottleneck.

m******t
发帖数: 2416
8

OK, think about it this way. Either you spend 3 months writing it in C and
come out with 2.1M memory footprint, or you spend 3 weeks in .Net and end up
a 21M footprint. In which case would you think your boss would more likely be
yelling at you?
Then, would your client rather pay you 100 bucks an hour for that extra 10
weeks
of development time, on top of whatever implicit business loss due to the
delay to
the market, or would they rather just go get 2G memory for a fraction of all
that
money

【在 k****i 的大作中提到】
:
: 21M
: 100
: You can not ask all the clients to purchase a 2G Ram machine.What you can do
: is to optimize your program to fit in the clients' request before your boss
: yells at you.:)
: BTW,the report engine is only a tiny part of the superserver.This is just an
: example here.Actually I encountered the memeory problem when I run a
: stress-test of the report engine:Multiple threads generate hundreds of stand
: alone report viewer processes simoutaneousely,and,of course you can imagine

L*******r
发帖数: 1011
9
I don't get it. It's easy to wrap c++ program to provide a web servive.
Just go for ATL Server. I have done that. It gave you good performance.
Why need to rewrite it?
So actually it is the legacy program who costs much memory. Isn't it?
1. For performance tuning, the first thing to check is algorithm. always.
2. Different languages have their performance trap. Some "easy to use" way
may have serious performance problem. i.e. string in Java.
Just doing some research, I had cut the memory usag

【在 k****i 的大作中提到】
:
: 21M
: 100
: You can not ask all the clients to purchase a 2G Ram machine.What you can do
: is to optimize your program to fit in the clients' request before your boss
: yells at you.:)
: BTW,the report engine is only a tiny part of the superserver.This is just an
: example here.Actually I encountered the memeory problem when I run a
: stress-test of the report engine:Multiple threads generate hundreds of stand
: alone report viewer processes simoutaneousely,and,of course you can imagine

L*******r
发帖数: 1011
10
hehe. I have to say. This is not that right.
1. It's hard to persuade clients using this words.
2. Java and C# is not that "efficient" as you said.
A real professional C++ programmer can achive almost
the same productivity as Java programmers. But this kind of
c++ programmer needs long time to train.
so , no free lunch.
If you use a "easy to learn" laguange as java and C#, you can
build a program in 3 weeks, then spend maybe more than 1 month
to do performance tuning.
If you use Java or

【在 m******t 的大作中提到】
:
: OK, think about it this way. Either you spend 3 months writing it in C and
: come out with 2.1M memory footprint, or you spend 3 weeks in .Net and end up
: a 21M footprint. In which case would you think your boss would more likely be
: yelling at you?
: Then, would your client rather pay you 100 bucks an hour for that extra 10
: weeks
: of development time, on top of whatever implicit business loss due to the
: delay to
: the market, or would they rather just go get 2G memory for a fraction of all

相关主题
[公告] DotNet 版的投票结果Visual Studio.net is buggy.
[合集] Need Help: a very wierd Managed C++ interop problem[转载] 申请.NET 版
感觉c#真是无聊人发明的C# on JVM?
进入DotNet版参与讨论
L*******r
发帖数: 1011
11
but you can negotiate with the clients.
1. Optimize your program first.
2. At the same time, ask the saleman to persuage them to buy a 256M memory.
This is easy because it is "2G".
3. tell clients your system is so complex that their money is really worth.
hehe, see, cost so much memory. :)

【在 k****i 的大作中提到】
:
: 21M
: 100
: You can not ask all the clients to purchase a 2G Ram machine.What you can do
: is to optimize your program to fit in the clients' request before your boss
: yells at you.:)
: BTW,the report engine is only a tiny part of the superserver.This is just an
: example here.Actually I encountered the memeory problem when I run a
: stress-test of the report engine:Multiple threads generate hundreds of stand
: alone report viewer processes simoutaneousely,and,of course you can imagine

m******t
发帖数: 2416
12

Show them the bottom line, and they will be "persuaded". LOL
I would be glad to believe that if you have some statistical data supporting
it. Besides, I was comparing C to Java/C#.
And hence more expensive to hire, which adds to the right side of your
"persuasion". 8-)
[snip]
No... you don't have to know how the VM works or how memory management works
to
write good quality Java programs. In fact, sometimes I think overly focusing
on the details can hurt the overall quality of your program, be

【在 L*******r 的大作中提到】
: hehe. I have to say. This is not that right.
: 1. It's hard to persuade clients using this words.
: 2. Java and C# is not that "efficient" as you said.
: A real professional C++ programmer can achive almost
: the same productivity as Java programmers. But this kind of
: c++ programmer needs long time to train.
: so , no free lunch.
: If you use a "easy to learn" laguange as java and C#, you can
: build a program in 3 weeks, then spend maybe more than 1 month
: to do performance tuning.

st
发帖数: 1685
13
or fire people who cant do it in C in 3 weeks, and get a better programmer.

【在 m******t 的大作中提到】
:
: Show them the bottom line, and they will be "persuaded". LOL
: I would be glad to believe that if you have some statistical data supporting
: it. Besides, I was comparing C to Java/C#.
: And hence more expensive to hire, which adds to the right side of your
: "persuasion". 8-)
: [snip]
: No... you don't have to know how the VM works or how memory management works
: to
: write good quality Java programs. In fact, sometimes I think overly focusing

k****i
发帖数: 1072
14
oops,java gained its popularity of what?!

focusing

【在 m******t 的大作中提到】
:
: Show them the bottom line, and they will be "persuaded". LOL
: I would be glad to believe that if you have some statistical data supporting
: it. Besides, I was comparing C to Java/C#.
: And hence more expensive to hire, which adds to the right side of your
: "persuasion". 8-)
: [snip]
: No... you don't have to know how the VM works or how memory management works
: to
: write good quality Java programs. In fact, sometimes I think overly focusing

m******t
发帖数: 2416
15

I sure wouldn't want to work for a boss that would do that. Do you?

【在 st 的大作中提到】
: or fire people who cant do it in C in 3 weeks, and get a better programmer.
st
发帖数: 1685
16
you are fired, so you didnot get to choose. I am okay, that should be a
capable boss. :D

【在 m******t 的大作中提到】
:
: I sure wouldn't want to work for a boss that would do that. Do you?

m******t
发帖数: 2416
17

My answer would have been much longer were this on some other board.
But since this is DotNet, this would do:
"Open - your - eyes!" 8-)

【在 k****i 的大作中提到】
: oops,java gained its popularity of what?!
:
: focusing

st
发帖数: 1685
18
I dont see any answer here, just some java fans yelling.

【在 m******t 的大作中提到】
:
: My answer would have been much longer were this on some other board.
: But since this is DotNet, this would do:
: "Open - your - eyes!" 8-)

m******t
发帖数: 2416
19

What else do you expect? This is DotNet. All we can do is screaming.
Besides, did you see any point in "java gained its popularity of what" to
begin with? 8-/

【在 st 的大作中提到】
: I dont see any answer here, just some java fans yelling.
st
发帖数: 1685
20
he just laughed at some java fan, which is very normal. fans are not
reasonable people any way, agree?

【在 m******t 的大作中提到】
:
: What else do you expect? This is DotNet. All we can do is screaming.
: Besides, did you see any point in "java gained its popularity of what" to
: begin with? 8-/

相关主题
open source dotNet IDE - sharpdevelop[转载] 提名LodossWar, away 为DotNET版副
Maverick for dotnet: MVC for web publish[转载] Re: 我来支持Re: 提名LodossWar, away 为DotNET版副
dotnet template engine - NVelocityhoho, another dotnet bug in production
进入DotNet版参与讨论
L*******r
发帖数: 1011
21

I read one paper before. But not save it.
The problem of C++ is too many C++ programmers are programming in a C style.
sigh. smart pointer and other memory management system is there but seldom
know
how to use it. :(
C++ programmer have mature IDE and other tools. Not like the students using
emacs and gdb. Althought that's cool.
I agree. This is why Java and C# get popular. You know how popular VB is?
hehe.
But java and C# is definetely better than VB. I just want to show you, getting
popular d

【在 m******t 的大作中提到】
:
: What else do you expect? This is DotNet. All we can do is screaming.
: Besides, did you see any point in "java gained its popularity of what" to
: begin with? 8-/

L*******r
发帖数: 1011
22
Actually Java and C# are not suitable for real time computing, which is a fact
in current industry.
In other area, they are fine.
BTW, Java swing is not a good choice for GUI except toy programs. :)

supporting
differnece
works
algorithm,
it"

【在 k****i 的大作中提到】
: oops,java gained its popularity of what?!
:
: focusing

L*******r
发帖数: 1011
23
For beginners, there is difference.
For professinoals, language is not that important. hehe.

【在 st 的大作中提到】
: I dont see any answer here, just some java fans yelling.
st
发帖数: 1685
24
programming habit, software engineering habit etc.
company politics.... etc...

【在 L*******r 的大作中提到】
: For beginners, there is difference.
: For professinoals, language is not that important. hehe.

L*******r
发帖数: 1011
25
Enterprise area java rocks.
But actually J2EE has its own problem. It has a good architecture, but it is
not good at "achieve a goal in short time" style project.
Many J2EE porjects failed to meet the deadline because the way is "heavy
weight". .Net is more "light weight", but need some time to refine its
architecture.
Let's wait and see. :)

【在 m******t 的大作中提到】
:
: What else do you expect? This is DotNet. All we can do is screaming.
: Besides, did you see any point in "java gained its popularity of what" to
: begin with? 8-/

L*******r
发帖数: 1011
26
//hand.

【在 st 的大作中提到】
: programming habit, software engineering habit etc.
: company politics.... etc...

k****i
发帖数: 1072
27
I don't agree with this one.
Professionals know more about the advantages and disadvantages of different
languages.That may probably more picky on choosing the right tool to get
things done.I was told on .net summit that in one project they used c# in like
20 modules and 1 in vb .net because they know it's easier and also has better
performance in that case(I forgot the reason,sorry about that).Also in the
past,tons of asm was embedded in the c or c++ programs.
So languages matter.【 在 LodossWar
L*******r
发帖数: 1011
28
hehe. I agree with that. I have done computer graphics programming before.
And for performance, algorithm change is the first choice. In the famous
"black book", the author also illustrated this to us. He is definetely an asm
expert. :)
But my point is for "productivity":
I mean professionals will at the same level with his favoriate languges.
For example, c++ experts will achive almost same level productivity as java
experts. But c++ beginners won't achive the same level productivity as junior
k****i
发帖数: 1072
29
1.about the why vb.net but not c#,sorry I don't remember the detail,but there
is something that is implemented in vb.net but not in c#.I am not familiar
with vb.net,but I still believe what they said(don't think they are both built
on .net framework that makes them no difference)
2.about com,I would say com+ is still ok but I don't like dcom.
one more question.Does microsoft admit that com doesn't achieve its original
goal?But they are still giving the com 2.0 idea in .net.Is there any big
chang

【在 L*******r 的大作中提到】
: hehe. I agree with that. I have done computer graphics programming before.
: And for performance, algorithm change is the first choice. In the famous
: "black book", the author also illustrated this to us. He is definetely an asm
: expert. :)
: But my point is for "productivity":
: I mean professionals will at the same level with his favoriate languges.
: For example, c++ experts will achive almost same level productivity as java
: experts. But c++ beginners won't achive the same level productivity as junior

L*******r
发帖数: 1011
30
One of my friends got those information directly in the Microsoft meeting
recently. forgot the name of the conference.

there
built
java
The
years
in
the

【在 k****i 的大作中提到】
: 1.about the why vb.net but not c#,sorry I don't remember the detail,but there
: is something that is implemented in vb.net but not in c#.I am not familiar
: with vb.net,but I still believe what they said(don't think they are both built
: on .net framework that makes them no difference)
: 2.about com,I would say com+ is still ok but I don't like dcom.
: one more question.Does microsoft admit that com doesn't achieve its original
: goal?But they are still giving the com 2.0 idea in .net.Is there any big
: chang

相关主题
Re: hoho, another dotnet bug in producti[公告] DotNet 板的投票结果
[转载] 申请辞去DOTNET 版版主dotnet真的没有市场吗?
J2EE or DotNet?open source dotNet IDE - Software Studio
进入DotNet版参与讨论
L*******r
发帖数: 1011
31
reference counting has its problem in theory.
registry storage is a hell.
there
built
k****i
发帖数: 1072
32
true
that's why .net go back to xcopy style

original

【在 L*******r 的大作中提到】
: reference counting has its problem in theory.
: registry storage is a hell.
: there
: built

m******t
发帖数: 2416
33

that's exactly the "academic world" mentality I was talking about...
That's not a valid argument. There is some problem (namely the exponential
explosion problem) that hardware upgrade cannot solve, does not effectively
overrule the more generic claim that hardware upgrade can solve a lot of
performance problem.
OK, here's the deal. People have realized that out of an entire IT system,
software is the most complicated and the least automated, and hence the
most error-prone and expensive part.

【在 L*******r 的大作中提到】
: reference counting has its problem in theory.
: registry storage is a hell.
: there
: built

L*******r
发帖数: 1011
34
My point:
1. Just choose the solution suitable for your requirement and context. The
important question is "what's your goal.".
2. "Hardware upgrade" is not always the solution. It's just one of the
solution.
3. Algorithm is key for performance problem. It can save your a lot hardware
and it is not always that hard.
4. You need to compare the cost/profit of "hardwaew upgrade" and "algorithm
tuning" to make the final decision.
details see following:

getting
OK. If you think VB is good. I have no

【在 m******t 的大作中提到】
:
: that's exactly the "academic world" mentality I was talking about...
: That's not a valid argument. There is some problem (namely the exponential
: explosion problem) that hardware upgrade cannot solve, does not effectively
: overrule the more generic claim that hardware upgrade can solve a lot of
: performance problem.
: OK, here's the deal. People have realized that out of an entire IT system,
: software is the most complicated and the least automated, and hence the
: most error-prone and expensive part.

m******t
发帖数: 2416
35

I don't disagree with you on any of these counts, but then they are *never*
what we were debating on, are they? If you wouldn't mind going back and
reading some of the original messages, we were discussing whether hardware
upgrade in most of the time is a favorable solution over choosing a
lower-level language/tool (remember the C vs. Java/C# talk?)
for
Did I say "VB is good", or did I imply it anywhere? 8-)
What I was trying to say is what I have been repeating again and again to a
lot of pe

【在 L*******r 的大作中提到】
: My point:
: 1. Just choose the solution suitable for your requirement and context. The
: important question is "what's your goal.".
: 2. "Hardware upgrade" is not always the solution. It's just one of the
: solution.
: 3. Algorithm is key for performance problem. It can save your a lot hardware
: and it is not always that hard.
: 4. You need to compare the cost/profit of "hardwaew upgrade" and "algorithm
: tuning" to make the final decision.
: details see following:

L*******r
发帖数: 1011
36

hardware
"algorithm
OK. So we don't need to argue.
hehe. Ok.

【在 m******t 的大作中提到】
:
: I don't disagree with you on any of these counts, but then they are *never*
: what we were debating on, are they? If you wouldn't mind going back and
: reading some of the original messages, we were discussing whether hardware
: upgrade in most of the time is a favorable solution over choosing a
: lower-level language/tool (remember the C vs. Java/C# talk?)
: for
: Did I say "VB is good", or did I imply it anywhere? 8-)
: What I was trying to say is what I have been repeating again and again to a
: lot of pe

1 (共1页)
进入DotNet版参与讨论
相关主题
[转载] Re: 我来支持Re: 提名LodossWar, away 为DotNET版副Need Help: a very wierd Managed C++ interop problem
hoho, another dotnet bug in production[公告] DotNet 版的投票结果
Re: hoho, another dotnet bug in producti[合集] Need Help: a very wierd Managed C++ interop problem
[转载] 申请辞去DOTNET 版版主感觉c#真是无聊人发明的
J2EE or DotNet?Visual Studio.net is buggy.
[公告] DotNet 板的投票结果[转载] 申请.NET 版
dotnet真的没有市场吗?C# on JVM?
open source dotNet IDE - Software Studioopen source dotNet IDE - sharpdevelop
相关话题的讨论汇总
话题: java话题: memory话题: c#话题: net话题: c++