Difference between revisions of "OS: Tuning Completely Fair scheduler CFS"

From OnnoWiki
Jump to navigation Jump to search
 
(5 intermediate revisions by the same user not shown)
Line 2: Line 2:
  
  
The Linux Completely Fair scheduler (CFS) includes parameters that you can adjust to fit your specific needs.
+
Dalam Linux Completely Fair scheduler (CFS) terdapat parameter yang dapat kita atur untuk menyesuaikan dengan kebutuhan kita.
  
The following parameters can be accessed through the proc file system. The default values (in nanoseconds) of these parameters from SLES 11 SP1 are shown in parentheses.
+
Parameter berikut dapat di akses melalui file sistem proc. Nilai default (dalam nanoseconds). Contoh parameter adalah sebagai berikut:
  
    sched_min_granularity_ns (16000000): Minimum preemption granularity for processor-bound tasks. Tasks are guaranteed to run for this minimum time before they are preempted.
+
* sched_min_granularity_ns (16000000): Minimum preemption granularity untuk task yang processor-bound. Task di garansi untuk run / jalan minimal waktu sched_min_granularity_ns sebelum di preempt.
    sched_latency_ns (80000000): Period over which CFQ tries to fairly schedule the tasks on the runqueue. All of the tasks on the runqueue are guaranteed to be scheduled once within this period.
+
* sched_latency_ns (80000000): Perioda dimana CFQ akan mencoba untuk melakukan schedule secara fair untuk task yang ada di runqueue. Semua task di runqueue akan di garansi jalan minimal satu kali dalam perioda tersebut.
    sched_wakeup_granularity_ns (20000000): Ability of tasks being woken to preempt the current task. The smaller the value, the easier it is for the task to force the preemption.
+
* sched_wakeup_granularity_ns (20000000): Kemampuan untuk task yang bangun untuk mem-preempt task yang sedang berjalan. Semakin kecil nilainya, semakin mudah untuk sebuah task memaksa preempt task yang sedang berjalan.
  
To verify the value of each parameter, use the following command:
+
Untuk memverifikasi nilai dari masing-masing parameter, gunakan perintah berikut:
  
# cat /proc/sys/kernel/sched_latency_ns
+
# cat /proc/sys/kernel/sched_latency_ns
  
To modify the value of each parameter, use the following command:
+
Untuk memodifikasi nilai dari masing-masing parameter, gunakan perintah berikut (misalnya)
  
# echo 20000 > /proc/sys/kernel/sched_latency_ns
+
# echo 20000 > /proc/sys/kernel/sched_latency_ns
  
In the test environment, best results were achieved with the following values for these three parameters:
+
Dalam salah satu lingkungan test, hasil terbaik nampaknya akan di peroleh untuk nilai parameter berikut:
  
kernel.sched_min_granularity_ns = 100000
+
kernel.sched_min_granularity_ns = 100000
kernel.sched_wakeup_granularity_ns = 25000
+
kernel.sched_wakeup_granularity_ns = 25000
kernel.sched_latency_ns = 1000000
+
kernel.sched_latency_ns = 1000000
  
If you want to make these changes permanent, you can modify these parameters in the /etc/sysctl.conf file and run the sysctl -p command.
+
Jika kita ingin agar perubahan ini permanen, kita perlu melakukan modifikasi parameter tersebut pada file  /etc/sysctl.conf dan jalankan perintah sysctl -p command.
  
 +
Untuk melihat parameter kernel yang ada dapat menggunakan perintah
  
 +
# sysctl -A | more
  
 +
atau
 +
 +
# sysctl -a | more
  
  
Line 39: Line 44:
 
* [[Linux]]
 
* [[Linux]]
 
* [[Ubuntu]]
 
* [[Ubuntu]]
 +
* [[Buku Sistem Operasi]]
 +
 +
===Secara Umum===
 +
 
* [[Sistem Operasi]]
 
* [[Sistem Operasi]]
 +
 +
===Instalasi Linux===
 +
 +
* [[Linux: CLI untuk Survival]]
 +
* [[Linux: Skema Partisi di Linux]]
 +
* [[Linux: Instalasi Sistem Operasi]]
 +
 +
===Compile Kernel===
 +
 
* [[Kernel]]
 
* [[Kernel]]
 +
* [[OS: Linux Kernel]]
 +
* [[Kernel: Anatomi Kernel Source]]
 
* [[Compile Kernel]]
 
* [[Compile Kernel]]
 
* [[Compile Kernel: Konfigurasi Kernel]]
 
* [[Compile Kernel: Konfigurasi Kernel]]
* [[Kernel: Anatomi Kernel Source]]
+
 
* [[OS: Linux Kernel]]
+
===Remaster Linux===
 +
 
 +
* [[Cara Cepat Melakukan Remastering Ubuntu]]
 +
 
 +
===Sistem Operasi untuk Embedded===
 +
 
 +
* [[OpenWRT]]
 +
* [[OpenWRT: Download Firmware yang sudah jadi]]
 +
* [[OpenWRT: Source Repository Download]]
 +
* [[OpenWRT: Melihat Daftar Package]]
 +
 
 +
====Membuat Firmware Sendiri====
 +
 
 +
* [[OpenWRT: Build Firmware]]
 +
* [[OpenWRT: Build Firmware Buffalo WZRHPG450H]]
 +
* [[OpenWRT: Build Firmware Buffalo WZRHPG300N]]
 +
* [[OpenWRT: Build Firmware Ubiquiti NanoStation2]]
 +
* [[OpenWRT: Build Firmware Mikrotik RB433]]
 +
