You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hbase.apache.org by "Bryan Duxbury (JIRA)" <ji...@apache.org> on 2008/03/13 17:48:25 UTC
[jira] Created: (HBASE-512) Add configuration for global aggregate
memcache size
Add configuration for global aggregate memcache size
----------------------------------------------------
Key: HBASE-512
URL: https://issues.apache.org/jira/browse/HBASE-512
Project: Hadoop HBase
Issue Type: Sub-task
Reporter: Bryan Duxbury
Currently, we have a configuration parameter for the size a Memcache must reach before it is flushed. This leads to pretty even sized mapfiles when flushes run, which is nice. However, as noted in the parent issue, we can often get to a point where we run out of memory because too much data is hanging around in Memcaches.
I think that we should add a new configuration parameter that governs the total amount of memory that the region server should spend on Memcaches. This would have to be some number less than the heap size - we'll have to discover the proper values through experimentation. Then, when a put comes in, if the global aggregate size of all the Memcaches for all the stores is at the threshold, then we should block the current and any subsequent put operations from completing until forced flushes cause the memory usage to go back down to a safe level. The existing strategy for triggering flushes will still be in play, just augmented with this blocking behavior.
This approach has the advantage of helping us avoid OOME situations by warning us well in advance of overflow. Additionally, it becomes something of a performance tuning knob, allowing you to allocate more memory to improve write performance. This is superior to the previously suggested PhantomReference approach because that would possibly causes us to bump into further OOMEs while we're trying to flush to avoid them.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HBASE-512) Add configuration for global aggregate
memcache size
Posted by "Bryan Duxbury (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HBASE-512?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Bryan Duxbury updated HBASE-512:
--------------------------------
Component/s: regionserver
Fix Version/s: 0.1.0
> Add configuration for global aggregate memcache size
> ----------------------------------------------------
>
> Key: HBASE-512
> URL: https://issues.apache.org/jira/browse/HBASE-512
> Project: Hadoop HBase
> Issue Type: Sub-task
> Components: regionserver
> Reporter: Bryan Duxbury
> Fix For: 0.1.0
>
>
> Currently, we have a configuration parameter for the size a Memcache must reach before it is flushed. This leads to pretty even sized mapfiles when flushes run, which is nice. However, as noted in the parent issue, we can often get to a point where we run out of memory because too much data is hanging around in Memcaches.
> I think that we should add a new configuration parameter that governs the total amount of memory that the region server should spend on Memcaches. This would have to be some number less than the heap size - we'll have to discover the proper values through experimentation. Then, when a put comes in, if the global aggregate size of all the Memcaches for all the stores is at the threshold, then we should block the current and any subsequent put operations from completing until forced flushes cause the memory usage to go back down to a safe level. The existing strategy for triggering flushes will still be in play, just augmented with this blocking behavior.
> This approach has the advantage of helping us avoid OOME situations by warning us well in advance of overflow. Additionally, it becomes something of a performance tuning knob, allowing you to allocate more memory to improve write performance. This is superior to the previously suggested PhantomReference approach because that would possibly causes us to bump into further OOMEs while we're trying to flush to avoid them.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HBASE-512) Add configuration for global
aggregate memcache size
Posted by "Jim Kellerman (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HBASE-512?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12581406#action_12581406 ]
Jim Kellerman commented on HBASE-512:
-------------------------------------
Is this a blocker for 0.1.0?
Can it be incorporated in 0.1.1?
> Add configuration for global aggregate memcache size
> ----------------------------------------------------
>
> Key: HBASE-512
> URL: https://issues.apache.org/jira/browse/HBASE-512
> Project: Hadoop HBase
> Issue Type: Sub-task
> Components: regionserver
> Reporter: Bryan Duxbury
> Fix For: 0.1.0
>
>
> Currently, we have a configuration parameter for the size a Memcache must reach before it is flushed. This leads to pretty even sized mapfiles when flushes run, which is nice. However, as noted in the parent issue, we can often get to a point where we run out of memory because too much data is hanging around in Memcaches.
> I think that we should add a new configuration parameter that governs the total amount of memory that the region server should spend on Memcaches. This would have to be some number less than the heap size - we'll have to discover the proper values through experimentation. Then, when a put comes in, if the global aggregate size of all the Memcaches for all the stores is at the threshold, then we should block the current and any subsequent put operations from completing until forced flushes cause the memory usage to go back down to a safe level. The existing strategy for triggering flushes will still be in play, just augmented with this blocking behavior.
> This approach has the advantage of helping us avoid OOME situations by warning us well in advance of overflow. Additionally, it becomes something of a performance tuning knob, allowing you to allocate more memory to improve write performance. This is superior to the previously suggested PhantomReference approach because that would possibly causes us to bump into further OOMEs while we're trying to flush to avoid them.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Assigned: (HBASE-512) Add configuration for global aggregate
memcache size
Posted by "Bryan Duxbury (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HBASE-512?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Bryan Duxbury reassigned HBASE-512:
-----------------------------------
Assignee: Bryan Duxbury
> Add configuration for global aggregate memcache size
> ----------------------------------------------------
>
> Key: HBASE-512
> URL: https://issues.apache.org/jira/browse/HBASE-512
> Project: Hadoop HBase
> Issue Type: Sub-task
> Components: regionserver
> Reporter: Bryan Duxbury
> Assignee: Bryan Duxbury
> Fix For: 0.2.0
>
>
> Currently, we have a configuration parameter for the size a Memcache must reach before it is flushed. This leads to pretty even sized mapfiles when flushes run, which is nice. However, as noted in the parent issue, we can often get to a point where we run out of memory because too much data is hanging around in Memcaches.
> I think that we should add a new configuration parameter that governs the total amount of memory that the region server should spend on Memcaches. This would have to be some number less than the heap size - we'll have to discover the proper values through experimentation. Then, when a put comes in, if the global aggregate size of all the Memcaches for all the stores is at the threshold, then we should block the current and any subsequent put operations from completing until forced flushes cause the memory usage to go back down to a safe level. The existing strategy for triggering flushes will still be in play, just augmented with this blocking behavior.
> This approach has the advantage of helping us avoid OOME situations by warning us well in advance of overflow. Additionally, it becomes something of a performance tuning knob, allowing you to allocate more memory to improve write performance. This is superior to the previously suggested PhantomReference approach because that would possibly causes us to bump into further OOMEs while we're trying to flush to avoid them.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HBASE-512) Add configuration for global aggregate
memcache size
Posted by "Bryan Duxbury (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HBASE-512?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Bryan Duxbury updated HBASE-512:
--------------------------------
Attachment: 512.patch
First draft. There's a new test, TestGlobalMemcacheLimit, that checks this behavior. This test passes, and I'm running the rest of the suite right now.
> Add configuration for global aggregate memcache size
> ----------------------------------------------------
>
> Key: HBASE-512
> URL: https://issues.apache.org/jira/browse/HBASE-512
> Project: Hadoop HBase
> Issue Type: Sub-task
> Components: regionserver
> Reporter: Bryan Duxbury
> Assignee: Bryan Duxbury
> Fix For: 0.2.0
>
> Attachments: 512.patch
>
>
> Currently, we have a configuration parameter for the size a Memcache must reach before it is flushed. This leads to pretty even sized mapfiles when flushes run, which is nice. However, as noted in the parent issue, we can often get to a point where we run out of memory because too much data is hanging around in Memcaches.
> I think that we should add a new configuration parameter that governs the total amount of memory that the region server should spend on Memcaches. This would have to be some number less than the heap size - we'll have to discover the proper values through experimentation. Then, when a put comes in, if the global aggregate size of all the Memcaches for all the stores is at the threshold, then we should block the current and any subsequent put operations from completing until forced flushes cause the memory usage to go back down to a safe level. The existing strategy for triggering flushes will still be in play, just augmented with this blocking behavior.
> This approach has the advantage of helping us avoid OOME situations by warning us well in advance of overflow. Additionally, it becomes something of a performance tuning knob, allowing you to allocate more memory to improve write performance. This is superior to the previously suggested PhantomReference approach because that would possibly causes us to bump into further OOMEs while we're trying to flush to avoid them.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HBASE-512) Add configuration for global aggregate
memcache size
Posted by "Bryan Duxbury (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HBASE-512?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Bryan Duxbury updated HBASE-512:
--------------------------------
Status: Patch Available (was: Open)
Please review.
> Add configuration for global aggregate memcache size
> ----------------------------------------------------
>
> Key: HBASE-512
> URL: https://issues.apache.org/jira/browse/HBASE-512
> Project: Hadoop HBase
> Issue Type: Sub-task
> Components: regionserver
> Reporter: Bryan Duxbury
> Assignee: Bryan Duxbury
> Fix For: 0.2.0
>
> Attachments: 512.patch
>
>
> Currently, we have a configuration parameter for the size a Memcache must reach before it is flushed. This leads to pretty even sized mapfiles when flushes run, which is nice. However, as noted in the parent issue, we can often get to a point where we run out of memory because too much data is hanging around in Memcaches.
> I think that we should add a new configuration parameter that governs the total amount of memory that the region server should spend on Memcaches. This would have to be some number less than the heap size - we'll have to discover the proper values through experimentation. Then, when a put comes in, if the global aggregate size of all the Memcaches for all the stores is at the threshold, then we should block the current and any subsequent put operations from completing until forced flushes cause the memory usage to go back down to a safe level. The existing strategy for triggering flushes will still be in play, just augmented with this blocking behavior.
> This approach has the advantage of helping us avoid OOME situations by warning us well in advance of overflow. Additionally, it becomes something of a performance tuning knob, allowing you to allocate more memory to improve write performance. This is superior to the previously suggested PhantomReference approach because that would possibly causes us to bump into further OOMEs while we're trying to flush to avoid them.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HBASE-512) Add configuration for global aggregate
memcache size
Posted by "Bryan Duxbury (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HBASE-512?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Bryan Duxbury updated HBASE-512:
--------------------------------
Fix Version/s: (was: 0.1.0)
0.2.0
Was meant to be fixed in 0.2 not 0.1.
> Add configuration for global aggregate memcache size
> ----------------------------------------------------
>
> Key: HBASE-512
> URL: https://issues.apache.org/jira/browse/HBASE-512
> Project: Hadoop HBase
> Issue Type: Sub-task
> Components: regionserver
> Reporter: Bryan Duxbury
> Fix For: 0.2.0
>
>
> Currently, we have a configuration parameter for the size a Memcache must reach before it is flushed. This leads to pretty even sized mapfiles when flushes run, which is nice. However, as noted in the parent issue, we can often get to a point where we run out of memory because too much data is hanging around in Memcaches.
> I think that we should add a new configuration parameter that governs the total amount of memory that the region server should spend on Memcaches. This would have to be some number less than the heap size - we'll have to discover the proper values through experimentation. Then, when a put comes in, if the global aggregate size of all the Memcaches for all the stores is at the threshold, then we should block the current and any subsequent put operations from completing until forced flushes cause the memory usage to go back down to a safe level. The existing strategy for triggering flushes will still be in play, just augmented with this blocking behavior.
> This approach has the advantage of helping us avoid OOME situations by warning us well in advance of overflow. Additionally, it becomes something of a performance tuning knob, allowing you to allocate more memory to improve write performance. This is superior to the previously suggested PhantomReference approach because that would possibly causes us to bump into further OOMEs while we're trying to flush to avoid them.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HBASE-512) Add configuration for global
aggregate memcache size
Posted by "Jim Kellerman (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HBASE-512?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12586591#action_12586591 ]
Jim Kellerman commented on HBASE-512:
-------------------------------------
Much better overall.
Minor things:
Flusher.java
- flushSomeRegions does not throw IOException.
- consequently reclaimMemcacheMemory does not throw IOException
remove both throws clauses.
HRegionServer
- unused imports: java.util.{SortedMap, Comparator}
Otherwise +!
Good Job!
> Add configuration for global aggregate memcache size
> ----------------------------------------------------
>
> Key: HBASE-512
> URL: https://issues.apache.org/jira/browse/HBASE-512
> Project: Hadoop HBase
> Issue Type: Sub-task
> Components: regionserver
> Reporter: Bryan Duxbury
> Assignee: Bryan Duxbury
> Fix For: 0.2.0
>
> Attachments: 512-v2.patch, 512-v3.patch, 512.patch
>
>
> Currently, we have a configuration parameter for the size a Memcache must reach before it is flushed. This leads to pretty even sized mapfiles when flushes run, which is nice. However, as noted in the parent issue, we can often get to a point where we run out of memory because too much data is hanging around in Memcaches.
> I think that we should add a new configuration parameter that governs the total amount of memory that the region server should spend on Memcaches. This would have to be some number less than the heap size - we'll have to discover the proper values through experimentation. Then, when a put comes in, if the global aggregate size of all the Memcaches for all the stores is at the threshold, then we should block the current and any subsequent put operations from completing until forced flushes cause the memory usage to go back down to a safe level. The existing strategy for triggering flushes will still be in play, just augmented with this blocking behavior.
> This approach has the advantage of helping us avoid OOME situations by warning us well in advance of overflow. Additionally, it becomes something of a performance tuning knob, allowing you to allocate more memory to improve write performance. This is superior to the previously suggested PhantomReference approach because that would possibly causes us to bump into further OOMEs while we're trying to flush to avoid them.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HBASE-512) Add configuration for global aggregate
memcache size
Posted by "Bryan Duxbury (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HBASE-512?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Bryan Duxbury updated HBASE-512:
--------------------------------
Attachment: 512-v3.patch
Changes discussed with Jim.
> Add configuration for global aggregate memcache size
> ----------------------------------------------------
>
> Key: HBASE-512
> URL: https://issues.apache.org/jira/browse/HBASE-512
> Project: Hadoop HBase
> Issue Type: Sub-task
> Components: regionserver
> Reporter: Bryan Duxbury
> Assignee: Bryan Duxbury
> Fix For: 0.2.0
>
> Attachments: 512-v2.patch, 512-v3.patch, 512.patch
>
>
> Currently, we have a configuration parameter for the size a Memcache must reach before it is flushed. This leads to pretty even sized mapfiles when flushes run, which is nice. However, as noted in the parent issue, we can often get to a point where we run out of memory because too much data is hanging around in Memcaches.
> I think that we should add a new configuration parameter that governs the total amount of memory that the region server should spend on Memcaches. This would have to be some number less than the heap size - we'll have to discover the proper values through experimentation. Then, when a put comes in, if the global aggregate size of all the Memcaches for all the stores is at the threshold, then we should block the current and any subsequent put operations from completing until forced flushes cause the memory usage to go back down to a safe level. The existing strategy for triggering flushes will still be in play, just augmented with this blocking behavior.
> This approach has the advantage of helping us avoid OOME situations by warning us well in advance of overflow. Additionally, it becomes something of a performance tuning knob, allowing you to allocate more memory to improve write performance. This is superior to the previously suggested PhantomReference approach because that would possibly causes us to bump into further OOMEs while we're trying to flush to avoid them.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HBASE-512) Add configuration for global
aggregate memcache size
Posted by "Jim Kellerman (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HBASE-512?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12586497#action_12586497 ]
Jim Kellerman commented on HBASE-512:
-------------------------------------
LocalHBaseCluster: missing javadoc for public method getRegionServer.
HRegionServer:
- concurrency. Change
{code}
biggestMemcacheRegion.flushcache();
{code}
to
{code}
getCacheFlushListener().flushRequested(biggestMemcacheRegion);
{code}
- type safety. Change
{code}
SortedMap<Long, HRegion> sortedRegions = new TreeMap<Long, HRegion>(
new Comparator() {
public int compare(Object a, Object b) {
Long a_l = (Long)a;
Long b_l = (Long)b;
return -1 * a_l.compareTo(b_l);
}
}
);
{code}
to
{code}
SortedMap<Long, HRegion> sortedRegions = new TreeMap<Long, HRegion>(
new Comparator<Long>() {
public int compare(Long a, Long b) {
return -1 * a.compareTo(b);
}
}
);
{code}
HStore, HMemcache: only whitespace differences. Need to be included in patch?
TestGlobalMemcacheLimit:
- unused:
{code}
private static final Log LOG =
LogFactory.getLog(TestGlobalMemcacheLimit.class.getName());
{code}
- unused imports:
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.hadoop.hbase.HConstants;
> Add configuration for global aggregate memcache size
> ----------------------------------------------------
>
> Key: HBASE-512
> URL: https://issues.apache.org/jira/browse/HBASE-512
> Project: Hadoop HBase
> Issue Type: Sub-task
> Components: regionserver
> Reporter: Bryan Duxbury
> Assignee: Bryan Duxbury
> Fix For: 0.2.0
>
> Attachments: 512.patch
>
>
> Currently, we have a configuration parameter for the size a Memcache must reach before it is flushed. This leads to pretty even sized mapfiles when flushes run, which is nice. However, as noted in the parent issue, we can often get to a point where we run out of memory because too much data is hanging around in Memcaches.
> I think that we should add a new configuration parameter that governs the total amount of memory that the region server should spend on Memcaches. This would have to be some number less than the heap size - we'll have to discover the proper values through experimentation. Then, when a put comes in, if the global aggregate size of all the Memcaches for all the stores is at the threshold, then we should block the current and any subsequent put operations from completing until forced flushes cause the memory usage to go back down to a safe level. The existing strategy for triggering flushes will still be in play, just augmented with this blocking behavior.
> This approach has the advantage of helping us avoid OOME situations by warning us well in advance of overflow. Additionally, it becomes something of a performance tuning knob, allowing you to allocate more memory to improve write performance. This is superior to the previously suggested PhantomReference approach because that would possibly causes us to bump into further OOMEs while we're trying to flush to avoid them.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HBASE-512) Add configuration for global
aggregate memcache size
Posted by "Bryan Duxbury (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HBASE-512?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12586544#action_12586544 ]
Bryan Duxbury commented on HBASE-512:
-------------------------------------
The whole point of this issue is to tie up a server thread - in fact all of them - while we wait for memory usage to go down. The objective is to make it so that in situations like the sequential performance evaluation, region servers will not take on so many puts that they'll explode.
If flushImmediately was called on a region that was already being flushed, then the flush lock would be locked, and flushImmediately would block until it acquired the lock. It would then find that the region didn't need to be flushed (assuming HRegion.flushcache() has the smarts to do that).
Adding a "high priority queue" would make some flushes happen faster, but not immediately, and not in a fashion that blocks the region server from taking on more puts.
> Add configuration for global aggregate memcache size
> ----------------------------------------------------
>
> Key: HBASE-512
> URL: https://issues.apache.org/jira/browse/HBASE-512
> Project: Hadoop HBase
> Issue Type: Sub-task
> Components: regionserver
> Reporter: Bryan Duxbury
> Assignee: Bryan Duxbury
> Fix For: 0.2.0
>
> Attachments: 512-v2.patch, 512.patch
>
>
> Currently, we have a configuration parameter for the size a Memcache must reach before it is flushed. This leads to pretty even sized mapfiles when flushes run, which is nice. However, as noted in the parent issue, we can often get to a point where we run out of memory because too much data is hanging around in Memcaches.
> I think that we should add a new configuration parameter that governs the total amount of memory that the region server should spend on Memcaches. This would have to be some number less than the heap size - we'll have to discover the proper values through experimentation. Then, when a put comes in, if the global aggregate size of all the Memcaches for all the stores is at the threshold, then we should block the current and any subsequent put operations from completing until forced flushes cause the memory usage to go back down to a safe level. The existing strategy for triggering flushes will still be in play, just augmented with this blocking behavior.
> This approach has the advantage of helping us avoid OOME situations by warning us well in advance of overflow. Additionally, it becomes something of a performance tuning knob, allowing you to allocate more memory to improve write performance. This is superior to the previously suggested PhantomReference approach because that would possibly causes us to bump into further OOMEs while we're trying to flush to avoid them.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HBASE-512) Add configuration for global
aggregate memcache size
Posted by "Jim Kellerman (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HBASE-512?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12586535#action_12586535 ]
Jim Kellerman commented on HBASE-512:
-------------------------------------
LocalHBaseCluster: no javadoc for public method getRegionServer
-1 on flushImmediately.
When called from HRegionServer.flushSomeRegions, you are tying up a Server thread processing a batchUpdate for the duration of one or more cache flushes.
The whole point of queuing requests is so the cacheFlusher can do its thing while other threads continue. What would happen if HRegionServer called flushImmediately while the Flusher was already flushing the same region?
How about adding a "high priority" queue, that the flusher checks before the normal flush queue?
> Add configuration for global aggregate memcache size
> ----------------------------------------------------
>
> Key: HBASE-512
> URL: https://issues.apache.org/jira/browse/HBASE-512
> Project: Hadoop HBase
> Issue Type: Sub-task
> Components: regionserver
> Reporter: Bryan Duxbury
> Assignee: Bryan Duxbury
> Fix For: 0.2.0
>
> Attachments: 512-v2.patch, 512.patch
>
>
> Currently, we have a configuration parameter for the size a Memcache must reach before it is flushed. This leads to pretty even sized mapfiles when flushes run, which is nice. However, as noted in the parent issue, we can often get to a point where we run out of memory because too much data is hanging around in Memcaches.
> I think that we should add a new configuration parameter that governs the total amount of memory that the region server should spend on Memcaches. This would have to be some number less than the heap size - we'll have to discover the proper values through experimentation. Then, when a put comes in, if the global aggregate size of all the Memcaches for all the stores is at the threshold, then we should block the current and any subsequent put operations from completing until forced flushes cause the memory usage to go back down to a safe level. The existing strategy for triggering flushes will still be in play, just augmented with this blocking behavior.
> This approach has the advantage of helping us avoid OOME situations by warning us well in advance of overflow. Additionally, it becomes something of a performance tuning knob, allowing you to allocate more memory to improve write performance. This is superior to the previously suggested PhantomReference approach because that would possibly causes us to bump into further OOMEs while we're trying to flush to avoid them.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HBASE-512) Add configuration for global aggregate
memcache size
Posted by "Bryan Duxbury (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HBASE-512?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Bryan Duxbury updated HBASE-512:
--------------------------------
Attachment: 512-v2.patch
Fixed the "type safety" and unused imports issue.
As to the concurrency point raised, there was indeed a concurrency problem, but the suggested solution won't work because it would only queue regions to be flushed eventually. That's not a strong enough guarantee in terms of reducing memcache usage immediately. So, I added the flushImmediately method to Flusher that allows you to immediately and safely cause a region to flush.
All unit tests still pass.
> Add configuration for global aggregate memcache size
> ----------------------------------------------------
>
> Key: HBASE-512
> URL: https://issues.apache.org/jira/browse/HBASE-512
> Project: Hadoop HBase
> Issue Type: Sub-task
> Components: regionserver
> Reporter: Bryan Duxbury
> Assignee: Bryan Duxbury
> Fix For: 0.2.0
>
> Attachments: 512-v2.patch, 512.patch
>
>
> Currently, we have a configuration parameter for the size a Memcache must reach before it is flushed. This leads to pretty even sized mapfiles when flushes run, which is nice. However, as noted in the parent issue, we can often get to a point where we run out of memory because too much data is hanging around in Memcaches.
> I think that we should add a new configuration parameter that governs the total amount of memory that the region server should spend on Memcaches. This would have to be some number less than the heap size - we'll have to discover the proper values through experimentation. Then, when a put comes in, if the global aggregate size of all the Memcaches for all the stores is at the threshold, then we should block the current and any subsequent put operations from completing until forced flushes cause the memory usage to go back down to a safe level. The existing strategy for triggering flushes will still be in play, just augmented with this blocking behavior.
> This approach has the advantage of helping us avoid OOME situations by warning us well in advance of overflow. Additionally, it becomes something of a performance tuning knob, allowing you to allocate more memory to improve write performance. This is superior to the previously suggested PhantomReference approach because that would possibly causes us to bump into further OOMEs while we're trying to flush to avoid them.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HBASE-512) Add configuration for global aggregate
memcache size
Posted by "Bryan Duxbury (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HBASE-512?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Bryan Duxbury updated HBASE-512:
--------------------------------
Resolution: Fixed
Status: Resolved (was: Patch Available)
Committed to trunk.
> Add configuration for global aggregate memcache size
> ----------------------------------------------------
>
> Key: HBASE-512
> URL: https://issues.apache.org/jira/browse/HBASE-512
> Project: Hadoop HBase
> Issue Type: Sub-task
> Components: regionserver
> Reporter: Bryan Duxbury
> Assignee: Bryan Duxbury
> Fix For: 0.2.0
>
> Attachments: 512-v2.patch, 512-v3.patch, 512.patch
>
>
> Currently, we have a configuration parameter for the size a Memcache must reach before it is flushed. This leads to pretty even sized mapfiles when flushes run, which is nice. However, as noted in the parent issue, we can often get to a point where we run out of memory because too much data is hanging around in Memcaches.
> I think that we should add a new configuration parameter that governs the total amount of memory that the region server should spend on Memcaches. This would have to be some number less than the heap size - we'll have to discover the proper values through experimentation. Then, when a put comes in, if the global aggregate size of all the Memcaches for all the stores is at the threshold, then we should block the current and any subsequent put operations from completing until forced flushes cause the memory usage to go back down to a safe level. The existing strategy for triggering flushes will still be in play, just augmented with this blocking behavior.
> This approach has the advantage of helping us avoid OOME situations by warning us well in advance of overflow. Additionally, it becomes something of a performance tuning knob, allowing you to allocate more memory to improve write performance. This is superior to the previously suggested PhantomReference approach because that would possibly causes us to bump into further OOMEs while we're trying to flush to avoid them.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.