Persistence VM?
Stephen Pair
spair at acm.org
Mon Aug 19 19:54:31 UTC 2002
> Did I get that right - does your image only grow by 11% with
> these changes? Eh, I thought that all that "compact classes
> stuff" had a larger impact than that.
I belive so...note this is not the stock VM...but I would assume a
similar distribution of object header types. As an outside estimate,
you can calculate what adding 4 bytes to *every* object in memory would
do by inspecting the result of this (note this will save your image):
| objCount imageSize |
Smalltalk snapshot: true andQuit: false.
imageSize := (FileStream oldFileNamed: (Smalltalk imageName)) size.
objCount := 0.
Smalltalk allObjectsDo: [ :ea | objCount := objCount + 1].
(((objCount * 4) / imageSize) * 100) asFloat.
The result is the percentage increase in object memory size...I get
about 9.5% when evaluating this code. This means that even if 4 bytes
were added to every object, the image size would increase by 9.5%.
> So... why do we bother with them (and the small hash) at all?
> Or am I missing something? I do agree that we should try to
> keep things "small" but 11% sounds like small fish compared
> to other savings that could be made simply by cleaning up
> Squeak code...
To fit on machines where every bit counts I guess. But, on today's
laptops and desktops, it really is small fish (2MB added to my image).
- Stephen
> -----Original Message-----
> From: squeak-dev-admin at lists.squeakfoundation.org
> [mailto:squeak-dev-admin at lists.squeakfoundation.org] On
> Behalf Of goran.hultgren at bluefish.se
> Sent: Monday, August 19, 2002 3:46 PM
> To: squeak-dev at lists.squeakfoundation.org
> Subject: Re: Persistence VM?
>
>
> "Stephen Pair" <spair at acm.org> wrote:
> [SNIP of a lot of stuff]
> > An analysis of my current working image (which has 623,385
> objects in
> > it) indicates that such changes in the object memory layout will
> > result in about an 11% increase the amount of memory needed
> for this
> > set of objects (about 78% of the objects in my image are small and
> > compact, another 4.4% are large)
>
> Did I get that right - does your image only grow by 11% with
> these changes? Eh, I thought that all that "compact classes
> stuff" had a larger impact than that.
>
> So... why do we bother with them (and the small hash) at all?
> Or am I missing something? I do agree that we should try to
> keep things "small" but 11% sounds like small fish compared
> to other savings that could be made simply by cleaning up
> Squeak code...
>
> Note: I am way out of my depths here - please feel free to correct me.
>
> regards, Göran
>
>
More information about the Squeak-dev
mailing list
|