* [[OpenWRT: Build Firmware Linksys WRT160NL]]
 +
* [[OpenWRT: Build Firmware Linksys WRT54GL]]
 +
 
 +
====Flash ke Device====
 +
 
 +
* [[OpenWRT: Flash Linksys WRT54GL]]
 +
* [[OpenWRT: Flash Buffalo WZRHP450H]]
 +
* [[OpenWRT: Flash Buffalo WZRHP300N]]
 +
* [[OpenWRT: Flash UBNT NanoStation2]]
 +
 
 +
====Beberapa Tip====
 +
 
 +
* [[OpenWRT: Mikrotik RB433]]
 +
* [[OpenWRT: 3G modem]]
 +
* [[OpenWRT: Build Firmware dengan 3G Modem Support]]
 +
* [[OpenWRT: Setup Firewall]]
 +
* [[OpenWRT: Konfigurasi UBNT NanoStation2 tanpa WebGUI]]
 +
 
 +
===Tuning Kernel===
 +
 
 
* [[OS: Parameter Kernel Default]]
 
* [[OS: Parameter Kernel Default]]
 +
 +
====Tuning Kernel Scheduler====
 +
 
* [[OS: Kernel Scheduler]]
 
* [[OS: Kernel Scheduler]]
 +
* [[OS: Tuning Kernel Scheduler]]
 +
* [[OS: Tuning Completely Fair scheduler CFS]]
 
* [[OS: Complete Teori Tuning Kernel Scheduler]]
 
* [[OS: Complete Teori Tuning Kernel Scheduler]]
 +
 +
====Tuning I/O Scheduler====
 +
 +
* [[OS: Tuning Completely Fair Queueing CFQ I/O scheduler]]
 
* [[OS: Complete Teori Tuning I/O Performance]]
 
* [[OS: Complete Teori Tuning I/O Performance]]
* [[OS: Tuning Kernel Scheduler]]
+
 
* [[OS: Tuning Completely Fair Queueing CFQ I/O scheduler]]
+
====Tuning Manajemen Memory====
* [[OS: Tuning Completely Fair scheduler CFS]]
+
 
 +
* [[OS: Tuning Manajemen Memory]]
 +
 
 +
===Android===
 +
 
 +
* [[OS: Android - Download]]
 +
 
 +
===Membuat Kernel Module===
 +
 
 +
* [[OS: Mengerti System Call]]
 +
* [[OS: Membuat Kernel Modul]]
 +
 
 +
===Monitoring & Benchmark===
 +
 
 
* [[OS: Build in Monitoring Tool]]
 
* [[OS: Build in Monitoring Tool]]
 
* [[Linux Benchmarking]]
 
* [[Linux Benchmarking]]
 
* [[OS: Benchmarking menggunakan UnixBench]]
 
* [[OS: Benchmarking menggunakan UnixBench]]
 
* [[OS: Benchmarking menggunakan LLCBench]]
 
* [[OS: Benchmarking menggunakan LLCBench]]
* [[OS: Mengerti System Call]]
 
* [[OS: Membuat Kernel Modul]]
 

Latest revision as of 11:57, 12 April 2014

Sumber: http://publib.boulder.ibm.com/infocenter/lnxinfo/v3r0m0/index.jsp?topic=%2Fliaai%2Fsaptuning%2Fsaptuningadjust.htm


Dalam Linux Completely Fair scheduler (CFS) terdapat parameter yang dapat kita atur untuk menyesuaikan dengan kebutuhan kita.

Parameter berikut dapat di akses melalui file sistem proc. Nilai default (dalam nanoseconds). Contoh parameter adalah sebagai berikut:

  • sched_min_granularity_ns (16000000): Minimum preemption granularity untuk task yang processor-bound. Task di garansi untuk run / jalan minimal waktu sched_min_granularity_ns sebelum di preempt.
  • sched_latency_ns (80000000): Perioda dimana CFQ akan mencoba untuk melakukan schedule secara fair untuk task yang ada di runqueue. Semua task di runqueue akan di garansi jalan minimal satu kali dalam perioda tersebut.
  • sched_wakeup_granularity_ns (20000000): Kemampuan untuk task yang bangun untuk mem-preempt task yang sedang berjalan. Semakin kecil nilainya, semakin mudah untuk sebuah task memaksa preempt task yang sedang berjalan.

Untuk memverifikasi nilai dari masing-masing parameter, gunakan perintah berikut:

# cat /proc/sys/kernel/sched_latency_ns

Untuk memodifikasi nilai dari masing-masing parameter, gunakan perintah berikut (misalnya)

# echo 20000 > /proc/sys/kernel/sched_latency_ns

Dalam salah satu lingkungan test, hasil terbaik nampaknya akan di peroleh untuk nilai parameter berikut:

kernel.sched_min_granularity_ns = 100000
kernel.sched_wakeup_granularity_ns = 25000
kernel.sched_latency_ns = 1000000

Jika kita ingin agar perubahan ini permanen, kita perlu melakukan modifikasi parameter tersebut pada file /etc/sysctl.conf dan jalankan perintah sysctl -p command.

Untuk melihat parameter kernel yang ada dapat menggunakan perintah

# sysctl -A | more

atau

# sysctl -a | more


Referensi

Pranala Menarik

Secara Umum

Instalasi Linux

Compile Kernel

Remaster Linux

Sistem Operasi untuk Embedded

Membuat Firmware Sendiri

Flash ke Device

Beberapa Tip

Tuning Kernel

Tuning Kernel Scheduler

Tuning I/O Scheduler

Tuning Manajemen Memory

Android

Membuat Kernel Module

Monitoring & Benchmark