Skip to content

Commit 411a6f5

Browse files
committed
increase openvz privvmpages and vmguarpages limit
1 parent b25f400 commit 411a6f5

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

install/sql/ispconfig3.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1112,7 +1112,7 @@ CREATE TABLE IF NOT EXISTS `openvz_template` (
11121112
-- Dumping data for table `openvz_template`
11131113
--
11141114

1115-
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', '', '', '', '');
1115+
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', '', '', '', '');
11161116

11171117
-- --------------------------------------------------------
11181118

interface/lib/plugins/vm_openvz_plugin.inc.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,11 +178,11 @@ private function makeOpenVZConfig() {
178178
$tpl->setVar('bootorder', $vm['bootorder']);
179179
$tpl->setVar('kmemsize', $vm_template['kmemsize']);
180180
$tpl->setVar('lockedpages', $vm_template['lockedpages']);
181-
$tpl->setVar('privvmpages', $burst_ram.':'.$burst_ram);
181+
$tpl->setVar('privvmpages', $burst_ram.':'.$burst_ram*1.0625);
182182
$tpl->setVar('shmpages', $guar_ram.':'.$guar_ram);
183183
$tpl->setVar('numproc', $vm_template['numproc']);
184184
$tpl->setVar('physpages', $vm_template['physpages']);
185-
$tpl->setVar('vmguarpages', $guar_ram.':'.$guar_ram);
185+
$tpl->setVar('vmguarpages', $guar_ram.':unlimited');
186186
$tpl->setVar('oomguarpages', $guar_ram.':'.$guar_ram);
187187
$tpl->setVar('numtcpsock', $vm_template['numtcpsock']);
188188
$tpl->setVar('numflock', $vm_template['numflock']);

interface/web/vm/openvz_template_edit.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ function onAfterUpdate() {
6363
$guar_ram = $app->functions->intval($this->dataRecord['ram']*256);
6464
$burst_ram = $app->functions->intval($this->dataRecord['ram_burst']*256);
6565
$sql = "UPDATE openvz_template SET shmpages = ?,vmguarpages = ?, oomguarpages = ?,privvmpages = ? WHERE template_id = ?";
66-
$app->db->query($sql, $guar_ram . ':' . $guar_ram, $guar_ram . ':' . $guar_ram, $guar_ram . ':' . $guar_ram, $burst_ram . ':' . $burst_ram, $this->id);
66+
$app->db->query($sql, $guar_ram . ':' . $guar_ram, $guar_ram . ':unlimited', $guar_ram . ':' . $guar_ram, $burst_ram . ':' . $burst_ram*1.0625, $this->id);
6767
}
6868

6969
}

interface/web/vm/templates/openvz.conf.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ IP_ADDRESS="{tmpl_var name='ip_address'}"
4646
NAMESERVER="{tmpl_var name='nameserver'}"
4747
# alternative meminfo: "pages:256000"
4848
MEMINFO="privvmpages:1"
49-
# SWAPPAGES="{tmpl_var name='swappages'}"
49+
SWAPPAGES="{tmpl_var name='swappages'}"
5050

5151
CAPABILITY="{tmpl_var name='capability'}"
5252
FEATURES="{tmpl_var name='features'}"

remoting_client/examples/openvz_template_add.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,14 @@
3232
'numproc' => '999999:999999',
3333
'numtcpsock' => '7999992:7999992',
3434
'numothersock' => '7999992:7999992',
35-
'vmguarpages' => '65536:65536',
35+
'vmguarpages' => '65536:unlimited',
3636
'kmemsize' => '2147483646:2147483646',
3737
'tcpsndbuf' => '214748160:396774400',
3838
'tcprcvbuf' => '214748160:396774400',
3939
'othersockbuf' => '214748160:396774400',
4040
'dgramrcvbuf' => '214748160:396774400',
4141
'oomguarpages' => '65536:65536',
42-
'privvmpages' => '131072:131072',
42+
'privvmpages' => '131072:139264',
4343
'lockedpages' => '999999:999999',
4444
'shmpages' => '65536:65536',
4545
'physpages' => '0:2147483647',

0 commit comments

Comments
 (0)