You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Jonathan Ellis (JIRA)" <ji...@apache.org> on 2010/09/04 17:30:33 UTC
[jira] Created: (CASSANDRA-1469) adaptive default heap size
adaptive default heap size
--------------------------
Key: CASSANDRA-1469
URL: https://issues.apache.org/jira/browse/CASSANDRA-1469
Project: Cassandra
Issue Type: New Feature
Components: Packaging
Reporter: Jonathan Ellis
Fix For: 0.7 beta 2
Cassandra comes out of the box with very conservative defaults, especially in -Xmx and memtable sizes, which leads to complaints of poor performance or even OOM conditions under heavy load. But changing these to be aggressive can cause the same problem: most servers enable swap out of the box, so asking for a 4GB or 8GB heap could allocate happily but also cause problems when it starts paging.
Proposed solution is to update the start script to set Xmx to half of system ram ("free -m | awk '/Mem:/ {print $2}'"). Memtable defaults will have to be handled by Java, but we can do that based on heap size (Runtime.maxMemory).
An alternative suggestion was to provide "small", "medium", "large" configurations, but this plays poorly with rpm and deb packages. I think the adaptive approach is more promising.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (CASSANDRA-1469) adaptive default heap size
Posted by "Eric Evans (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-1469?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12909308#action_12909308 ]
Eric Evans commented on CASSANDRA-1469:
---------------------------------------
Actually, a cleaner way might be to document the max heap size in -env (by commenting it out), and then set it adaptively when it's zero-length.
{noformat}
if [ "x$MAX_HEAP_SIZE" = "x" ]; then
MAX_HEAP_SIZE=`calculate_heap_size`
fi
{noformat}
> adaptive default heap size
> --------------------------
>
> Key: CASSANDRA-1469
> URL: https://issues.apache.org/jira/browse/CASSANDRA-1469
> Project: Cassandra
> Issue Type: New Feature
> Components: Packaging
> Reporter: Jonathan Ellis
> Assignee: Brandon Williams
> Fix For: 0.7.0
>
> Attachments: 0001_adaptively_determine_heap_size.txt
>
>
> Cassandra comes out of the box with very conservative defaults, especially in -Xmx and memtable sizes, which leads to complaints of poor performance or even OOM conditions under heavy load. But changing these to be aggressive can cause the same problem: most servers enable swap out of the box, so asking for a 4GB or 8GB heap could allocate happily but also cause problems when it starts paging.
> Proposed solution is to update the start script to set Xmx to half of system ram ("free -m | awk '/Mem:/ {print $2}'"). Memtable defaults will have to be handled by Java, but we can do that based on heap size (Runtime.maxMemory).
> An alternative suggestion was to provide "small", "medium", "large" configurations, but this plays poorly with rpm and deb packages. I think the adaptive approach is more promising.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Issue Comment Edited: (CASSANDRA-1469) adaptive default heap
size
Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-1469?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12908946#action_12908946 ]
Jonathan Ellis edited comment on CASSANDRA-1469 at 9/13/10 3:19 PM:
--------------------------------------------------------------------
wouldn't it be cleaner to have something like
{noformat}
# logic to compute ADAPTIVE_HEAP_SIZE
MAX_HEAP_SIZE="$ADAPTIVE_HEAP_SIZE" # override to force specific heap size, e.g. "6GB"
{noformat}
also, can you update the debian script too?
was (Author: jbellis):
wouldn't it be cleaner to have something like
[code]
# logic to compute ADAPTIVE_HEAP_SIZE
MAX_HEAP_SIZE="$ADAPTIVE_HEAP_SIZE" # override to force specific heap size, e.g. "6GB"
[code]
also, can you update the debian script too?
> adaptive default heap size
> --------------------------
>
> Key: CASSANDRA-1469
> URL: https://issues.apache.org/jira/browse/CASSANDRA-1469
> Project: Cassandra
> Issue Type: New Feature
> Components: Packaging
> Reporter: Jonathan Ellis
> Assignee: Brandon Williams
> Fix For: 0.7.0
>
> Attachments: 0001_adaptively_determine_heap_size.txt
>
>
> Cassandra comes out of the box with very conservative defaults, especially in -Xmx and memtable sizes, which leads to complaints of poor performance or even OOM conditions under heavy load. But changing these to be aggressive can cause the same problem: most servers enable swap out of the box, so asking for a 4GB or 8GB heap could allocate happily but also cause problems when it starts paging.
> Proposed solution is to update the start script to set Xmx to half of system ram ("free -m | awk '/Mem:/ {print $2}'"). Memtable defaults will have to be handled by Java, but we can do that based on heap size (Runtime.maxMemory).
> An alternative suggestion was to provide "small", "medium", "large" configurations, but this plays poorly with rpm and deb packages. I think the adaptive approach is more promising.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Issue Comment Edited: (CASSANDRA-1469) adaptive default heap
size
Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-1469?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12908946#action_12908946 ]
Jonathan Ellis edited comment on CASSANDRA-1469 at 9/13/10 3:17 PM:
--------------------------------------------------------------------
wouldn't it be cleaner to have something like
[code]
# logic to compute ADAPTIVE_HEAP_SIZE
MAX_HEAP_SIZE="$ADAPTIVE_HEAP_SIZE" # override to force specific heap size, e.g. "6GB"
[code]
also, can you update the debian script too?
was (Author: jbellis):
wouldn't it be cleaner to have something like
# logic to compute ADAPTIVE_HEAP_SIZE
MAX_HEAP_SIZE="$ADAPTIVE_HEAP_SIZE" # override to force specific heap size, e.g. "6GB"
also, can you update the debian script too?
> adaptive default heap size
> --------------------------
>
> Key: CASSANDRA-1469
> URL: https://issues.apache.org/jira/browse/CASSANDRA-1469
> Project: Cassandra
> Issue Type: New Feature
> Components: Packaging
> Reporter: Jonathan Ellis
> Assignee: Brandon Williams
> Fix For: 0.7.0
>
> Attachments: 0001_adaptively_determine_heap_size.txt
>
>
> Cassandra comes out of the box with very conservative defaults, especially in -Xmx and memtable sizes, which leads to complaints of poor performance or even OOM conditions under heavy load. But changing these to be aggressive can cause the same problem: most servers enable swap out of the box, so asking for a 4GB or 8GB heap could allocate happily but also cause problems when it starts paging.
> Proposed solution is to update the start script to set Xmx to half of system ram ("free -m | awk '/Mem:/ {print $2}'"). Memtable defaults will have to be handled by Java, but we can do that based on heap size (Runtime.maxMemory).
> An alternative suggestion was to provide "small", "medium", "large" configurations, but this plays poorly with rpm and deb packages. I think the adaptive approach is more promising.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (CASSANDRA-1469) adaptive default heap size
Posted by "Brandon Williams (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-1469?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12908955#action_12908955 ]
Brandon Williams commented on CASSANDRA-1469:
---------------------------------------------
I agree it would be cleaner, but embedding logic in cassandra-env.sh felt wrong, since it's all just config, and the logic can't be moved to bin/cassandra, because it is the parent that sources cassandra-env.
> adaptive default heap size
> --------------------------
>
> Key: CASSANDRA-1469
> URL: https://issues.apache.org/jira/browse/CASSANDRA-1469
> Project: Cassandra
> Issue Type: New Feature
> Components: Packaging
> Reporter: Jonathan Ellis
> Assignee: Brandon Williams
> Fix For: 0.7.0
>
> Attachments: 0001_adaptively_determine_heap_size.txt
>
>
> Cassandra comes out of the box with very conservative defaults, especially in -Xmx and memtable sizes, which leads to complaints of poor performance or even OOM conditions under heavy load. But changing these to be aggressive can cause the same problem: most servers enable swap out of the box, so asking for a 4GB or 8GB heap could allocate happily but also cause problems when it starts paging.
> Proposed solution is to update the start script to set Xmx to half of system ram ("free -m | awk '/Mem:/ {print $2}'"). Memtable defaults will have to be handled by Java, but we can do that based on heap size (Runtime.maxMemory).
> An alternative suggestion was to provide "small", "medium", "large" configurations, but this plays poorly with rpm and deb packages. I think the adaptive approach is more promising.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (CASSANDRA-1469) adaptive default heap size
Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-1469?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12909489#action_12909489 ]
Jonathan Ellis commented on CASSANDRA-1469:
-------------------------------------------
let's use 1/8 or 1/10, you can have active memtable + one being flushed + one in FWP pendingtask queue from a single CF.
> adaptive default heap size
> --------------------------
>
> Key: CASSANDRA-1469
> URL: https://issues.apache.org/jira/browse/CASSANDRA-1469
> Project: Cassandra
> Issue Type: New Feature
> Components: Packaging
> Reporter: Jonathan Ellis
> Assignee: Brandon Williams
> Fix For: 0.7.0
>
> Attachments: 0001_adaptively_determine_heap_size.txt, 0002_determine_memtable_thresholds_at_runtime.txt
>
>
> Cassandra comes out of the box with very conservative defaults, especially in -Xmx and memtable sizes, which leads to complaints of poor performance or even OOM conditions under heavy load. But changing these to be aggressive can cause the same problem: most servers enable swap out of the box, so asking for a 4GB or 8GB heap could allocate happily but also cause problems when it starts paging.
> Proposed solution is to update the start script to set Xmx to half of system ram ("free -m | awk '/Mem:/ {print $2}'"). Memtable defaults will have to be handled by Java, but we can do that based on heap size (Runtime.maxMemory).
> An alternative suggestion was to provide "small", "medium", "large" configurations, but this plays poorly with rpm and deb packages. I think the adaptive approach is more promising.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Assigned: (CASSANDRA-1469) adaptive default heap size
Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-1469?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jonathan Ellis reassigned CASSANDRA-1469:
-----------------------------------------
Assignee: Brandon Williams
> adaptive default heap size
> --------------------------
>
> Key: CASSANDRA-1469
> URL: https://issues.apache.org/jira/browse/CASSANDRA-1469
> Project: Cassandra
> Issue Type: New Feature
> Components: Packaging
> Reporter: Jonathan Ellis
> Assignee: Brandon Williams
> Fix For: 0.7 beta 2
>
>
> Cassandra comes out of the box with very conservative defaults, especially in -Xmx and memtable sizes, which leads to complaints of poor performance or even OOM conditions under heavy load. But changing these to be aggressive can cause the same problem: most servers enable swap out of the box, so asking for a 4GB or 8GB heap could allocate happily but also cause problems when it starts paging.
> Proposed solution is to update the start script to set Xmx to half of system ram ("free -m | awk '/Mem:/ {print $2}'"). Memtable defaults will have to be handled by Java, but we can do that based on heap size (Runtime.maxMemory).
> An alternative suggestion was to provide "small", "medium", "large" configurations, but this plays poorly with rpm and deb packages. I think the adaptive approach is more promising.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (CASSANDRA-1469) adaptive default heap size
Posted by "Eric Evans (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-1469?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12909277#action_12909277 ]
Eric Evans commented on CASSANDRA-1469:
---------------------------------------
bq. i think "determine adaptive heap size" in -env is within its scope
I agree.
> adaptive default heap size
> --------------------------
>
> Key: CASSANDRA-1469
> URL: https://issues.apache.org/jira/browse/CASSANDRA-1469
> Project: Cassandra
> Issue Type: New Feature
> Components: Packaging
> Reporter: Jonathan Ellis
> Assignee: Brandon Williams
> Fix For: 0.7.0
>
> Attachments: 0001_adaptively_determine_heap_size.txt
>
>
> Cassandra comes out of the box with very conservative defaults, especially in -Xmx and memtable sizes, which leads to complaints of poor performance or even OOM conditions under heavy load. But changing these to be aggressive can cause the same problem: most servers enable swap out of the box, so asking for a 4GB or 8GB heap could allocate happily but also cause problems when it starts paging.
> Proposed solution is to update the start script to set Xmx to half of system ram ("free -m | awk '/Mem:/ {print $2}'"). Memtable defaults will have to be handled by Java, but we can do that based on heap size (Runtime.maxMemory).
> An alternative suggestion was to provide "small", "medium", "large" configurations, but this plays poorly with rpm and deb packages. I think the adaptive approach is more promising.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (CASSANDRA-1469) adaptive default heap size
Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-1469?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jonathan Ellis updated CASSANDRA-1469:
--------------------------------------
Fix Version/s: 0.7.0
(was: 0.7 beta 2)
> adaptive default heap size
> --------------------------
>
> Key: CASSANDRA-1469
> URL: https://issues.apache.org/jira/browse/CASSANDRA-1469
> Project: Cassandra
> Issue Type: New Feature
> Components: Packaging
> Reporter: Jonathan Ellis
> Assignee: Brandon Williams
> Fix For: 0.7.0
>
>
> Cassandra comes out of the box with very conservative defaults, especially in -Xmx and memtable sizes, which leads to complaints of poor performance or even OOM conditions under heavy load. But changing these to be aggressive can cause the same problem: most servers enable swap out of the box, so asking for a 4GB or 8GB heap could allocate happily but also cause problems when it starts paging.
> Proposed solution is to update the start script to set Xmx to half of system ram ("free -m | awk '/Mem:/ {print $2}'"). Memtable defaults will have to be handled by Java, but we can do that based on heap size (Runtime.maxMemory).
> An alternative suggestion was to provide "small", "medium", "large" configurations, but this plays poorly with rpm and deb packages. I think the adaptive approach is more promising.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (CASSANDRA-1469) adaptive default heap size
Posted by "Hudson (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-1469?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12909765#action_12909765 ]
Hudson commented on CASSANDRA-1469:
-----------------------------------
Integrated in Cassandra #536 (See [https://hudson.apache.org/hudson/job/Cassandra/536/])
Adaptively set the heap size and memtable thresholds at runtime. Patch by brandonwilliams, reviewed by jbellis for CASSANDRA-1469
> adaptive default heap size
> --------------------------
>
> Key: CASSANDRA-1469
> URL: https://issues.apache.org/jira/browse/CASSANDRA-1469
> Project: Cassandra
> Issue Type: New Feature
> Components: Packaging
> Reporter: Jonathan Ellis
> Assignee: Brandon Williams
> Fix For: 0.7.0
>
> Attachments: 0001_adaptively_determine_heap_size.txt, 0002_determine_memtable_thresholds_at_runtime.txt
>
>
> Cassandra comes out of the box with very conservative defaults, especially in -Xmx and memtable sizes, which leads to complaints of poor performance or even OOM conditions under heavy load. But changing these to be aggressive can cause the same problem: most servers enable swap out of the box, so asking for a 4GB or 8GB heap could allocate happily but also cause problems when it starts paging.
> Proposed solution is to update the start script to set Xmx to half of system ram ("free -m | awk '/Mem:/ {print $2}'"). Memtable defaults will have to be handled by Java, but we can do that based on heap size (Runtime.maxMemory).
> An alternative suggestion was to provide "small", "medium", "large" configurations, but this plays poorly with rpm and deb packages. I think the adaptive approach is more promising.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (CASSANDRA-1469) adaptive default heap size
Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-1469?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12909490#action_12909490 ]
Jonathan Ellis commented on CASSANDRA-1469:
-------------------------------------------
+1 otherwise
> adaptive default heap size
> --------------------------
>
> Key: CASSANDRA-1469
> URL: https://issues.apache.org/jira/browse/CASSANDRA-1469
> Project: Cassandra
> Issue Type: New Feature
> Components: Packaging
> Reporter: Jonathan Ellis
> Assignee: Brandon Williams
> Fix For: 0.7.0
>
> Attachments: 0001_adaptively_determine_heap_size.txt, 0002_determine_memtable_thresholds_at_runtime.txt
>
>
> Cassandra comes out of the box with very conservative defaults, especially in -Xmx and memtable sizes, which leads to complaints of poor performance or even OOM conditions under heavy load. But changing these to be aggressive can cause the same problem: most servers enable swap out of the box, so asking for a 4GB or 8GB heap could allocate happily but also cause problems when it starts paging.
> Proposed solution is to update the start script to set Xmx to half of system ram ("free -m | awk '/Mem:/ {print $2}'"). Memtable defaults will have to be handled by Java, but we can do that based on heap size (Runtime.maxMemory).
> An alternative suggestion was to provide "small", "medium", "large" configurations, but this plays poorly with rpm and deb packages. I think the adaptive approach is more promising.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (CASSANDRA-1469) adaptive default heap size
Posted by "Brandon Williams (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-1469?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Brandon Williams updated CASSANDRA-1469:
----------------------------------------
Attachment: (was: 0001_adaptively_determine_heap_size.txt)
> adaptive default heap size
> --------------------------
>
> Key: CASSANDRA-1469
> URL: https://issues.apache.org/jira/browse/CASSANDRA-1469
> Project: Cassandra
> Issue Type: New Feature
> Components: Packaging
> Reporter: Jonathan Ellis
> Assignee: Brandon Williams
> Fix For: 0.7.0
>
>
> Cassandra comes out of the box with very conservative defaults, especially in -Xmx and memtable sizes, which leads to complaints of poor performance or even OOM conditions under heavy load. But changing these to be aggressive can cause the same problem: most servers enable swap out of the box, so asking for a 4GB or 8GB heap could allocate happily but also cause problems when it starts paging.
> Proposed solution is to update the start script to set Xmx to half of system ram ("free -m | awk '/Mem:/ {print $2}'"). Memtable defaults will have to be handled by Java, but we can do that based on heap size (Runtime.maxMemory).
> An alternative suggestion was to provide "small", "medium", "large" configurations, but this plays poorly with rpm and deb packages. I think the adaptive approach is more promising.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (CASSANDRA-1469) adaptive default heap size
Posted by "Brandon Williams (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-1469?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Brandon Williams updated CASSANDRA-1469:
----------------------------------------
Attachment: 0001_adaptively_determine_heap_size.txt
Updated patch which puts the logic in cassandra-env.sh
> adaptive default heap size
> --------------------------
>
> Key: CASSANDRA-1469
> URL: https://issues.apache.org/jira/browse/CASSANDRA-1469
> Project: Cassandra
> Issue Type: New Feature
> Components: Packaging
> Reporter: Jonathan Ellis
> Assignee: Brandon Williams
> Fix For: 0.7.0
>
> Attachments: 0001_adaptively_determine_heap_size.txt
>
>
> Cassandra comes out of the box with very conservative defaults, especially in -Xmx and memtable sizes, which leads to complaints of poor performance or even OOM conditions under heavy load. But changing these to be aggressive can cause the same problem: most servers enable swap out of the box, so asking for a 4GB or 8GB heap could allocate happily but also cause problems when it starts paging.
> Proposed solution is to update the start script to set Xmx to half of system ram ("free -m | awk '/Mem:/ {print $2}'"). Memtable defaults will have to be handled by Java, but we can do that based on heap size (Runtime.maxMemory).
> An alternative suggestion was to provide "small", "medium", "large" configurations, but this plays poorly with rpm and deb packages. I think the adaptive approach is more promising.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (CASSANDRA-1469) adaptive default heap size
Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-1469?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12909049#action_12909049 ]
Jonathan Ellis commented on CASSANDRA-1469:
-------------------------------------------
i think "determine adaptive heap size" in -env is within its scope
> adaptive default heap size
> --------------------------
>
> Key: CASSANDRA-1469
> URL: https://issues.apache.org/jira/browse/CASSANDRA-1469
> Project: Cassandra
> Issue Type: New Feature
> Components: Packaging
> Reporter: Jonathan Ellis
> Assignee: Brandon Williams
> Fix For: 0.7.0
>
> Attachments: 0001_adaptively_determine_heap_size.txt
>
>
> Cassandra comes out of the box with very conservative defaults, especially in -Xmx and memtable sizes, which leads to complaints of poor performance or even OOM conditions under heavy load. But changing these to be aggressive can cause the same problem: most servers enable swap out of the box, so asking for a 4GB or 8GB heap could allocate happily but also cause problems when it starts paging.
> Proposed solution is to update the start script to set Xmx to half of system ram ("free -m | awk '/Mem:/ {print $2}'"). Memtable defaults will have to be handled by Java, but we can do that based on heap size (Runtime.maxMemory).
> An alternative suggestion was to provide "small", "medium", "large" configurations, but this plays poorly with rpm and deb packages. I think the adaptive approach is more promising.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (CASSANDRA-1469) adaptive default heap size
Posted by "Brandon Williams (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-1469?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Brandon Williams updated CASSANDRA-1469:
----------------------------------------
Attachment: 0001_adaptively_determine_heap_size.txt
Patch to handle the shell script portion.
> adaptive default heap size
> --------------------------
>
> Key: CASSANDRA-1469
> URL: https://issues.apache.org/jira/browse/CASSANDRA-1469
> Project: Cassandra
> Issue Type: New Feature
> Components: Packaging
> Reporter: Jonathan Ellis
> Assignee: Brandon Williams
> Fix For: 0.7.0
>
> Attachments: 0001_adaptively_determine_heap_size.txt
>
>
> Cassandra comes out of the box with very conservative defaults, especially in -Xmx and memtable sizes, which leads to complaints of poor performance or even OOM conditions under heavy load. But changing these to be aggressive can cause the same problem: most servers enable swap out of the box, so asking for a 4GB or 8GB heap could allocate happily but also cause problems when it starts paging.
> Proposed solution is to update the start script to set Xmx to half of system ram ("free -m | awk '/Mem:/ {print $2}'"). Memtable defaults will have to be handled by Java, but we can do that based on heap size (Runtime.maxMemory).
> An alternative suggestion was to provide "small", "medium", "large" configurations, but this plays poorly with rpm and deb packages. I think the adaptive approach is more promising.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (CASSANDRA-1469) adaptive default heap size
Posted by "Matthew F. Dennis (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-1469?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12906351#action_12906351 ]
Matthew F. Dennis commented on CASSANDRA-1469:
----------------------------------------------
A hybrid solution is to have the small, medium, large configs and the start script just chooses and symlinks one on startup. This provides somewhat consistent sizing from user to user as well as letting us pick memtable defaults that work with the config in question.
> adaptive default heap size
> --------------------------
>
> Key: CASSANDRA-1469
> URL: https://issues.apache.org/jira/browse/CASSANDRA-1469
> Project: Cassandra
> Issue Type: New Feature
> Components: Packaging
> Reporter: Jonathan Ellis
> Fix For: 0.7 beta 2
>
>
> Cassandra comes out of the box with very conservative defaults, especially in -Xmx and memtable sizes, which leads to complaints of poor performance or even OOM conditions under heavy load. But changing these to be aggressive can cause the same problem: most servers enable swap out of the box, so asking for a 4GB or 8GB heap could allocate happily but also cause problems when it starts paging.
> Proposed solution is to update the start script to set Xmx to half of system ram ("free -m | awk '/Mem:/ {print $2}'"). Memtable defaults will have to be handled by Java, but we can do that based on heap size (Runtime.maxMemory).
> An alternative suggestion was to provide "small", "medium", "large" configurations, but this plays poorly with rpm and deb packages. I think the adaptive approach is more promising.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (CASSANDRA-1469) adaptive default heap size
Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-1469?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12908946#action_12908946 ]
Jonathan Ellis commented on CASSANDRA-1469:
-------------------------------------------
wouldn't it be cleaner to have something like
# logic to compute ADAPTIVE_HEAP_SIZE
MAX_HEAP_SIZE="$ADAPTIVE_HEAP_SIZE" # override to force specific heap size, e.g. "6GB"
also, can you update the debian script too?
> adaptive default heap size
> --------------------------
>
> Key: CASSANDRA-1469
> URL: https://issues.apache.org/jira/browse/CASSANDRA-1469
> Project: Cassandra
> Issue Type: New Feature
> Components: Packaging
> Reporter: Jonathan Ellis
> Assignee: Brandon Williams
> Fix For: 0.7.0
>
> Attachments: 0001_adaptively_determine_heap_size.txt
>
>
> Cassandra comes out of the box with very conservative defaults, especially in -Xmx and memtable sizes, which leads to complaints of poor performance or even OOM conditions under heavy load. But changing these to be aggressive can cause the same problem: most servers enable swap out of the box, so asking for a 4GB or 8GB heap could allocate happily but also cause problems when it starts paging.
> Proposed solution is to update the start script to set Xmx to half of system ram ("free -m | awk '/Mem:/ {print $2}'"). Memtable defaults will have to be handled by Java, but we can do that based on heap size (Runtime.maxMemory).
> An alternative suggestion was to provide "small", "medium", "large" configurations, but this plays poorly with rpm and deb packages. I think the adaptive approach is more promising.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (CASSANDRA-1469) adaptive default heap size
Posted by "Brandon Williams (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-1469?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Brandon Williams resolved CASSANDRA-1469.
-----------------------------------------
Resolution: Fixed
Committed with the memtable size changed to 1/8th of the heap.
> adaptive default heap size
> --------------------------
>
> Key: CASSANDRA-1469
> URL: https://issues.apache.org/jira/browse/CASSANDRA-1469
> Project: Cassandra
> Issue Type: New Feature
> Components: Packaging
> Reporter: Jonathan Ellis
> Assignee: Brandon Williams
> Fix For: 0.7.0
>
> Attachments: 0001_adaptively_determine_heap_size.txt, 0002_determine_memtable_thresholds_at_runtime.txt
>
>
> Cassandra comes out of the box with very conservative defaults, especially in -Xmx and memtable sizes, which leads to complaints of poor performance or even OOM conditions under heavy load. But changing these to be aggressive can cause the same problem: most servers enable swap out of the box, so asking for a 4GB or 8GB heap could allocate happily but also cause problems when it starts paging.
> Proposed solution is to update the start script to set Xmx to half of system ram ("free -m | awk '/Mem:/ {print $2}'"). Memtable defaults will have to be handled by Java, but we can do that based on heap size (Runtime.maxMemory).
> An alternative suggestion was to provide "small", "medium", "large" configurations, but this plays poorly with rpm and deb packages. I think the adaptive approach is more promising.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (CASSANDRA-1469) adaptive default heap size
Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-1469?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12909408#action_12909408 ]
Jonathan Ellis commented on CASSANDRA-1469:
-------------------------------------------
+1 (does the deb package use -env in 0.7 yet?)
> adaptive default heap size
> --------------------------
>
> Key: CASSANDRA-1469
> URL: https://issues.apache.org/jira/browse/CASSANDRA-1469
> Project: Cassandra
> Issue Type: New Feature
> Components: Packaging
> Reporter: Jonathan Ellis
> Assignee: Brandon Williams
> Fix For: 0.7.0
>
> Attachments: 0001_adaptively_determine_heap_size.txt
>
>
> Cassandra comes out of the box with very conservative defaults, especially in -Xmx and memtable sizes, which leads to complaints of poor performance or even OOM conditions under heavy load. But changing these to be aggressive can cause the same problem: most servers enable swap out of the box, so asking for a 4GB or 8GB heap could allocate happily but also cause problems when it starts paging.
> Proposed solution is to update the start script to set Xmx to half of system ram ("free -m | awk '/Mem:/ {print $2}'"). Memtable defaults will have to be handled by Java, but we can do that based on heap size (Runtime.maxMemory).
> An alternative suggestion was to provide "small", "medium", "large" configurations, but this plays poorly with rpm and deb packages. I think the adaptive approach is more promising.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (CASSANDRA-1469) adaptive default heap size
Posted by "Brandon Williams (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-1469?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Brandon Williams updated CASSANDRA-1469:
----------------------------------------
Attachment: 0002_determine_memtable_thresholds_at_runtime.txt
Patch to set memtable thresholds at runtime based on the amount of heap available. One fifth of the heap goes to the memtable, and the op threshold is based on $HEAP / 64 * 0.3. Of course if someone makes a bunch of memtables this will be too aggressive, but hopefully anyone seriously running Cassandra in production is explicitly declaring these settings.
> adaptive default heap size
> --------------------------
>
> Key: CASSANDRA-1469
> URL: https://issues.apache.org/jira/browse/CASSANDRA-1469
> Project: Cassandra
> Issue Type: New Feature
> Components: Packaging
> Reporter: Jonathan Ellis
> Assignee: Brandon Williams
> Fix For: 0.7.0
>
> Attachments: 0001_adaptively_determine_heap_size.txt, 0002_determine_memtable_thresholds_at_runtime.txt
>
>
> Cassandra comes out of the box with very conservative defaults, especially in -Xmx and memtable sizes, which leads to complaints of poor performance or even OOM conditions under heavy load. But changing these to be aggressive can cause the same problem: most servers enable swap out of the box, so asking for a 4GB or 8GB heap could allocate happily but also cause problems when it starts paging.
> Proposed solution is to update the start script to set Xmx to half of system ram ("free -m | awk '/Mem:/ {print $2}'"). Memtable defaults will have to be handled by Java, but we can do that based on heap size (Runtime.maxMemory).
> An alternative suggestion was to provide "small", "medium", "large" configurations, but this plays poorly with rpm and deb packages. I think the adaptive approach is more promising.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (CASSANDRA-1469) adaptive default heap size
Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-1469?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12909050#action_12909050 ]
Jonathan Ellis commented on CASSANDRA-1469:
-------------------------------------------
... especially since otherwise you're looking at duplicating that b/t standard and deb scripts, no?
> adaptive default heap size
> --------------------------
>
> Key: CASSANDRA-1469
> URL: https://issues.apache.org/jira/browse/CASSANDRA-1469
> Project: Cassandra
> Issue Type: New Feature
> Components: Packaging
> Reporter: Jonathan Ellis
> Assignee: Brandon Williams
> Fix For: 0.7.0
>
> Attachments: 0001_adaptively_determine_heap_size.txt
>
>
> Cassandra comes out of the box with very conservative defaults, especially in -Xmx and memtable sizes, which leads to complaints of poor performance or even OOM conditions under heavy load. But changing these to be aggressive can cause the same problem: most servers enable swap out of the box, so asking for a 4GB or 8GB heap could allocate happily but also cause problems when it starts paging.
> Proposed solution is to update the start script to set Xmx to half of system ram ("free -m | awk '/Mem:/ {print $2}'"). Memtable defaults will have to be handled by Java, but we can do that based on heap size (Runtime.maxMemory).
> An alternative suggestion was to provide "small", "medium", "large" configurations, but this plays poorly with rpm and deb packages. I think the adaptive approach is more promising.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.