{"id":701,"date":"2016-10-27T23:52:37","date_gmt":"2016-10-28T02:52:37","guid":{"rendered":"http:\/\/wordpress.jpcorp.eti.br\/?p=701"},"modified":"2021-12-26T12:31:01","modified_gmt":"2021-12-26T15:31:01","slug":"zabbix-load-cpu-system-cpu-load-vs-utilizacao-cpu-system-cpu-util","status":"publish","type":"post","link":"https:\/\/wordpress.jpcorp.eti.br\/?p=701","title":{"rendered":"Zabbix &#8211; Load CPU [system.cpu.load] vs Utiliza\u00e7\u00e3o CPU [system.cpu.util]"},"content":{"rendered":"<p style=\"text-align: justify;\">Primeiramente precisamos entender que Load CPU e Utiliza\u00e7\u00e3o CPU s\u00e3o dois indicadores distintos que juntos auxiliam numa an\u00e1lise concreta do uso de CPU, vamos ao entendimento dos conceitos.<\/p>\n<h3>1 - Load CPU ou Load Average<\/h3>\n<p align=\"justify\">\u00c9 a carga de processamento, ou seja, n\u00famero de processos em execu\u00e7\u00e3o ou enfileirados para execu\u00e7\u00e3o. A vis\u00e3o da carga \u00e9 tida pelo valor do Load dividido pela quantidade de CPUs, caso esteja acima indica uma sobrecarga de processos e uma necessidade de mais CPU no host.<\/p>\n<p align=\"justify\"><a href=\"http:\/\/wordpress.jpcorp.eti.br\/?attachment_id=721\" target=\"_blank\" rel=\"attachment wp-att-719 noopener\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-721 size-full\" src=\"http:\/\/wordpress.jpcorp.eti.br\/wp-content\/uploads\/2016\/10\/load-1.png\" width=\"440\" height=\"517\" srcset=\"https:\/\/wordpress.jpcorp.eti.br\/wp-content\/uploads\/2016\/10\/load-1.png 440w, https:\/\/wordpress.jpcorp.eti.br\/wp-content\/uploads\/2016\/10\/load-1-255x300.png 255w\" sizes=\"auto, (max-width: 440px) 100vw, 440px\" \/><\/a><\/p>\n<p align=\"justify\">Se possuo 1 CPU e o Load esta em 0.1 indica que todos processos est\u00e3o em execu\u00e7\u00e3o e <span style=\"text-decoration: underline;\">n\u00e3o estou tendo<\/span> processos em espera na fila para processamento. Agora se possuo 1 CPU e Load 11.3 indica que <span style=\"text-decoration: underline;\">estou tendo<\/span> processos em espera na fila.<\/p>\n<p align=\"justify\">Abaixo uma imagem para melhor entendimento e abstra\u00e7\u00e3o quando o Load esta abaixo da quantidade de CPUs e quando esta acima que no caso pensando em carros e num t\u00fanel teremos um engavetamento, leve em considera\u00e7\u00e3o 1 CPU:<\/p>\n<p align=\"justify\"><a href=\"http:\/\/wordpress.jpcorp.eti.br\/wp-content\/uploads\/2016\/10\/load-average.png\" rel=\"attachment wp-att-703\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-703 size-full\" src=\"http:\/\/wordpress.jpcorp.eti.br\/wp-content\/uploads\/2016\/10\/load-average.png\" alt=\"load-average\" width=\"420\" height=\"157\" srcset=\"https:\/\/wordpress.jpcorp.eti.br\/wp-content\/uploads\/2016\/10\/load-average.png 420w, https:\/\/wordpress.jpcorp.eti.br\/wp-content\/uploads\/2016\/10\/load-average-300x112.png 300w\" sizes=\"auto, (max-width: 420px) 100vw, 420px\" \/><\/a>No Load temos 3 vis\u00f5es:<\/p>\n<pre align=\"justify\" class=\"\">Load Average 1: \u00daltimo 1 minuto\r\nLoad Average 5: \u00daltimos 5 minutos\r\nLoad Average 15: \u00daltimos 15 minutos<\/pre>\n<pre class=\"lang:sh decode:true \">[root@borda ~]# uptime\r\n 23:09:15 up 38 days,  1:28,  2 users,  load average: 0,00, 0,01, 0,10<\/pre>\n<p>&nbsp;<\/p>\n<blockquote>\n<p style=\"text-align: justify;\">In <a class=\"mw-redirect\" title=\"UNIX\" href=\"https:\/\/en.wikipedia.org\/wiki\/UNIX\">UNIX<\/a> <a title=\"Computing\" href=\"https:\/\/en.wikipedia.org\/wiki\/Computing\">computing<\/a>, the system <b>load<\/b> is a measure of the amount of computational work that a computer system performs. The <b>load average<\/b> represents the average system load over a period of time. It conventionally appears in the form of three numbers which represent the system load during the last one-, five-, and fifteen-minute periods.<\/p>\n<p style=\"text-align: justify;\"><a href=\"https:\/\/en.wikipedia.org\/wiki\/Load_(computing)\">https:\/\/en.wikipedia.org\/wiki\/Load_(computing)<\/a><\/p>\n<\/blockquote>\n<h3 align=\"justify\">2 - Utiliza\u00e7\u00e3o CPU<\/h3>\n<p style=\"text-align: justify;\" align=\"justify\">Utiliza\u00e7\u00e3o de CPU \u00e9 o total de ciclos por segundo do processador em execu\u00e7\u00e3o atual, ou seja, a porcentagem de tempo requerida do cpu para executar uma ou um conjunto de tarefas.<\/p>\n<p style=\"text-align: justify;\" align=\"justify\"><a href=\"http:\/\/wordpress.jpcorp.eti.br\/wp-content\/uploads\/2016\/10\/utilizacao.png\" target=\"_blank\" rel=\"attachment wp-att-723 noopener\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-723 size-full\" src=\"http:\/\/wordpress.jpcorp.eti.br\/wp-content\/uploads\/2016\/10\/utilizacao.png\" alt=\"utilizacao\" width=\"440\" height=\"434\" srcset=\"https:\/\/wordpress.jpcorp.eti.br\/wp-content\/uploads\/2016\/10\/utilizacao.png 440w, https:\/\/wordpress.jpcorp.eti.br\/wp-content\/uploads\/2016\/10\/utilizacao-300x296.png 300w\" sizes=\"auto, (max-width: 440px) 100vw, 440px\" \/><\/a><\/p>\n<blockquote>\n<p style=\"text-align: justify;\"><b>CPU time<\/b> (or <b>process time<\/b>) is the amount of <a title=\"Time\" href=\"https:\/\/en.wikipedia.org\/wiki\/Time\">time<\/a> for which a <a title=\"Central processing unit\" href=\"https:\/\/en.wikipedia.org\/wiki\/Central_processing_unit\">central processing unit<\/a> (CPU) was used for processing <a class=\"mw-redirect\" title=\"Instruction (computer science)\" href=\"https:\/\/en.wikipedia.org\/wiki\/Instruction_%28computer_science%29\">instructions<\/a> of a <a title=\"Computer program\" href=\"https:\/\/en.wikipedia.org\/wiki\/Computer_program\">computer program<\/a> or <a title=\"Operating system\" href=\"https:\/\/en.wikipedia.org\/wiki\/Operating_system\">operating system<\/a>, as opposed to, for example, waiting for <a title=\"Input\/output\" href=\"https:\/\/en.wikipedia.org\/wiki\/Input\/output\">input\/output<\/a> (I\/O) operations or entering low-power (idle) mode. The CPU time is measured in <a class=\"mw-redirect\" title=\"System Time\" href=\"https:\/\/en.wikipedia.org\/wiki\/System_Time\">clock ticks<\/a> or seconds. Often, it is useful to measure CPU time as a percentage of the CPU's capacity, which is called the <b>CPU usage<\/b>.<\/p>\n<p><a href=\"https:\/\/en.wikipedia.org\/wiki\/CPU_time\">https:\/\/en.wikipedia.org\/wiki\/CPU_time<\/a><\/p><\/blockquote>\n<blockquote>\n<p style=\"text-align: justify;\" align=\"justify\">The concept of CPU utilization used to be simple. Assume you have a single core processor fixed at a frequency of 2.0 GHz. CPU utilization in this scenario is the percentage of time the processor spends doing work (as opposed to being idle). If this 2.0 GHz processor does 1 billion cycles worth of work in a second, it is 50% utilized for that second. Fairly straightforward.<\/p>\n<p>https:\/\/blogs.technet.microsoft.com\/winserverperformance\/2009\/08\/06\/interpreting-cpu-utilization-for-performance-analysis\/<\/p><\/blockquote>\n<h3 align=\"justify\">\u00a03 - Cen\u00e1rios<\/h3>\n<p style=\"text-align: justify;\">Ap\u00f3s entendimento do conceito dos dois indicadores podemos pensar em alguns cen\u00e1rios:<\/p>\n<p style=\"text-align: justify;\">Cen\u00e1rio 1 - <span style=\"text-decoration: underline;\">Alta porcentagem de utiliza\u00e7\u00e3o e load abaixo da quantidade de cpus<\/span>: Um processo ou alguns processos requerendo muito tempo de cpu para execu\u00e7\u00e3o das tarefas e o load com carga abaixo da quantidade de cpus. Num ambiente real podemos pensar em um servidor com 5 usu\u00e1rios conectados onde 1 usu\u00e1rio est\u00e1 executando uma tarefa de c\u00f3pia de uma pasta com uma quantidade enorme de arquivos.<\/p>\n<p style=\"text-align: justify;\"><a href=\"http:\/\/wordpress.jpcorp.eti.br\/wp-content\/uploads\/2016\/10\/utilizacao-alta_load-baixo.png\" target=\"_blank\" rel=\"attachment wp-att-708 noopener\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-708 size-full\" src=\"http:\/\/wordpress.jpcorp.eti.br\/wp-content\/uploads\/2016\/10\/utilizacao-alta_load-baixo.png\" alt=\"utilizacao-alta_load-baixo\" width=\"1022\" height=\"547\" srcset=\"https:\/\/wordpress.jpcorp.eti.br\/wp-content\/uploads\/2016\/10\/utilizacao-alta_load-baixo.png 1022w, https:\/\/wordpress.jpcorp.eti.br\/wp-content\/uploads\/2016\/10\/utilizacao-alta_load-baixo-300x161.png 300w, https:\/\/wordpress.jpcorp.eti.br\/wp-content\/uploads\/2016\/10\/utilizacao-alta_load-baixo-768x411.png 768w, https:\/\/wordpress.jpcorp.eti.br\/wp-content\/uploads\/2016\/10\/utilizacao-alta_load-baixo-644x345.png 644w\" sizes=\"auto, (max-width: 1022px) 100vw, 1022px\" \/><\/a><\/p>\n<p style=\"text-align: justify;\">Cen\u00e1rio 2 \u2013 <span style=\"text-decoration: underline;\">Load alto e baixa porcentagem de utiliza\u00e7\u00e3o<\/span>: Load alto indica alta carga\/n\u00famero de processos em execu\u00e7\u00e3o e processos enfileirados aguardando execu\u00e7\u00e3o e baixa utiliza\u00e7\u00e3o do cpu para execu\u00e7\u00e3o das tarefas. Podemos pensar num servidor com 5 usu\u00e1rios conectados onde 1 usu\u00e1rio clica 20 vezes para abrir o navegador e clica 20 vezes para abrir o Libreoffice Writer (pow isso tem muito em kkkkkk).<\/p>\n<p style=\"text-align: justify;\"><a href=\"http:\/\/wordpress.jpcorp.eti.br\/wp-content\/uploads\/2016\/10\/load-alto_utilizacao-baixo.png\" target=\"_blank\" rel=\"attachment wp-att-709 noopener\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-709 size-full\" src=\"http:\/\/wordpress.jpcorp.eti.br\/wp-content\/uploads\/2016\/10\/load-alto_utilizacao-baixo.png\" alt=\"load-alto_utilizacao-baixo\" width=\"1018\" height=\"541\" srcset=\"https:\/\/wordpress.jpcorp.eti.br\/wp-content\/uploads\/2016\/10\/load-alto_utilizacao-baixo.png 1018w, https:\/\/wordpress.jpcorp.eti.br\/wp-content\/uploads\/2016\/10\/load-alto_utilizacao-baixo-300x159.png 300w, https:\/\/wordpress.jpcorp.eti.br\/wp-content\/uploads\/2016\/10\/load-alto_utilizacao-baixo-768x408.png 768w, https:\/\/wordpress.jpcorp.eti.br\/wp-content\/uploads\/2016\/10\/load-alto_utilizacao-baixo-644x342.png 644w\" sizes=\"auto, (max-width: 1018px) 100vw, 1018px\" \/><\/a>Cen\u00e1rio 3 \u2013 <span style=\"text-decoration: underline;\">Load e porcentagem de utiliza\u00e7\u00e3o alta<\/span>: Ai neste cen\u00e1rio podemos pensar nos 5 usu\u00e1rios clicando 20 vezes no navegador, assistindo v\u00eddeos, editando imagens, baidu executando, copiando os filmes, windows update, etc... 8)<\/p>\n<p style=\"text-align: justify;\"><a href=\"http:\/\/wordpress.jpcorp.eti.br\/wp-content\/uploads\/2016\/10\/load-alto_utilizacao-alta.png\" target=\"_blank\" rel=\"attachment wp-att-711 noopener\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-711 size-full\" src=\"http:\/\/wordpress.jpcorp.eti.br\/wp-content\/uploads\/2016\/10\/load-alto_utilizacao-alta.png\" alt=\"load-alto_utilizacao-alta\" width=\"1025\" height=\"540\" srcset=\"https:\/\/wordpress.jpcorp.eti.br\/wp-content\/uploads\/2016\/10\/load-alto_utilizacao-alta.png 1025w, https:\/\/wordpress.jpcorp.eti.br\/wp-content\/uploads\/2016\/10\/load-alto_utilizacao-alta-300x158.png 300w, https:\/\/wordpress.jpcorp.eti.br\/wp-content\/uploads\/2016\/10\/load-alto_utilizacao-alta-768x405.png 768w, https:\/\/wordpress.jpcorp.eti.br\/wp-content\/uploads\/2016\/10\/load-alto_utilizacao-alta-644x339.png 644w\" sizes=\"auto, (max-width: 1025px) 100vw, 1025px\" \/><\/a><\/p>\n<hr \/>\n<p style=\"text-align: justify;\">Refer\u00eancias:<\/p>\n<ul>\n<li style=\"text-align: justify;\"><a href=\"https:\/\/www.zabbix.com\/documentation\/3.2\/manual\/config\/items\/itemtypes\/zabbix_agent\">https:\/\/www.zabbix.com\/documentation\/3.2\/manual\/config\/items\/itemtypes\/zabbix_agent<\/a><\/li>\n<li style=\"text-align: justify;\"><a href=\"https:\/\/en.wikipedia.org\/wiki\/Load_(computing\">https:\/\/en.wikipedia.org\/wiki\/Load_(computing<\/a>)<\/li>\n<li style=\"text-align: justify;\"><a href=\"https:\/\/en.wikipedia.org\/wiki\/CPU_time\">https:\/\/en.wikipedia.org\/wiki\/CPU_time<\/a><\/li>\n<li style=\"text-align: justify;\"><a href=\"http:\/\/www.networkjack.info\/blog\/2008\/12\/19\/load-average-versus-cpu-utilization-explained\/\">http:\/\/www.networkjack.info\/blog\/2008\/12\/19\/load-average-versus-cpu-utilization-explained\/<\/a><\/li>\n<li style=\"text-align: justify;\"><a href=\"https:\/\/bitismyth.wordpress.com\/2012\/03\/13\/cpu-usage-e-load-average\/\">https:\/\/bitismyth.wordpress.com\/2012\/03\/13\/cpu-usage-e-load-average\/<\/a><\/li>\n<li style=\"text-align: justify;\"><a href=\"http:\/\/www.admin-magazine.com\/Articles\/Law-of-Averages-Load-Averaging\">http:\/\/www.admin-magazine.com\/Articles\/Law-of-Averages-Load-Averaging<\/a><\/li>\n<li style=\"text-align: justify;\"><a href=\"https:\/\/blogs.technet.microsoft.com\/winserverperformance\/2009\/08\/06\/interpreting-cpu-utilization-for-performance-analysis\/\">https:\/\/blogs.technet.microsoft.com\/winserverperformance\/2009\/08\/06\/interpreting-cpu-utilization-for-performance-analysis\/<\/a><\/li>\n<\/ul>\n<p style=\"text-align: justify;\">\n","protected":false},"excerpt":{"rendered":"<p>Primeiramente precisamos entender que Load CPU e Utiliza\u00e7\u00e3o CPU s\u00e3o dois indicadores distintos que juntos auxiliam numa an\u00e1lise concreta do uso de CPU, vamos ao entendimento dos conceitos. 1 &#8211; Load CPU ou Load Average \u00c9 a carga de processamento, ou seja, n\u00famero de processos em execu\u00e7\u00e3o ou enfileirados para execu\u00e7\u00e3o. A vis\u00e3o da carga&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[48],"tags":[],"class_list":["post-701","post","type-post","status-publish","format-standard","hentry","category-zabbix"],"_links":{"self":[{"href":"https:\/\/wordpress.jpcorp.eti.br\/index.php?rest_route=\/wp\/v2\/posts\/701","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.jpcorp.eti.br\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wordpress.jpcorp.eti.br\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.jpcorp.eti.br\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.jpcorp.eti.br\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=701"}],"version-history":[{"count":15,"href":"https:\/\/wordpress.jpcorp.eti.br\/index.php?rest_route=\/wp\/v2\/posts\/701\/revisions"}],"predecessor-version":[{"id":1506,"href":"https:\/\/wordpress.jpcorp.eti.br\/index.php?rest_route=\/wp\/v2\/posts\/701\/revisions\/1506"}],"wp:attachment":[{"href":"https:\/\/wordpress.jpcorp.eti.br\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=701"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wordpress.jpcorp.eti.br\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=701"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wordpress.jpcorp.eti.br\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=701"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}