[JBoss JIRA] (ISPN-4678) Trim down ExpandableMarshalledValueByteStream to the actual data length before storing in cache
by Alan Field (JIRA)
[ https://issues.jboss.org/browse/ISPN-4678?page=com.atlassian.jira.plugin.... ]
Alan Field commented on ISPN-4678:
----------------------------------
Hey [~dan.berindei], did you mean to send this to me or did you mean to send this to [~mgencur]?
> Trim down ExpandableMarshalledValueByteStream to the actual data length before storing in cache
> -----------------------------------------------------------------------------------------------
>
> Key: ISPN-4678
> URL: https://issues.jboss.org/browse/ISPN-4678
> Project: Infinispan
> Issue Type: Enhancement
> Security Level: Public(Everyone can see)
> Components: Core
> Affects Versions: 7.0.0.Beta1
> Reporter: Martin Gencur
> Assignee: Martin Gencur
>
> When storeAsBinary configuration flag is used, the ExpandableMarshalledValueByteStream is used to serialize objects to byte arrays.
> However, for value size up to 4kB, almost half of the space for each cache entry can be wasted because the ByteStream is stored as is - with the additional space for future expansion.
> For value size greater than 4kB, only additional 25% of actual value size can be wasted. But as these values can be quite large, the wasted space gets bigger too.
> It is not necessary to store ExpandableMarshalledValueByteStream as is and can be shrinked to actual data size before storing in cache.
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
9 years, 7 months
[JBoss JIRA] (ISPN-4679) OsgiClassLoader needs null check when iterating bundles
by Dan Berindei (JIRA)
[ https://issues.jboss.org/browse/ISPN-4679?page=com.atlassian.jira.plugin.... ]
Dan Berindei updated ISPN-4679:
-------------------------------
Affects Version/s: (was: 7.0.0.Final)
> OsgiClassLoader needs null check when iterating bundles
> -------------------------------------------------------
>
> Key: ISPN-4679
> URL: https://issues.jboss.org/browse/ISPN-4679
> Project: Infinispan
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: Core
> Affects Versions: 7.0.0.Beta1
> Reporter: Niels Bertram
> Assignee: Dan Berindei
> Priority: Minor
>
> {{org.infinispan.commons.util.OsgiClassLoader}} requires a null check when the bundle is retrieved from a WeakReference.
> {code:java}
> for (WeakReference<Bundle> ref : bundles) {
> final Bundle bundle = ref.get();
> // BUG: we may not get a bundle back from the weak reference, eg. if uninstalled or deactivated
> if (bundle.getState() == Bundle.ACTIVE) {
> try {
> final Class clazz = bundle.loadClass(name);
> if (clazz != null) {
> classCache.put(name, clazz);
> return clazz;
> }
> } catch (Exception ignore) {
> }
> }
> }
> {code}
> I am running 7.0.0.Beta1 on servicemix 5.1.1 and can't load this simple infinispan.xml:
> {code:xml}
> <infinispan xmlns="urn:infinispan:config:7.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="urn:infinispan:config:7.0 http://infinispan.org/schemas/infinispan-config-7.0.xsd">
> <cache-container default-cache="default" name="TestContainer">
> <jmx domain="TestDomain" mbean-server-lookup="org.infinispan.jmx.PerThreadMBeanServerLookup" duplicate-domains="true"/>
> <!-- definitions of the caches -->
> <local-cache name="default" statistics="false">
> <locking concurrency-level="100" acquire-timeout="1000"/>
> <transaction mode="NONE" complete-timeout="3123" reaper-interval="123"/>
> </local-cache>
> </cache-container>
> </infinispan>
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
9 years, 7 months
[JBoss JIRA] (ISPN-4679) OsgiClassLoader needs null check when iterating bundles
by Dan Berindei (JIRA)
[ https://issues.jboss.org/browse/ISPN-4679?page=com.atlassian.jira.plugin.... ]
Dan Berindei updated ISPN-4679:
-------------------------------
Fix Version/s: 7.0.0.Final
> OsgiClassLoader needs null check when iterating bundles
> -------------------------------------------------------
>
> Key: ISPN-4679
> URL: https://issues.jboss.org/browse/ISPN-4679
> Project: Infinispan
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: Core
> Affects Versions: 7.0.0.Beta1
> Reporter: Niels Bertram
> Assignee: Dan Berindei
> Priority: Minor
> Fix For: 7.0.0.Final
>
>
> {{org.infinispan.commons.util.OsgiClassLoader}} requires a null check when the bundle is retrieved from a WeakReference.
> {code:java}
> for (WeakReference<Bundle> ref : bundles) {
> final Bundle bundle = ref.get();
> // BUG: we may not get a bundle back from the weak reference, eg. if uninstalled or deactivated
> if (bundle.getState() == Bundle.ACTIVE) {
> try {
> final Class clazz = bundle.loadClass(name);
> if (clazz != null) {
> classCache.put(name, clazz);
> return clazz;
> }
> } catch (Exception ignore) {
> }
> }
> }
> {code}
> I am running 7.0.0.Beta1 on servicemix 5.1.1 and can't load this simple infinispan.xml:
> {code:xml}
> <infinispan xmlns="urn:infinispan:config:7.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="urn:infinispan:config:7.0 http://infinispan.org/schemas/infinispan-config-7.0.xsd">
> <cache-container default-cache="default" name="TestContainer">
> <jmx domain="TestDomain" mbean-server-lookup="org.infinispan.jmx.PerThreadMBeanServerLookup" duplicate-domains="true"/>
> <!-- definitions of the caches -->
> <local-cache name="default" statistics="false">
> <locking concurrency-level="100" acquire-timeout="1000"/>
> <transaction mode="NONE" complete-timeout="3123" reaper-interval="123"/>
> </local-cache>
> </cache-container>
> </infinispan>
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
9 years, 7 months
[JBoss JIRA] (ISPN-4678) Trim down ExpandableMarshalledValueByteStream to the actual data length before storing in cache
by Dan Berindei (JIRA)
[ https://issues.jboss.org/browse/ISPN-4678?page=com.atlassian.jira.plugin.... ]
Dan Berindei commented on ISPN-4678:
------------------------------------
[~afield] the default max doubling size is actually 4MB, not 4KB, but I don't think we should be doubling the size at all: StringBuillder uses a 1.5 growth factor, and we could do the same.
If we changed the growth factor to 1.5, I'm not sure it would still make sense to "shrink" the ExpandableMarshalledValueByteStream by moving it into a new instance (or a new ImmutableMarshalledValueByteStream). We could also do the move only if the wasted space is greater than a threshold (say 20% of the buffer).
> Trim down ExpandableMarshalledValueByteStream to the actual data length before storing in cache
> -----------------------------------------------------------------------------------------------
>
> Key: ISPN-4678
> URL: https://issues.jboss.org/browse/ISPN-4678
> Project: Infinispan
> Issue Type: Enhancement
> Security Level: Public(Everyone can see)
> Components: Core
> Affects Versions: 7.0.0.Beta1
> Reporter: Martin Gencur
> Assignee: Martin Gencur
>
> When storeAsBinary configuration flag is used, the ExpandableMarshalledValueByteStream is used to serialize objects to byte arrays.
> However, for value size up to 4kB, almost half of the space for each cache entry can be wasted because the ByteStream is stored as is - with the additional space for future expansion.
> For value size greater than 4kB, only additional 25% of actual value size can be wasted. But as these values can be quite large, the wasted space gets bigger too.
> It is not necessary to store ExpandableMarshalledValueByteStream as is and can be shrinked to actual data size before storing in cache.
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
9 years, 7 months
[JBoss JIRA] (ISPN-4683) DefaultConsistentHash segment size is not not computed correctly
by Dan Berindei (JIRA)
[ https://issues.jboss.org/browse/ISPN-4683?page=com.atlassian.jira.plugin.... ]
Dan Berindei updated ISPN-4683:
-------------------------------
Status: Pull Request Sent (was: Open)
Git Pull Request: https://github.com/infinispan/infinispan/pull/2835
> DefaultConsistentHash segment size is not not computed correctly
> ----------------------------------------------------------------
>
> Key: ISPN-4683
> URL: https://issues.jboss.org/browse/ISPN-4683
> Project: Infinispan
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: Core, Remote Protocols
> Affects Versions: 6.0.2.Final, 7.0.0.Beta1
> Reporter: Dan Berindei
> Assignee: Dan Berindei
> Priority: Critical
> Fix For: 7.0.0.Beta2
>
>
> The segment size is computed using {{o.i.commons.util.Util.getSegmentSize()}} both on the server and in the Java client. The computation uses {{float}} division, but {{float}} precision is not good enough and sometimes the segments are too small (e.g. with 200 segments, the segment size is 10737418 instead of 10737419). This means the keys with a hash of {{Integer.MAX_VALUE}} or {{-1}} are not properly mapped to a segment.
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
9 years, 8 months
[JBoss JIRA] (ISPN-4682) Improve SyncConsistentHashFactory key distribution
by Dan Berindei (JIRA)
[ https://issues.jboss.org/browse/ISPN-4682?page=com.atlassian.jira.plugin.... ]
Dan Berindei updated ISPN-4682:
-------------------------------
Summary: Improve SyncConsistentHashFactory key distribution (was: Improve SyncConsistentHashFactory distribution)
> Improve SyncConsistentHashFactory key distribution
> --------------------------------------------------
>
> Key: ISPN-4682
> URL: https://issues.jboss.org/browse/ISPN-4682
> Project: Infinispan
> Issue Type: Enhancement
> Security Level: Public(Everyone can see)
> Components: Core
> Affects Versions: 6.0.2.Final, 7.0.0.Beta1
> Reporter: Dan Berindei
> Assignee: Dan Berindei
> Labels: performance
> Fix For: 7.0.0.Beta2
>
>
> {{SyncConsistentHashFactory}} and {{TopologyAwareSyncConsistentHashFactory}} distribute the segments between nodes randomly, and the number of segments distributed to different nodes is not very even.
> They should have a fail-safe mechanism to limit the variation in segment number between nodes.
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
9 years, 8 months
[JBoss JIRA] (ISPN-4684) Segments with potentially stale L1 data are not invalidated correctly
by Dan Berindei (JIRA)
Dan Berindei created ISPN-4684:
----------------------------------
Summary: Segments with potentially stale L1 data are not invalidated correctly
Key: ISPN-4684
URL: https://issues.jboss.org/browse/ISPN-4684
Project: Infinispan
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: Core, State Transfer
Affects Versions: 7.0.0.Beta1, 6.0.2.Final
Reporter: Dan Berindei
Assignee: Dan Berindei
Priority: Critical
Fix For: 7.0.0.Beta2
{{StateConsumerImpl.computeStaleL1Entries()}} uses {{newWriteCh}} instead of {{previousWriteCh}}, so the list of stale L1 segments is always empty.
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
9 years, 8 months