Re: 64-bit memory consumption
- From: Barry Kelly <barry.j.kelly@xxxxxxxxx>
- Date: Wed, 17 May 2006 14:44:02 +0100
Eric Grange <egrangeNO@xxxxxxxxxxxxxxx> wrote:
One has to wonder what the point of using .Net to target 64bit would be,
since two important benefits are negated by design:
- GC already has trouble coping with hundreds of megabytes worth of
objects, and with gigabytes, it's not really improving (euphemism).
A nice side effect of future developments is that with more cores, the
scanning of gen 2 (i.e. the big bit) can be done in parallel. As long as
CPU cores and memory keep pace with each other, this shouldn't really
get slower.
Speaking for my own development on .NET, I have found it to be extremely
fast - although apps requires 2-3x more memory than in the past. Of
course, my application domain was application servers, so I didn't need
SSE etc. Time spent in GC never exceeded 2% or so.
- IL doesn't support vector floating-point, so the benefits of
standardized SSE2 support are lost.
..NET is the wrong tool for fast vector SIMD code, and that isn't its
target market.
I can think of three possible ways this could be improved in the future:
1) Supply .NET valuetypes that the CLR has intrinsic knowledge about.
Operators on these valuetypes can be internal calls, so the JIT can
exercise extra information on them.
2) Give the JIT extensive knowledge of certain idioms produced by the C#
compiler for vector-style code, so it can extract possible SIMD
implementations. This is a much longer shot than option (1).
3) A "SIMD sublanguage" in MSIL, perhaps designed along the lines of
current shader assembly languages that we see these days in GPUs. See
http://microsoft.cs.msu.su/projects/ilshaders/ilshaders.pdf for example.
- JITter (so far) doesn't seem to be able of making good use of the
extra registers, this may improve, but there are still quite a few
roundtrips to memory and stack juggling in there, unless you're lucky
enough to hit one of the few peephole optimizations.
I definitely expect register usage to improve - MS are hardly going to
stand still.
The "peephole" optimizations in .NET are directly related to common C#
idioms and the IL the current MS C# compiler emits for those idioms. So,
whether one is implementing an algorithm in C# or implementing a code
generator for MSIL, the code pattern to stick to is the "natural" one
for C#. I think this is only to be expected.
A side effect of larger pointers in .Net is that as objects get bigger,
they also become more likely to end up in generation 1+, which are less
often GC'ed, and thus it ends up inflating memory usage even more.
The size of Gen0 is directly proportional to the CPU cache size, so
again, as CPU caches get bigger, this won't make a huge difference.
Speaking from personal experience, GC has never been a problem on
multi-CPU machines in a server environment, under heavy throughput for
many hours (ASP.NET performs appdomain recycling, so days doesn't
apply).
-- Barry
.
- Follow-Ups:
- Re: 64-bit memory consumption
- From: Eric Grange
- Re: 64-bit memory consumption
- References:
- 64-bit memory consumption
- From: Tim Anderson
- Re: 64-bit memory consumption
- From: Eric Grange
- 64-bit memory consumption
- Prev by Date: Re: 64-bit memory consumption
- Next by Date: Re: About Entity-Relationship Diagram in BDS 2007
- Previous by thread: Re: 64-bit memory consumption
- Next by thread: Re: 64-bit memory consumption
- Index(es):
Relevant Pages
|
|