[talk] Python

Edward Capriolo edlinuxguru at gmail.com
Thu Apr 28 08:09:52 EDT 2016


On Thursday, April 28, 2016, Sujit K M <kmsujit at gmail.com> wrote:

> On Thu, Apr 28, 2016 at 5:30 PM, Edward Capriolo <edlinuxguru at gmail.com
> <javascript:;>> wrote:
> > The java class file format is well documented. Basically one pointer to
> the
> > runtime class of the object followed by the object.
>
> So you mean to say Class file size on the filesystem is the Object Size.
>
> >
> > If a given language is reference counted each object has one extra atomic
> > field to count references.
>
> So you mean to say garbage collection.
>
> >
> > If a given language does not have objects but instead uses maps (that
> repeat
> > the fields evey instance) that is going to be a more large object in
> memory.
>
> Big data I guess.
>
> >
> > While i am not a large expert in this i believe javas approach is like a
> c
> > struct with the exception the first word size bytes are a pointer to the
> > type of class so that instances can be runtime inspected.
> >
> > Java also has a very clever system for compressing 64 bit pointers.. see
> > compressedOOPs option. I have not heard much of this optimization
> anywhere
> > else.
>
> Zlib I guess.
>
> >
> > On Thursday, April 28, 2016, Sujit K M <kmsujit at gmail.com <javascript:;>>
> wrote:
> >>
> >> > Anecdotal. Keep in mind I have tested this and you can create 'a lot
> >> > more
> >> > objects' given the same RAM than many other popular non java
> languages.
> >> > :)
> >>
> >> Could you please clarify further? I mean does it involve a object size
> >> on the JVM.
> >> How to measure the size occupied by the Object? How much extra space the
> >> JVM
> >> needs? What is JDK Feature that Let's you claim this?
> >>
> >> I have serious questions regarding this claim. As Interpreted or JIT
> >> compiled languages
> >> should in reality occupy more space.
> >>
> >> >
> >> > On Wed, Apr 27, 2016 at 4:13 PM, Pete Wright <pete at nomadlogic.org
> <javascript:;>>
> >> > wrote:
> >> >>
> >> >>
> >> >>
> >> >> On 04/26/2016 03:56 AM, Brian Coca wrote:
> >> >>>
> >> >>> As many a Java dev has told me: "the only problem is that you did
> not
> >> >>> install enough RAM, just add it, it's cheap!"
> >> >>>
> >> >>>
> >> >>
> >> >> and therein is the issue - in practice i've found that by adding more
> >> >> memory to a JVM heap will tend to worsen GC pauses, especially for
> >> >> latency
> >> >> sensitive operations.  then you get to do all sorts of fun stuff like
> >> >> storing cached objects outside of the JVM or lord knows what.
> >> >>
> >> >> i spent about 3 months trying to help a team tune their java app when
> >> >> they
> >> >> noticed it would periodically show latencies of several seconds. they
> >> >> kept
> >> >> adding more memory to the heap, which made things worse.  once we
> >> >> turned on
> >> >> debugging metrics for GC it became painfully apparent that due to the
> >> >> huge
> >> >> heap that they had allocated GC was taking ages to complete and
> >> >> stopping to
> >> >> world in the process.  good times :)
> >> >>
> >> >> -pete
> >> >>
> >> >> --
> >> >> Pete Wright
> >> >> pete at nomadlogic.org <javascript:;>
> >> >>
> >> >> _______________________________________________
> >> >> talk mailing list
> >> >> talk at lists.nycbug.org <javascript:;>
> >> >> http://lists.nycbug.org/mailman/listinfo/talk
> >> >
> >> >
> >> >
> >> > _______________________________________________
> >> > talk mailing list
> >> > talk at lists.nycbug.org <javascript:;>
> >> > http://lists.nycbug.org/mailman/listinfo/talk
> >>
> >> _______________________________________________
> >> talk mailing list
> >> talk at lists.nycbug.org <javascript:;>
> >> http://lists.nycbug.org/mailman/listinfo/talk
> >
> >
> >
> > --
> > Sorry this was sent from mobile. Will do less grammar and spell check
> than
> > usual.
>
> _______________________________________________
> talk mailing list
> talk at lists.nycbug.org <javascript:;>
> http://lists.nycbug.org/mailman/listinfo/talk
>

No i am not talking using zlib on large byte arrays. What compressedOOps
does is use something like a varint pointer between objects so that not
every object pointer is 64 bits on a 64 bit platform.


-- 
Sorry this was sent from mobile. Will do less grammar and spell check than
usual.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nycbug.org/pipermail/talk/attachments/20160428/af83006b/attachment.html>


More information about the talk mailing list