Remon wrote:
Hey
figuerres,
The system is both size & performance critical.
System should Parse about 10 BILLION Lines / day , store them into business objects for later processing & correlation & store them into DB.
It should be a big servers farm for this, still we have to be VERY careful while implementing the system.
it's .NET based, That's why you can't compare it to games programming

.
It's Webservices & COM+ system. should recieves files, parse & do some business over it, then store everything (Results & lines into DB)
I want to measure the objects size in memory, how much this object takes & how much overhead it has , etc...
For example: We found that the normal System.String Class, it supports UNICODE, while we work only, so we can save 50% of the object size if we can use ASCII-only-support String class.
Actual String size is calculated as that following:
Size = 20 + (n/2)^4 Bytes
Where 20 is overhead, & n is the no of characters in the string.
One of my team got this by researching, but we can't find anything else about other types. so if you can help by providing a profiler or a reference on how to calculate the sizes it will be very appreciated.
Thank you for your time
Ok so it sounds like you have some kind of EDI / TP thing to build then...
while I do not have a system in the billions of lines of parsing I do have a working app that does a good volume of web services traffic that goes to a sql db.
my system has 2 servers, each is an "off the shelf" DELL server.
we run about 6-8k orders a day plus other related traffic (auth, void,inq and so on)
the "front end" web server runs the ws on one virtual and 2 other web apps on others.
I have never seen ram go over about 600 megs in use.
now I think you have a lot more string management then my app and it sounds like a higher number of Transactions per day.
I think I would build a "Mockup" of the main logic and run it and just see what happens to memory use over a good time span.
I hope this is not beeing to basic but you do know that .net uses a stratigey of allocating ram from the OS in advance in large blocks and not giing it back unless it has to right ??
so if you run a large app it can grab what looks like a huge amount of ram and hold it till the app shuts down.
inside it's moving stuff around and keeping from asking for more os memory till it has to.
any profiler should show you how active GC 0,1 are and what kind of objects are scavanged (strings, other types)
there are some documents and stuff on msdn about what kind of pattern you want to see but as I recall it's mostly GC0 with a few things living longer and not scavenged till the end.
stuff that just hits GC1 and then dies is the "Worst case" as I recall for the .Net GC system.