On Wed, Jan 14, 2009 at 8:08 PM, Darryl L. Pierce <span dir="ltr"><<a href="mailto:dpierce@redhat.com">dpierce@redhat.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br><div class="Ih2E3d">If overt_overcommit is not present, then the default value used is 1.5.<br>
</div></blockquote><div><br>overt -> ovirt - or should we rename the project to make spell-checkers happy? :)<br><br>default should be 0.5 to get Dor's 150% - where 100% is real RAM and the rest is in swap<br><br>
</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="Ih2E3d"> # if we didn't find any devices using HAL, so check for virtual devices<br>
- if [ -z $devices ]; then devices=$(ls -l /dev/[shv]d?); fi<br>
+ if [ -z "$devices" ]; then devices=$(ls -l /dev/[shv]d?); fi<br>
</div></blockquote><div class="Ih2E3d"><br>please push that as a separate commit, otherwise we'll be confused few months from now when running git blame<br> <br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d">+if [ -z "$OVIRT_OVERCOMMIT" ]; then OVIRT_OVERCOMMIT="1.5"; fi</div></blockquote><div>0.5<br> <br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d"> SWAP_SIZE=${OVIRT_VOL_SWAP_SIZE:-$MEM_SIZE}</div></blockquote><div><br>if OVIRT_VOL_SWAP_SIZE is defined, it should be used w/o changes, we don't try to correct admin input,<br>so above line should come last<br>
<br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="Ih2E3d"><br>
+if [ $SWAP_SIZE -gt $MAX_SWAP_SIZE ]; then<br>
+ SWAP_SIZE=$MAX_SWAP_SIZE<br>
+fi<br>
+<br>
</div>+# add to the swap the amounts from <a href="http://kbase.redhat.com/faq/docs/DOC-15252" target="_blank">http://kbase.redhat.com/faq/docs/DOC-15252</a><br>
+# convert mem size to GB<br>
<div class="Ih2E3d">+mgb=$(echo "scale=0; $MEM_SIZE/1024;" | bc -l)<br>
+if [ $mgb -le 4 ]; then<br>
+ SWAP_SIZE=2<br>
+elif [ $mgb -le 16 ]; then<br>
+ SWAP_SIZE=4<br>
+elif [ $mgb -le 64 ]; then<br>
+ SWAP_SIZE=8<br>
+else<br>
+ SWAP_SIZE=16<br>
+fi<br>
+<br>
+SWAP_SIZE=$(echo "scale=0; ${SWAP_SIZE} * 1024;" | bc -l)<br>
</div></blockquote><div><br><br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br><div><div class="Wj3C7c">+ # ovirt_overcommit<br>
+ # set the swap size coefficient<br>
+ overcommit=1.5<br>
</div></div></blockquote><div>0.5<br><br></div></div><br>