Load (computing): Difference between revisions

Content deleted Content added
No edit summary
Tags: Reverted Mobile edit Mobile web edit
No edit summary
Tags: Reverted nowiki added references removed Visual edit Mobile edit Mobile web edit
Line 2:
 
== Unix-style load calculation ==
Tüm Unix ve Unix benzeri sistemler, [[kernel (computer science)|çekirdekte]] üç "yük ortalaması" sayısından oluşan boyutsuz [[Software metric|bir metrik]] üretir. Kullanıcılar şu komutu çalıştırarak bir Unix kabuğundan geçerli sonucu kolayca sorgulayabilirommand:
All Unix and Unix-like systems generate a dimensionless [[Software metric|metric]] of three "load average" numbers in the [[kernel (computer science)|kernel]]. Users can easily query the current result from a [[Unix shell]] by running the <code>[[uptime]]</code> command:
<syntaxhighlight lang="console">
$ uptime
14:34:03 up 10:43, 4 users, load average: 0.06, 0.11, 0.09
</syntaxhighlight>
TheBurası [[W (Unix)|<code>w</code>]] andve [[Top (Unix)|<code>top</code>]] commands show the same three load average numberskomutlar, asbir dor aile rangeaynı ofüç [[graphicalloaaverage usersayısını interface]]gösterir utilitieslities. In İ[[Linux|Linux (Özg)Linux]],<nowiki/>okuy they can also be accessed by reading the [[procfs|s<code>/proc/loadavgvg</code>]] file.
 
dyapmakter'ın yük numarası 0'dır (boşta kalma işlemi sayılmaz)[[Central processing unit|İş Dünyası]][[process (computing)|onu]] ''zır kuyruk'' veya ) yükleme numarasını 1 artırır. Sona eren her işlem onu 1 azaltır. Çoğu UNIX sistemi yalnızca ''çalışan'' (CPU'da) veya çalıştırılabilir (CPU için ''bekleyen'') [[Process states|durumlardaki]] işlemleri sayar. Bununla birlikte, Linux ayrıca etkinliğini bekleyen) işlemleri de içerir; bu, meşgul veya durmuş bir G/Ç sistemi nedeniyle birçok işlem [[Input/output|G/Ç'de]] engese belirgin şekilde farklı sonuçlara yol açabilir. Bu, örneğin, NFS sunucusu arızası veya çok yavaş medya (örneğin, USB 1.x depolama aygıtları) nedeniyle engellenen işlemleri içerir. Bu gibi durumlar, CPU kullanımındaki gerçek bir artışı yansıtmayan yüksek bir yük ortalamasına neden olabilir (ancak yine de kullanıcıların ne kadar beklemesi gerektiğine dair bir fikir veririt).
An idle computer has a load number of 0 (the idle process is not counted). Each [[process (computing)|process]] using or waiting for [[Central processing unit|CPU]] (the ''ready queue'' or [[run queue]]) increments the load number by 1. Each process that terminates decrements it by 1. Most UNIX systems count only processes in the ''running'' (on CPU) or ''runnable'' (waiting for CPU) [[Process states|states]]. However, Linux also includes processes in [[uninterruptible sleep]] states (usually waiting for [[Hard disk|disk]] activity), which can lead to markedly different results if many processes remain blocked in [[Input/output|I/O]] due to a busy or stalled I/O system.<ref>{{Cite web|url=http://linuxtechsupport.blogspot.com/2008/10/what-exactly-is-load-average.html|title=Linux Tech Support: What exactly is a load average?|date=23 October 2008}}</ref> This, for example, includes processes blocking due to an [[Network File System (protocol)|NFS]] server failure or too slow [[Data storage device|media]] (e.g., [[Universal Serial Bus|USB]] 1.x storage devices). Such circumstances can result in an elevated load average which does not reflect an actual increase in CPU use (but still gives an idea of how long users have to wait).
 
Systems calculate the load ''average'' as the [[Moving average#Exponential moving average|exponentially damped/weighted moving average]] of the load ''number''. The three values of load average refer to the past one, five, and fifteen minutes of system operation.<ref name="drdobbs">{{cite web |url=http://www.linuxjournal.com/article/9001 |title=Examining Load Average |first=Ray |last=Walker |date=1 December 2006 |work=Linux Journal |access-date=13 March 2012 }}</ref>
Line 28:
In a system with four CPUs, a load average of 3.73 would indicate that there were, on average, 3.73 processes ready to run, and each one could be scheduled into a CPU.
 
On modern UNIX systems, the treatment of [[Thread (computer science)|threading]] with respect to load averages varies. Some systems treat threads as processes for the purposes of load average calculation: each thread waiting to run will add 1 to the load. However, other systems, especially systems implementing so-called [[Thread (computer science)#M:N (hybrid threading)|M:N threading]], use different strategies such as counting the process exactly once for the purpose of load (regardless of the number of threads), or counting only threads currently exposed by the user-thread scheduler to the kernel, which may depend on the level of concurrency set on the process. Linux appears to count each thread separately as adding 1 to the load.<ref>See http://serverfault.com/a/524818/27813</ref>
 
== CPU load vs CPU utilization ==