--
You received this message because you are subscribed to the Google Groups "mechanical-sympathy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mechanical-symp...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to mechanical-sympathy+unsub...@googlegroups.com.
As every application, every request instantiates a few strings that are created at runtime.The amount of distinct values of the strings is huge (>400M) and I can't really create them in advance.So how can I achieve my objective, given that Strings can't be pooled, and I use Netty as the http web server which already instantiates Strings when it forwards strings representing the incoming url?Is there a way to achieve that using Unsafe or something like that?
To unsubscribe from this group and stop receiving emails from it, send an email to mechanical-symp...@googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "mechanical-sympathy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mechanical-symp...@googlegroups.com.
pozdrawiam,
LAFK
To unsubscribe from this group and stop receiving emails from it, send an email to mechanical-sympathy+unsub...@googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "mechanical-sympathy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mechanical-sympathy+unsub...@googlegroups.com.
What is the other alternative other than proprietary jvm?
How can this be achievable?
Hi Gil,I will look into Zing.Can you please elaborate a little about "re-introduce your own variant of malloc/free to Java".
Does it mean changing the internals of the JVM? Or does it mean creating my own classes' implementations (I.e: MyString) and replace them with the standard ones (I.e: String)?
If the former, do you have any refernece of how to do so?
I'm running the java process with the following jvm flags:-XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:+CMSScavengeBeforeRemark -XX:SurvivorRatio=10 -XX:TargetSurvivorRatio=90 -Xms24000m -Xmx30000m -Xmn2000m -XX:+UseCMSInitiatingOccupancyOnly -XX:CMSInitiatingOccupancyFraction=95 -XX:+CMSClassUnloadingEnabled
pozdrawiam,
LAFK
To unsubscribe from this group and stop receiving emails from it, send an email to mechanical-symp...@googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "mechanical-sympathy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mechanical-symp...@googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "mechanical-sympathy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mechanical-symp...@googlegroups.com.
--
To add to what Gil has said, we've had experience trying to replace a library that was allocation heavy, but with short lived objects to one that was gc-free, with lots of pooled objects. The result was that we had fewer GC pauses, but because the application as a whole was not gc-free (some of our own code would do allocation) those less frequent pauses were significantly worse. This additional cost came as a mix of card scanning, longer marking (more objects) and more time tenuring (more data surviving eden and getting copied). The upshot being that techniques like object pooling only work if you go the whole hog and your application can run for the required amount of time without incurring a new collection. If you can't achieve this you are better off removing all of the pooling and making objects as short-lived as possible. We did this in one of our apps and ran with a small eden (32MB) so that we had multiple GCs per second, but were able to keep them to around 2-3ms. The code ends up being simpler and more idiomatic.
Does Netty always materialize request strings? There's no option to get a view on the raw bytes using CharSequence?
It's practically impossible to write zero allocation java, particularly so with string based protocols. The more you want to reduce allocations, the more custom code you end up writing, with all the downsides of that approach.
sent from my phone
To add to what Gil has said, we've had experience trying to replace a library that was allocation heavy, but with short lived objects to one that was gc-free, with lots of pooled objects. The result was that we had fewer GC pauses, but because the application as a whole was not gc-free (some of our own code would do allocation) those less frequent pauses were significantly worse. This additional cost came as a mix of card scanning, longer marking (more objects) and more time tenuring (more data surviving eden and getting copied). The upshot being that techniques like object pooling only work if you go the whole hog and your application can run for the required amount of time without incurring a new collection. If you can't achieve this you are better off removing all of the pooling and making objects as short-lived as possible. We did this in one of our apps and ran with a small eden (32MB) so that we had multiple GCs per second, but were able to keep them to around 2-3ms. The code ends up being simpler and more idiomatic.
Mike.
pozdrawiam,
LAFK
To unsubscribe from this group and stop receiving emails from it, send an email to mechanical-sympathy+unsub...@googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "mechanical-sympathy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mechanical-sympathy+unsub...@googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "mechanical-sympathy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mechanical-sympathy+unsub...@googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "mechanical-sympathy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mechanical-symp...@googlegroups.com.