| Server IP : 185.143.234.130 / Your IP : 185.215.232.195 Web Server : LiteSpeed System : Linux jambul.7ho.st 5.14.0-503.40.1.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Mon May 5 06:06:04 EDT 2025 x86_64 User : renecafe ( 1327) PHP Version : 8.1.33 Disable Function : show_source, system, shell_exec, passthru, exec, popen, proc_open MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /usr/lib/python3.9/site-packages/tuned/plugins/__pycache__/ |
Upload File : |
a
,�g
� @ sn d dl mZ d dlT ddlZddlZddlZddlZddlZddl m
Z
ej�� Z
e
� ZG dd� dej�ZdS )� )�base)�*� N)�commandsc @ s e Zd ZdZedd� �Zedd� �Zedd� �Zdd � Z d
d� Z
edd
� �Zed�dd� �Z
ed�dd� �Zed�dd� �Zed�dd� �Zed�dd� �Zed�dd� �Zdd� Zdd � Zd!d"� Zed#�d$d%� �Zed&�d'd(� �Zed)�d*d+� �Zed,�d-d.� �Zd/d0� Zd1S )2�VMPlugina�
Tunes selected sysctl options in `/proc/sys/vm`, currently
[option]`dirty_ratio`, [option]`dirty_background_ratio`,
[option]`dirty_bytes`, and [option]`dirty_background_bytes`.
See https://docs.kernel.org/admin-guide/sysctl/vm.html for detailed
documentation of these options.
Additionaly enables or disables transparent huge pages depending on
the value of the [option]`transparent_hugepages` option. The option
can have one of three possible values: `always`, `madvise` and `never`.
.Disable transparent hugepages
====
----
[vm]
transparent_hugepages=never
----
====
The [option]`transparent_hugepage.defrag` option specifies the
defragmentation policy. Possible values for this option are `always`,
`defer`, `defer+madvise`, `madvise` and `never`. For a detailed
explanation of these values refer to
link:https://www.kernel.org/doc/Documentation/vm/transhuge.txt[Transparent Hugepage Support].
c C s d d d d d d d d�S )N)�transparent_hugepages�transparent_hugepage�transparent_hugepage.defrag�dirty_bytes�dirty_ratio�dirty_background_bytes�dirty_background_ratio� )�selfr r �;/usr/lib/python3.9/site-packages/tuned/plugins/plugin_vm.py�_get_config_options) s �zVMPlugin._get_config_optionsc C s2 | j | d ur.| j | d ur.t�d||f � d S )NzEConflicting options '%s' and '%s', this may cause undefined behavior.)�options�log�error)�instance�first�secondr r r � _check_conflicting_dirty_options5 s z)VMPlugin._check_conflicting_dirty_optionsc C s t j�d| �S )Nz/proc/sys/vm)�os�path�join)�optionr r r �_proc_sys_vm_option_path: s z!VMPlugin._proc_sys_vm_option_pathc C s, d|_ d|_| �|dd� | �|dd� d S )NTFr
r r r
)Z_has_static_tuningZ_has_dynamic_tuningr �r r r r r �_instance_init>