Skip to content

Commit

Permalink
Merge pull request #2548 from freenas/fix-73917
Browse files Browse the repository at this point in the history
Remove and purge vm.kmem_size autotuning
  • Loading branch information
Ryan Moeller committed Feb 12, 2019
2 parents 4b069ce + db8ea13 commit 0a437f0
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 25 deletions.
22 changes: 22 additions & 0 deletions gui/services/migrations/0026_delete_vm_kmem_size_tunable.py
@@ -0,0 +1,22 @@
from django.db import migrations


def delete_vm_kmem_size(apps, schemaeditor):
tunables = apps.get_model('system', 'tunable')
kmem_size_tunable = tunables.objects.filter(tun_var='vm.kmem_size',
tun_comment='Generated by autotune')
kmem_size_tunable.delete()


class Migration(migration.Migration):

dependencies = [
('services', '0026_s3_fields'),
]

operations = [
migrations.RunPython(
delete_vm_kmem_size
),
]

26 changes: 1 addition & 25 deletions src/autotune/files/autotune.py
Expand Up @@ -97,25 +97,6 @@ def popen(cmd):
return p.communicate()[0]


def get_interfaces(include_fake=False):

interfaces = popen('ifconfig -l')

fake_interfaces = (
'ipfw',
'lo',
'pflog',
'pfsync',
)

interfaces = interfaces.split()

if include_fake:
return interfaces
return filter(lambda i: not re.match('^(%s)\d+$'
% ('|'.join(fake_interfaces), ), i), interfaces)


def sysctl(oid):
"""Quick and dirty means of doing sysctl -n"""
return popen('sysctl -n %s' % (oid, ))
Expand All @@ -134,7 +115,6 @@ def sysctl_int(oid):
# as a valid choice to the -c option.
DEF_KNOBS = {
'loader': {
'vm.kmem_size',
'vfs.zfs.dirty_data_max_max',
},
'sysctl': {
Expand Down Expand Up @@ -167,10 +147,6 @@ def sysctl_int(oid):
}


def guess_vm_kmem_size():
return int(1.25 * HW_PHYSMEM)


def guess_vfs_zfs_dirty_data_max_max():
if TRUENAS and hardware[0].startswith("M"):
return 12 * GB
Expand Down Expand Up @@ -352,7 +328,7 @@ def guess_vfs_zfs_metaslab_lba_weighting_enabled():


def guess_vfs_zfs_zfetch_max_distance():
return 33554432
return 32 * MB


def main(argv):
Expand Down

0 comments on commit 0a437f0

Please sign in to comment.