[JBoss JIRA] (ISPN-8422) Investigate removal of hashCode from memory block and rely solely on equals
by William Burns (JIRA)
[ https://issues.jboss.org/browse/ISPN-8422?page=com.atlassian.jira.plugin.... ]
William Burns commented on ISPN-8422:
-------------------------------------
Another thing to mention is that currently we reuse the hashCode for the key WrappedByteArray. This does prevent a hash calculation for equality checks (although we could remove this and only rely on the bytes themselves). So while this could save bytes per entry we may be losing some read/write perf (although it would have to be tested).
> Investigate removal of hashCode from memory block and rely solely on equals
> ---------------------------------------------------------------------------
>
> Key: ISPN-8422
> URL: https://issues.jboss.org/browse/ISPN-8422
> Project: Infinispan
> Issue Type: Sub-task
> Reporter: William Burns
> Assignee: William Burns
> Fix For: 9.2.0.Beta1
>
>
> We could remove the hashCode 4 bytes taking up space in the allocated memory block. Currently this is only used for eviction, maybe instead we could write a VInt that says which offset of locks to use. In majority of cases <= 64 cores this will result in saving 3 bytes per entry.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
7 years, 2 months
[JBoss JIRA] (ISPN-8491) Add streaming variant of off heap to not create byte[] instances
by William Burns (JIRA)
[ https://issues.jboss.org/browse/ISPN-8491?page=com.atlassian.jira.plugin.... ]
William Burns commented on ISPN-8491:
-------------------------------------
This is only doable for custom version or metadata, which is lower on priority atm.
> Add streaming variant of off heap to not create byte[] instances
> ----------------------------------------------------------------
>
> Key: ISPN-8491
> URL: https://issues.jboss.org/browse/ISPN-8491
> Project: Infinispan
> Issue Type: Sub-task
> Components: Off Heap
> Reporter: William Burns
> Fix For: 9.2.0.Final
>
>
> Currently off heap has to create a byte[] to copy memory from off heap. This is a waste of CPU and memory to do so. Instead we should have a streaming variant Output that the GlobalMarshaller can use that doesn't need all of this unnecessary copying. Unfortunately GlobalMarshaller is currently internally hard coded to require the usage of byte[] so we would have to tweak some code there as well to allow this.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
7 years, 2 months
[JBoss JIRA] (ISPN-8385) Document how DataContainer can store entries in different format than provided to Cache
by Gustavo Fernandes (JIRA)
[ https://issues.jboss.org/browse/ISPN-8385?page=com.atlassian.jira.plugin.... ]
Gustavo Fernandes updated ISPN-8385:
------------------------------------
Status: Resolved (was: Pull Request Sent)
Resolution: Done
> Document how DataContainer can store entries in different format than provided to Cache
> ---------------------------------------------------------------------------------------
>
> Key: ISPN-8385
> URL: https://issues.jboss.org/browse/ISPN-8385
> Project: Infinispan
> Issue Type: Bug
> Components: Core
> Affects Versions: 9.1.1.Final, 9.2.0.Alpha1
> Reporter: Vojtech Juranek
> Assignee: William Burns
> Fix For: 9.2.0.Beta1
>
>
> Off-heap container entries contain some additional bytes (ASCII 1,2,1,4), which probably shouldn't be there. Besides additional consumption of memory, it can cause problem as entry put into the cache with cache API is not accessible via container API (which is available to the use), i.e. something like this will fail:
> {noformat}
> cache.put(key, value);
> container = AbstractDelegatingCache.unwrapCache(cache).getAdvancedCache().getDataContainer();
> InternalCacheEntry entry = container.get(key);
> {noformat}
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
7 years, 2 months
[JBoss JIRA] (ISPN-8385) Document how DataContainer can store entries in different format than provided to Cache
by William Burns (JIRA)
[ https://issues.jboss.org/browse/ISPN-8385?page=com.atlassian.jira.plugin.... ]
William Burns updated ISPN-8385:
--------------------------------
Status: Pull Request Sent (was: Coding In Progress)
Git Pull Request: https://github.com/infinispan/infinispan/pull/5576
> Document how DataContainer can store entries in different format than provided to Cache
> ---------------------------------------------------------------------------------------
>
> Key: ISPN-8385
> URL: https://issues.jboss.org/browse/ISPN-8385
> Project: Infinispan
> Issue Type: Bug
> Components: Core
> Affects Versions: 9.1.1.Final, 9.2.0.Alpha1
> Reporter: Vojtech Juranek
> Assignee: William Burns
> Fix For: 9.2.0.Beta1
>
>
> Off-heap container entries contain some additional bytes (ASCII 1,2,1,4), which probably shouldn't be there. Besides additional consumption of memory, it can cause problem as entry put into the cache with cache API is not accessible via container API (which is available to the use), i.e. something like this will fail:
> {noformat}
> cache.put(key, value);
> container = AbstractDelegatingCache.unwrapCache(cache).getAdvancedCache().getDataContainer();
> InternalCacheEntry entry = container.get(key);
> {noformat}
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
7 years, 2 months
[JBoss JIRA] (ISPN-8385) Document how DataContainer can store entries in different format than provided to Cache
by William Burns (JIRA)
[ https://issues.jboss.org/browse/ISPN-8385?page=com.atlassian.jira.plugin.... ]
William Burns updated ISPN-8385:
--------------------------------
Fix Version/s: 9.2.0.Beta1
> Document how DataContainer can store entries in different format than provided to Cache
> ---------------------------------------------------------------------------------------
>
> Key: ISPN-8385
> URL: https://issues.jboss.org/browse/ISPN-8385
> Project: Infinispan
> Issue Type: Bug
> Components: Core
> Affects Versions: 9.1.1.Final, 9.2.0.Alpha1
> Reporter: Vojtech Juranek
> Assignee: William Burns
> Fix For: 9.2.0.Beta1
>
>
> Off-heap container entries contain some additional bytes (ASCII 1,2,1,4), which probably shouldn't be there. Besides additional consumption of memory, it can cause problem as entry put into the cache with cache API is not accessible via container API (which is available to the use), i.e. something like this will fail:
> {noformat}
> cache.put(key, value);
> container = AbstractDelegatingCache.unwrapCache(cache).getAdvancedCache().getDataContainer();
> InternalCacheEntry entry = container.get(key);
> {noformat}
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
7 years, 2 months
[JBoss JIRA] (ISPN-8385) Document how DataContainer can store entries in different format than provided to Cache
by William Burns (JIRA)
[ https://issues.jboss.org/browse/ISPN-8385?page=com.atlassian.jira.plugin.... ]
William Burns updated ISPN-8385:
--------------------------------
Summary: Document how DataContainer can store entries in different format than provided to Cache (was: Off-heap container entries contain addional bytes)
> Document how DataContainer can store entries in different format than provided to Cache
> ---------------------------------------------------------------------------------------
>
> Key: ISPN-8385
> URL: https://issues.jboss.org/browse/ISPN-8385
> Project: Infinispan
> Issue Type: Bug
> Components: Core
> Affects Versions: 9.1.1.Final, 9.2.0.Alpha1
> Reporter: Vojtech Juranek
> Assignee: William Burns
>
> Off-heap container entries contain some additional bytes (ASCII 1,2,1,4), which probably shouldn't be there. Besides additional consumption of memory, it can cause problem as entry put into the cache with cache API is not accessible via container API (which is available to the use), i.e. something like this will fail:
> {noformat}
> cache.put(key, value);
> container = AbstractDelegatingCache.unwrapCache(cache).getAdvancedCache().getDataContainer();
> InternalCacheEntry entry = container.get(key);
> {noformat}
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
7 years, 2 months