[CentOS-es] Centos Memoria Cache
Estimados, antes que nada gracias por su tiempo. Tengo el siguiente caso en un servidor de aplicación Jira de producción: El servidor tiene 12 GB de RAM, se toma toda la ram y la guarda en cache como se puede ver a continuación: # free -m total used free sharedbuffers cached Mem: 12011 11946 64 0 17 91 -/+ buffers/cache: 11837173 Swap: 5951 7 5944 # top top - 15:04:29 up 8 days, 2:44, 1 user, load average: 0.06, 0.04, 0.01 Tasks: 133 total, 1 running, 132 sleeping, 0 stopped, 0 zombie Cpu(s): 0.6%us, 0.3%sy, 0.0%ni, 98.6%id, 0.0%wa, 0.3%hi, 0.3%si, 0.0%st Mem: 12299972k total, 12233816k used,66156k free,18436k buffers Swap: 6094840k total, 7244k used, 6087596k free,93692k cached PID USER PR NI VIRT RES SHR S %CPU %MEMTIME+ RUSER COMMAND 2 root RT -5 000 S 0.0 0.0 0:00.54 root migration/0 3 root 34 19 000 S 0.0 0.0 0:00.06 root ksoftirqd/0 4 root RT -5 000 S 0.0 0.0 0:00.36 root migration/1 5 root 34 19 000 S 0.0 0.0 0:00.07 root ksoftirqd/1 6 root RT -5 000 S 0.0 0.0 0:00.35 root migration/2 7 root 34 19 000 S 0.0 0.0 0:00.09 root ksoftirqd/2 8 root RT -5 000 S 0.0 0.0 0:00.31 root migration/3 9 root 34 19 000 S 0.0 0.0 0:00.11 root ksoftirqd/3 10 root 10 -5 000 S 0.0 0.0 0:02.98 root events/0 11 root 10 -5 000 S 0.0 0.0 0:02.13 root events/1 12 root 10 -5 000 S 0.0 0.0 0:01.90 root events/2 13 root 10 -5 000 S 0.0 0.0 0:01.53 root events/3 14 root 10 -5 000 S 0.0 0.0 0:00.00 root khelper 119 root 12 -5 000 S 0.0 0.0 0:00.00 root kthread 126 root 10 -5 000 S 0.0 0.0 0:01.76 root kblockd/0 127 root 10 -5 000 S 0.0 0.0 0:00.64 root kblockd/1 128 root 10 -5 000 S 0.0 0.0 0:00.83 root kblockd/2 129 root 10 -5 000 S 0.0 0.0 0:00.52 root kblockd/3 130 root 17 -5 000 S 0.0 0.0 0:00.00 root kacpid Este es el proceso de la maquina virtual Java corriendo: 10285 ?Sl 204:16 /opt/java/jdk1.6.0_25/bin/java -Djava.util.logging.config.file=/apps/jira/jira402/conf/logging.properties -XX:MaxPermSize=256m -Xms3328m -Xmx3328m -Xmn1024m -XX:PermSize=1024m -Djava.awt.headless=true -Datlassian.standalone=JIRA -Dorg.apache.jasper.runtime.BodyContentImpl.LIMIT_BUFFER=true -Dmail.mime.decodeparameters=true -Duser.timezone=GMT-3 -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.endorsed.dirs=/apps/jira/jira402/common/endorsed -classpath /apps/jira/jira402/bin/bootstrap.jar -Dcatalina.base=/apps/jira/jira402 -Dcatalina.home=/apps/jira/jira402 -Djava.io.tmpdir=/apps/jira/jira402/temp org.apache.catalina.startup.Bootstrap start Como pueden ver la aplicación Jira tiene configurado que utilice como maximo 4GB de Ram Paso la data del Sysstat: # sar Linux 2.6.18-164.el5 (eze1-vnn-jira-demo) 05/10/2012 12:00:02 AM CPU %user %nice %system %iowait%steal %idle 12:10:01 AM all 0.71 0.00 0.22 1.83 0.00 97.24 12:20:01 AM all 0.03 0.00 0.02 0.01 0.00 99.95 12:30:01 AM all 0.01 0.00 0.02 0.03 0.00 99.94 12:40:01 AM all 0.09 0.00 0.02 0.02 0.00 99.87 12:50:01 AM all 0.05 0.00 0.02 0.09 0.00 99.85 01:00:01 AM all 0.25 0.00 0.04 0.12 0.00 99.59 01:10:01 AM all 0.05 0.00 0.02 0.05 0.00 99.88 01:20:01 AM all 0.02 0.00 0.02 0.04 0.00 99.92 01:30:01 AM all 0.02 0.00 0.02 0.01 0.00 99.95 01:40:01 AM all 0.09 0.00 0.02 0.05 0.00 99.84 01:50:01 AM all 0.03 0.00 0.02 0.01 0.00 99.94 02:00:01 AM all 0.03 0.00 0.02 0.06 0.00 99.90 02:10:01 AM all 0.05 0.00 0.02 0.01 0.00 99.92 02:20:02 AM all 0.02 0.00 0.02 0.06 0.00 99.90 02:30:01 AM all 0.01 0.00 0.01 0.02 0.00 99.96 02:40:01 AM all 0.00 0.00 0.02 0.04 0.00 99.93 02:50:01 AM all 0.03 0.00 0.02 0.01 0.00 99.94 03:00:01 AM all 0.00 0.00 0.01 0.01 0.00 99.98 03:10:01 AM all 0.05 0.00 0.02 0.06 0.00 99.87 03:20:01 AM all 0.02 0.00 0.01 0.01 0.00 99.96 03:30:01 AM all 0.00 0.00
Re: [CentOS-es] Centos Memoria Cache
On 05/10/2012 01:40 PM, Federico Don wrote: Estimados, antes que nada gracias por su tiempo. Tengo el siguiente caso en un servidor de aplicación Jira de producción: El servidor tiene 12 GB de RAM, se toma toda la ram y la guarda en cache como se puede ver a continuación: # free -m total used free sharedbuffers cached Mem: 12011 11946 64 0 17 91 -/+ buffers/cache: 11837173 Swap: 5951 7 5944 no, eso NO está bien, NO está guardando en caché. La memoria de caché es 91MB, es bajísima.. el resto es la memoria bloqueada por procesos (memoria no descartabla, no swapeable en su mayoría)... que es 11837, está muy mal la cosa # top top - 15:04:29 up 8 days, 2:44, 1 user, load average: 0.06, 0.04, 0.01 Tasks: 133 total, 1 running, 132 sleeping, 0 stopped, 0 zombie Cpu(s): 0.6%us, 0.3%sy, 0.0%ni, 98.6%id, 0.0%wa, 0.3%hi, 0.3%si, 0.0%st Mem: 12299972k total, 12233816k used,66156k free,18436k buffers Swap: 6094840k total, 7244k used, 6087596k free,93692k cached deberías ordenar por memoria apretando la M mayúscula. Este es el proceso de la maquina virtual Java corriendo: 10285 ?Sl 204:16 /opt/java/jdk1.6.0_25/bin/java -Djava.util.logging.config.file=/apps/jira/jira402/conf/logging.properties -XX:MaxPermSize=256m -Xms3328m -Xmx3328m -Xmn1024m -XX:PermSize=1024m -Djava.awt.headless=true -Datlassian.standalone=JIRA -Dorg.apache.jasper.runtime.BodyContentImpl.LIMIT_BUFFER=true -Dmail.mime.decodeparameters=true -Duser.timezone=GMT-3 -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.endorsed.dirs=/apps/jira/jira402/common/endorsed -classpath /apps/jira/jira402/bin/bootstrap.jar -Dcatalina.base=/apps/jira/jira402 -Dcatalina.home=/apps/jira/jira402 -Djava.io.tmpdir=/apps/jira/jira402/temp org.apache.catalina.startup.Bootstrap start no sacaste completamente todo... ps auwwx|egrep java quizá saque más info Pueden ayudarme a darme cuenta por que motivo se almacena tanta memoria en cache?? ps ax también tiene un switch para que puedas hacer sort por memoria, lo que te interesa es la memoria reservada (RSZ creo que es). saludos epe Muchas gracias, ___ CentOS-es mailing list CentOS-es@centos.org http://lists.centos.org/mailman/listinfo/centos-es ___ CentOS-es mailing list CentOS-es@centos.org http://lists.centos.org/mailman/listinfo/centos-es
Re: [CentOS-es] Centos Memoria Cache
Paso mas data Ernesto, para ver si me podes ayudar: ps auwwx | egrep java root 9506 0.0 0.0 61144 744 pts/0S+ 17:45 0:00 egrep java jira 10285 1.7 31.7 5277532 3911312 ? Sl May02 210:27 /opt/java/jdk1.6.0_25/bin/java -Djava.util.logging.config.file=/apps/jira/jira402/conf/logging.properties -XX:MaxPermSize=256m -Xms3328m -Xmx3328m -Xmn1024m -XX:PermSize=1024m -Djava.awt.headless=true -Datlassian.standalone=JIRA -Dorg.apache.jasper.runtime.BodyContentImpl.LIMIT_BUFFER=true -Dmail.mime.decodeparameters=true -Duser.timezone=GMT-3 -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.endorsed.dirs=/apps/jira/jira402/common/endorsed -classpath /apps/jira/jira402/bin/bootstrap.jar -Dcatalina.base=/apps/jira/jira402 -Dcatalina.home=/apps/jira/jira402 -Djava.io.tmpdir=/apps/jira/jira402/temp org.apache.catalina.startup.Bootstrap start El top estaba con M, igualmente te paso la salida de como esta ahora: # top top - 17:46:39 up 8 days, 5:26, 1 user, load average: 0.02, 0.04, 0.06 Tasks: 132 total, 1 running, 131 sleeping, 0 stopped, 0 zombie Cpu(s): 0.0%us, 0.0%sy, 0.0%ni,100.0%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st Mem: 12299972k total, 4768128k used, 7531844k free,15992k buffers Swap: 6094840k total, 7236k used, 6087604k free, 653204k cached PID USER PR NI VIRT RES SHR S %CPU %MEMTIME+ RUSER COMMAND 2 root RT -5 000 S 0.0 0.0 0:00.54 root migration/0 3 root 34 19 000 S 0.0 0.0 0:00.06 root ksoftirqd/0 4 root RT -5 000 S 0.0 0.0 0:00.36 root migration/1 5 root 34 19 000 S 0.0 0.0 0:00.07 root ksoftirqd/1 6 root RT -5 000 S 0.0 0.0 0:00.35 root migration/2 7 root 34 19 000 S 0.0 0.0 0:00.09 root ksoftirqd/2 8 root RT -5 000 S 0.0 0.0 0:00.31 root migration/3 9 root 34 19 000 S 0.0 0.0 0:00.11 root ksoftirqd/3 10 root 10 -5 000 S 0.0 0.0 0:02.99 root events/0 11 root 10 -5 000 S 0.0 0.0 0:02.15 root events/1 12 root 10 -5 000 S 0.0 0.0 0:01.91 root events/2 13 root 10 -5 000 S 0.0 0.0 0:01.53 root events/3 14 root 10 -5 000 S 0.0 0.0 0:00.00 root khelper 119 root 12 -5 000 S 0.0 0.0 0:00.00 root kthread 126 root 10 -5 000 S 0.0 0.0 0:01.78 root kblockd/0 127 root 10 -5 000 S 0.0 0.0 0:00.64 root kblockd/1 128 root 10 -5 000 S 0.0 0.0 0:00.83 root kblockd/2 129 root 10 -5 000 S 0.0 0.0 0:00.52 root kblockd/3 130 root 17 -5 000 S 0.0 0.0 0:00.00 root kacpid 291 root 16 -5 000 S 0.0 0.0 0:00.00 root cqueue/0 292 root 16 -5 000 S 0.0 0.0 0:00.00 root cqueue/1 293 root 16 -5 000 S 0.0 0.0 0:00.00 root cqueue/2 294 root 16 -5 000 S 0.0 0.0 0:00.00 root cqueue/3 297 root 16 -5 000 S 0.0 0.0 0:00.00 root khubd 299 root 10 -5 000 S 0.0 0.0 0:00.00 root kseriod 389 root 15 0 000 S 0.0 0.0 0:06.51 root pdflush 390 root 15 0 000 S 0.0 0.0 0:04.58 root pdflush 391 root 10 -5 000 S 0.0 0.0 3:51.11 root kswapd0 392 root 19 -5 000 S 0.0 0.0 0:00.00 root aio/0 393 root 20 -5 000 S 0.0 0.0 0:00.00 root aio/1 394 root 10 -5 000 S 0.0 0.0 0:00.00 root aio/2 395 root 20 -5 000 S 0.0 0.0 0:00.00 root aio/3 Entiendo que este es el sort del ps ax del que me hablabas: # ps auwwx --sort rss USER PID %CPU %MEMVSZ RSS TTY STAT START TIME COMMAND root 2 0.0 0.0 0 0 ?S May02 0:00 [migration/0] root 3 0.0 0.0 0 0 ?SN May02 0:00 [ksoftirqd/0] root 4 0.0 0.0 0 0 ?S May02 0:00 [migration/1] root 5 0.0 0.0 0 0 ?SN May02 0:00 [ksoftirqd/1] root 6 0.0 0.0 0 0 ?S May02 0:00 [migration/2] root 7 0.0 0.0 0 0 ?SN May02 0:00 [ksoftirqd/2] root 8 0.0 0.0 0 0 ?S May02 0:00 [migration/3] root 9 0.0 0.0 0 0 ?SN May02 0:00 [ksoftirqd/3] root10 0.0 0.0 0 0 ?S May02 0:02 [events/0] root11 0.0 0.0 0 0 ?S May02 0:02 [events/1] root12 0.0 0.0 0 0 ?S May02 0:01 [events/2] root13 0.0 0.0 0 0 ?S May02 0:01 [events/3] root14 0.0 0.0 0 0 ?
Re: [CentOS-es] Centos Memoria Cache
# top top - 17:46:39 up 8 days, 5:26, 1 user, load average: 0.02, 0.04, 0.06 Tasks: 132 total, 1 running, 131 sleeping, 0 stopped, 0 zombie Cpu(s): 0.0%us, 0.0%sy, 0.0%ni,100.0%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st Mem: 12299972k total, 4768128k used, 7531844k free,15992k buffers Swap: 6094840k total, 7236k used, 6087604k free, 653204k cached en este momento no es la misma situación de antes, ahora tiene memoria libre ___ CentOS-es mailing list CentOS-es@centos.org http://lists.centos.org/mailman/listinfo/centos-es