adding more information about sysctl var to setup #656
This commit is contained in:
parent
d7edfad633
commit
343ec024bb
1 changed files with 18 additions and 6 deletions
|
@ -1788,7 +1788,7 @@ sub infocmd_one {
|
||||||
|
|
||||||
sub get_kernel_info {
|
sub get_kernel_info {
|
||||||
my @params = (
|
my @params = (
|
||||||
'fs.aio-max-nr', 'fs.aio-nr',
|
'fs.aio-max-nr', 'fs.aio-nr', 'fs.nr_open'
|
||||||
'fs.file-max', 'sunrpc.tcp_fin_timeout',
|
'fs.file-max', 'sunrpc.tcp_fin_timeout',
|
||||||
'sunrpc.tcp_max_slot_table_entries', 'sunrpc.tcp_slot_table_entries',
|
'sunrpc.tcp_max_slot_table_entries', 'sunrpc.tcp_slot_table_entries',
|
||||||
'vm.swappiness'
|
'vm.swappiness'
|
||||||
|
@ -1803,7 +1803,7 @@ sub get_kernel_info {
|
||||||
"Swappiness is > 10, please consider having a value lower than 10";
|
"Swappiness is > 10, please consider having a value lower than 10";
|
||||||
push @generalrec, "setup swappiness lower or equal to 10";
|
push @generalrec, "setup swappiness lower or equal to 10";
|
||||||
push @adjvars,
|
push @adjvars,
|
||||||
'vm.swappiness <= 10 (echo 10 > /proc/sys/vm/swappiness)';
|
'vm.swappiness <= 10 (echo 10 > /proc/sys/vm/swappiness) or vm.swappiness=10 in /etc/sysctl.conf';
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
infoprint "Swappiness is < 10.";
|
infoprint "Swappiness is < 10.";
|
||||||
|
@ -1819,7 +1819,7 @@ sub get_kernel_info {
|
||||||
"Initial TCP slot entries is < 1M, please consider having a value greater than 100";
|
"Initial TCP slot entries is < 1M, please consider having a value greater than 100";
|
||||||
push @generalrec, "setup Initial TCP slot entries greater than 100";
|
push @generalrec, "setup Initial TCP slot entries greater than 100";
|
||||||
push @adjvars,
|
push @adjvars,
|
||||||
'sunrpc.tcp_slot_table_entries > 100 (echo 128 > /proc/sys/sunrpc/tcp_slot_table_entries)';
|
'sunrpc.tcp_slot_table_entries > 100 (echo 128 > /proc/sys/sunrpc/tcp_slot_table_entries) or sunrpc.tcp_slot_table_entries=128 in /etc/sysctl.conf';
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
infoprint "TCP slot entries is > 100.";
|
infoprint "TCP slot entries is > 100.";
|
||||||
|
@ -1828,15 +1828,28 @@ sub get_kernel_info {
|
||||||
if ( -f "/proc/sys/fs/aio-max-nr" ) {
|
if ( -f "/proc/sys/fs/aio-max-nr" ) {
|
||||||
if ( `sysctl -n fs.aio-max-nr` < 1000000 ) {
|
if ( `sysctl -n fs.aio-max-nr` < 1000000 ) {
|
||||||
badprint
|
badprint
|
||||||
"Max running total of the number of events is < 1M, please consider having a value greater than 1M";
|
"Max running total of the number of max. events is < 1M, please consider having a value greater than 1M";
|
||||||
push @generalrec, "setup Max running number events greater than 1M";
|
push @generalrec, "setup Max running number events greater than 1M";
|
||||||
push @adjvars,
|
push @adjvars,
|
||||||
'fs.aio-max-nr > 1M (echo 1048576 > /proc/sys/fs/aio-max-nr)';
|
'fs.aio-max-nr > 1M (echo 1048576 > /proc/sys/fs/aio-max-nr) or fs.aio-max-nr=1048576 in /etc/sysctl.conf';
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
infoprint "Max Number of AIO events is > 1M.";
|
infoprint "Max Number of AIO events is > 1M.";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
fs.nr_open=1048576
|
||||||
|
if ( -f "/proc/sys/fs/nr_open" ) {
|
||||||
|
if ( `sysctl -n fs.nr_open` < 1000000 ) {
|
||||||
|
badprint
|
||||||
|
"Max running total of the number of file open request is < 1M, please consider having a value greater than 1M";
|
||||||
|
push @generalrec, "setup running number of open request greater than 1M";
|
||||||
|
push @adjvars,
|
||||||
|
'fs.aio-nr > 1M (echo 1048576 > /proc/sys/fs/nr_open) or fs.nr_open=1048576 in /etc/sysctl.conf';
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
infoprint "Max Number of open file requests is > 1M.";
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
sub get_system_info {
|
sub get_system_info {
|
||||||
|
@ -7019,7 +7032,6 @@ __END__
|
||||||
=head1 NAME
|
=head1 NAME
|
||||||
|
|
||||||
MySQLTuner 2.1.5 - MySQL High Performance Tuning Script
|
MySQLTuner 2.1.5 - MySQL High Performance Tuning Script
|
||||||
MySQLTuner 2.1.5 - MySQL High Performance Tuning Script
|
|
||||||
|
|
||||||
=head1 IMPORTANT USAGE GUIDELINES
|
=head1 IMPORTANT USAGE GUIDELINES
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue