Jesse Norell
2015-07-14 411a6f5299c2894a27ba26e4c0531b36615216ee
increase openvz privvmpages and vmguarpages limit
5 files modified
14 ■■■■ changed files
install/sql/ispconfig3.sql 2 ●●● patch | view | raw | blame | history
interface/lib/plugins/vm_openvz_plugin.inc.php 4 ●●●● patch | view | raw | blame | history
interface/web/vm/openvz_template_edit.php 2 ●●● patch | view | raw | blame | history
interface/web/vm/templates/openvz.conf.tpl 2 ●●● patch | view | raw | blame | history
remoting_client/examples/openvz_template_add.php 4 ●●●● patch | view | raw | blame | history
install/sql/ispconfig3.sql
@@ -1112,7 +1112,7 @@
-- Dumping data for table `openvz_template`
--
INSERT INTO `openvz_template` (`template_id`, `sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `template_name`, `diskspace`, `traffic`, `bandwidth`, `ram`, `ram_burst`, `cpu_units`, `cpu_num`, `cpu_limit`, `io_priority`, `active`, `description`, `numproc`, `numtcpsock`, `numothersock`, `vmguarpages`, `kmemsize`, `tcpsndbuf`, `tcprcvbuf`, `othersockbuf`, `dgramrcvbuf`, `oomguarpages`, `privvmpages`, `lockedpages`, `shmpages`, `physpages`, `numfile`, `avnumproc`, `numflock`, `numpty`, `numsiginfo`, `dcachesize`, `numiptent`, `swappages`, `hostname`, `nameserver`, `create_dns`, `capability`, `features`, `iptables`, `custom`) VALUES(1, 1, 1, 'riud', 'riud', '', 'small', 10, -1, -1, 256, 512, 1000, 4, 400, 4, 'y', '', '999999:999999', '7999992:7999992', '7999992:7999992', '65536:65536', '2147483646:2147483646', '214748160:396774400', '214748160:396774400', '214748160:396774400', '214748160:396774400', '65536:65536', '131072:131072', '999999:999999', '65536:65536', '0:2147483647', '23999976:23999976', '180:180', '999999:999999', '500000:500000', '999999:999999', '2147483646:2147483646', '999999:999999', '256000:256000', 'v{VEID}.test.tld', '8.8.8.8 8.8.4.4', 'n', '', '', '', '');
INSERT INTO `openvz_template` (`template_id`, `sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `template_name`, `diskspace`, `traffic`, `bandwidth`, `ram`, `ram_burst`, `cpu_units`, `cpu_num`, `cpu_limit`, `io_priority`, `active`, `description`, `numproc`, `numtcpsock`, `numothersock`, `vmguarpages`, `kmemsize`, `tcpsndbuf`, `tcprcvbuf`, `othersockbuf`, `dgramrcvbuf`, `oomguarpages`, `privvmpages`, `lockedpages`, `shmpages`, `physpages`, `numfile`, `avnumproc`, `numflock`, `numpty`, `numsiginfo`, `dcachesize`, `numiptent`, `swappages`, `hostname`, `nameserver`, `create_dns`, `capability`, `features`, `iptables`, `custom`) VALUES(1, 1, 1, 'riud', 'riud', '', 'small', 10, -1, -1, 256, 512, 1000, 4, 400, 4, 'y', '', '999999:999999', '7999992:7999992', '7999992:7999992', '65536:unlimited', '2147483646:2147483646', '214748160:396774400', '214748160:396774400', '214748160:396774400', '214748160:396774400', '65536:65536', '131072:139264', '999999:999999', '65536:65536', '0:2147483647', '23999976:23999976', '180:180', '999999:999999', '500000:500000', '999999:999999', '2147483646:2147483646', '999999:999999', '256000:256000', 'v{VEID}.test.tld', '8.8.8.8 8.8.4.4', 'n', '', '', '', '');
-- --------------------------------------------------------
interface/lib/plugins/vm_openvz_plugin.inc.php
@@ -178,11 +178,11 @@
        $tpl->setVar('bootorder', $vm['bootorder']);
        $tpl->setVar('kmemsize', $vm_template['kmemsize']);
        $tpl->setVar('lockedpages', $vm_template['lockedpages']);
        $tpl->setVar('privvmpages', $burst_ram.':'.$burst_ram);
        $tpl->setVar('privvmpages', $burst_ram.':'.$burst_ram*1.0625);
        $tpl->setVar('shmpages', $guar_ram.':'.$guar_ram);
        $tpl->setVar('numproc', $vm_template['numproc']);
        $tpl->setVar('physpages', $vm_template['physpages']);
        $tpl->setVar('vmguarpages', $guar_ram.':'.$guar_ram);
        $tpl->setVar('vmguarpages', $guar_ram.':unlimited');
        $tpl->setVar('oomguarpages', $guar_ram.':'.$guar_ram);
        $tpl->setVar('numtcpsock', $vm_template['numtcpsock']);
        $tpl->setVar('numflock', $vm_template['numflock']);
interface/web/vm/openvz_template_edit.php
@@ -63,7 +63,7 @@
        $guar_ram = $app->functions->intval($this->dataRecord['ram']*256);
        $burst_ram = $app->functions->intval($this->dataRecord['ram_burst']*256);
        $sql = "UPDATE openvz_template SET shmpages = ?,vmguarpages = ?, oomguarpages = ?,privvmpages = ? WHERE template_id = ?";
        $app->db->query($sql, $guar_ram . ':' . $guar_ram, $guar_ram . ':' . $guar_ram, $guar_ram . ':' . $guar_ram, $burst_ram . ':' . $burst_ram, $this->id);
        $app->db->query($sql, $guar_ram . ':' . $guar_ram, $guar_ram . ':unlimited', $guar_ram . ':' . $guar_ram, $burst_ram . ':' . $burst_ram*1.0625, $this->id);
    }
}
interface/web/vm/templates/openvz.conf.tpl
@@ -46,7 +46,7 @@
NAMESERVER="{tmpl_var name='nameserver'}"
# alternative meminfo: "pages:256000"
MEMINFO="privvmpages:1"
# SWAPPAGES="{tmpl_var name='swappages'}"
SWAPPAGES="{tmpl_var name='swappages'}"
CAPABILITY="{tmpl_var name='capability'}"
FEATURES="{tmpl_var name='features'}"
remoting_client/examples/openvz_template_add.php
@@ -32,14 +32,14 @@
        'numproc' => '999999:999999',
        'numtcpsock' => '7999992:7999992',
        'numothersock' => '7999992:7999992',
        'vmguarpages' => '65536:65536',
        'vmguarpages' => '65536:unlimited',
        'kmemsize' => '2147483646:2147483646',
        'tcpsndbuf' => '214748160:396774400',
        'tcprcvbuf' => '214748160:396774400',
        'othersockbuf' => '214748160:396774400',
        'dgramrcvbuf' => '214748160:396774400',
        'oomguarpages' => '65536:65536',
        'privvmpages' => '131072:131072',
        'privvmpages' => '131072:139264',
        'lockedpages' => '999999:999999',
        'shmpages' => '65536:65536',
        'physpages' => '0:2147483647',