[CentOS-es] Centos Memoria Cache
Federico Don
federico.don13 en gmail.com
Jue Mayo 10 16:49:48 EDT 2012
Paso mas data Ernesto, para ver si me podes ayudar:
ps auwwx | egrep java
root 9506 0.0 0.0 61144 744 pts/0 S+ 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 %MEM TIME+ RUSER
COMMAND
2 root RT -5 0 0 0 S 0.0 0.0 0:00.54 root
migration/0
3 root 34 19 0 0 0 S 0.0 0.0 0:00.06 root
ksoftirqd/0
4 root RT -5 0 0 0 S 0.0 0.0 0:00.36 root
migration/1
5 root 34 19 0 0 0 S 0.0 0.0 0:00.07 root
ksoftirqd/1
6 root RT -5 0 0 0 S 0.0 0.0 0:00.35 root
migration/2
7 root 34 19 0 0 0 S 0.0 0.0 0:00.09 root
ksoftirqd/2
8 root RT -5 0 0 0 S 0.0 0.0 0:00.31 root
migration/3
9 root 34 19 0 0 0 S 0.0 0.0 0:00.11 root
ksoftirqd/3
10 root 10 -5 0 0 0 S 0.0 0.0 0:02.99 root
events/0
11 root 10 -5 0 0 0 S 0.0 0.0 0:02.15 root
events/1
12 root 10 -5 0 0 0 S 0.0 0.0 0:01.91 root
events/2
13 root 10 -5 0 0 0 S 0.0 0.0 0:01.53 root
events/3
14 root 10 -5 0 0 0 S 0.0 0.0 0:00.00 root
khelper
119 root 12 -5 0 0 0 S 0.0 0.0 0:00.00 root
kthread
126 root 10 -5 0 0 0 S 0.0 0.0 0:01.78 root
kblockd/0
127 root 10 -5 0 0 0 S 0.0 0.0 0:00.64 root
kblockd/1
128 root 10 -5 0 0 0 S 0.0 0.0 0:00.83 root
kblockd/2
129 root 10 -5 0 0 0 S 0.0 0.0 0:00.52 root
kblockd/3
130 root 17 -5 0 0 0 S 0.0 0.0 0:00.00 root
kacpid
291 root 16 -5 0 0 0 S 0.0 0.0 0:00.00 root
cqueue/0
292 root 16 -5 0 0 0 S 0.0 0.0 0:00.00 root
cqueue/1
293 root 16 -5 0 0 0 S 0.0 0.0 0:00.00 root
cqueue/2
294 root 16 -5 0 0 0 S 0.0 0.0 0:00.00 root
cqueue/3
297 root 16 -5 0 0 0 S 0.0 0.0 0:00.00 root khubd
299 root 10 -5 0 0 0 S 0.0 0.0 0:00.00 root
kseriod
389 root 15 0 0 0 0 S 0.0 0.0 0:06.51 root
pdflush
390 root 15 0 0 0 0 S 0.0 0.0 0:04.58 root
pdflush
391 root 10 -5 0 0 0 S 0.0 0.0 3:51.11 root
kswapd0
392 root 19 -5 0 0 0 S 0.0 0.0 0:00.00 root aio/0
393 root 20 -5 0 0 0 S 0.0 0.0 0:00.00 root aio/1
394 root 10 -5 0 0 0 S 0.0 0.0 0:00.00 root aio/2
395 root 20 -5 0 0 0 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 %MEM VSZ 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]
root 10 0.0 0.0 0 0 ? S< May02 0:02 [events/0]
root 11 0.0 0.0 0 0 ? S< May02 0:02 [events/1]
root 12 0.0 0.0 0 0 ? S< May02 0:01 [events/2]
root 13 0.0 0.0 0 0 ? S< May02 0:01 [events/3]
root 14 0.0 0.0 0 0 ? S< May02 0:00 [khelper]
root 119 0.0 0.0 0 0 ? S< May02 0:00 [kthread]
root 126 0.0 0.0 0 0 ? S< May02 0:01 [kblockd/0]
root 127 0.0 0.0 0 0 ? S< May02 0:00 [kblockd/1]
root 128 0.0 0.0 0 0 ? S< May02 0:00 [kblockd/2]
root 129 0.0 0.0 0 0 ? S< May02 0:00 [kblockd/3]
root 130 0.0 0.0 0 0 ? S< May02 0:00 [kacpid]
root 291 0.0 0.0 0 0 ? S< May02 0:00 [cqueue/0]
root 292 0.0 0.0 0 0 ? S< May02 0:00 [cqueue/1]
root 293 0.0 0.0 0 0 ? S< May02 0:00 [cqueue/2]
root 294 0.0 0.0 0 0 ? S< May02 0:00 [cqueue/3]
root 297 0.0 0.0 0 0 ? S< May02 0:00 [khubd]
root 299 0.0 0.0 0 0 ? S< May02 0:00 [kseriod]
root 389 0.0 0.0 0 0 ? S May02 0:06 [pdflush]
root 390 0.0 0.0 0 0 ? S May02 0:04 [pdflush]
root 391 0.0 0.0 0 0 ? S< May02 3:51 [kswapd0]
root 392 0.0 0.0 0 0 ? S< May02 0:00 [aio/0]
root 393 0.0 0.0 0 0 ? S< May02 0:00 [aio/1]
root 394 0.0 0.0 0 0 ? S< May02 0:00 [aio/2]
root 395 0.0 0.0 0 0 ? S< May02 0:00 [aio/3]
root 601 0.0 0.0 0 0 ? S< May02 0:00 [kpsmoused]
root 666 0.0 0.0 0 0 ? S< May02 0:00
[mpt_poll_0]
root 667 0.0 0.0 0 0 ? S< May02 0:00 [scsi_eh_0]
root 673 0.0 0.0 0 0 ? S< May02 0:00 [ata/0]
root 674 0.0 0.0 0 0 ? S< May02 0:00 [ata/1]
root 675 0.0 0.0 0 0 ? S< May02 0:00 [ata/2]
root 676 0.0 0.0 0 0 ? S< May02 0:00 [ata/3]
root 677 0.0 0.0 0 0 ? S< May02 0:00 [ata_aux]
root 688 0.0 0.0 0 0 ? S< May02 0:00 [kstriped]
root 709 0.0 0.0 0 0 ? S< May02 0:00 [ksnapd]
root 747 0.0 0.0 0 0 ? S< May02 0:23 [kjournald]
root 772 0.0 0.0 0 0 ? S< May02 0:00 [kauditd]
root 2299 0.0 0.0 0 0 ? S< May02 0:00 [kmpathd/0]
root 2300 0.0 0.0 0 0 ? S< May02 0:00 [kmpathd/1]
root 2301 0.0 0.0 0 0 ? S< May02 0:00 [kmpathd/2]
root 2302 0.0 0.0 0 0 ? S< May02 0:00 [kmpathd/3]
root 2303 0.0 0.0 0 0 ? S< May02 0:00
[kmpath_handlerd]
root 2329 0.0 0.0 0 0 ? S< May02 0:10 [kjournald]
root 2332 0.0 0.0 0 0 ? S< May02 0:00 [kjournald]
root 2867 0.0 0.0 0 0 ? S< May02 8:43 [vmmemctl]
root 3468 0.0 0.0 0 0 ? S< May02 0:00 [rpciod/0]
root 3470 0.0 0.0 0 0 ? S< May02 0:00 [rpciod/1]
root 3471 0.0 0.0 0 0 ?
S< May02 0:00 [rpciod/2]
root 3472 0.0 0.0 0 0 ? S< May02 0:00 [rpciod/3]
root 3416 0.0 0.0 10760 328 ? Ss May02 0:08 irqbalance
root 4432 0.0 0.0 18416 348 ? S May02 0:00
/usr/sbin/smartd -q never
root 4258 0.0 0.0 6452 352 ? Ss May02 0:00 gpm -m
/dev/input/mice -t exps2
root 3514 0.0 0.0 48728 404 ? Ss May02 0:00 rpc.idmapd
root 4324 0.0 0.0 18740 412 ? Ss May02 0:00
/usr/sbin/atd
root 3402 0.0 0.0 3804 420 ? Ss May02 0:00 klogd -x
root 4385 0.0 0.0 5948 428 ? S May02 0:00
/var/ossec/bin/ossec-execd
root 3681 0.0 0.0 8516 480 ? Ss May02 0:00
/usr/bin/hidd --server
root 4393 0.0 0.0 4012 480 ? S May02 0:02
/var/ossec/bin/ossec-logcollector
root 4435 0.0 0.0 3792 480 tty1 Ss+ May02 0:00
/sbin/mingetty tty1
root 4438 0.0 0.0 3792 480 tty4 Ss+ May02 0:00
/sbin/mingetty tty4
root 4436 0.0 0.0 3792 484 tty2 Ss+ May02 0:00
/sbin/mingetty tty2
root 4439 0.0 0.0 3792 484 tty5 Ss+ May02 0:00
/sbin/mingetty tty5
root 4440 0.0 0.0 3792 484 tty6 Ss+ May02 0:00
/sbin/mingetty tty6
root 4437 0.0 0.0 3792 488 tty3 Ss+ May02 0:00
/sbin/mingetty tty3
root 3604 0.0 0.0 3800 560 ? Ss May02 0:00
/usr/sbin/acpid
rpc 3436 0.0 0.0 8052 592 ? Ss May02 0:00 portmap
root 805 0.0 0.0 12676 636 ? S<s May02 0:00
/sbin/udevd -d
root 3399 0.0 0.0 5908 656 ? Ss May02 0:00 syslogd -m
0
avahi 4339 0.0 0.0 39076 660 ? Ss May02 0:00
avahi-daemon: chroot helper
root 1 0.0 0.0 10348 684 ? Ss May02 0:01 init [3]
root 3642 0.0 0.0 10228 692 ? S May02 0:40
hald-addon-storage: polling /dev/hdc
root 3752 0.0 0.0 46660 692 ? Ss May02 0:00
/usr/sbin/sshd
root 3481 0.0 0.0 10160 780 ? Ss May02 0:00 rpc.statd
root 3367 0.0 0.0 27332 788 ? S<sl May02 0:01 auditd
root 3369 0.0 0.0 81808 792 ? S<sl May02 0:00
/sbin/audispd
ossec 4389 0.0 0.0 6236 852 ? S May02 1:17
/var/ossec/bin/ossec-agentd
68 3633 0.0 0.0 12324 864 ? S May02 0:00
hald-addon-keyboard: listening on /dev/input/event0
68 3626 0.0 0.0 12324 872 ? S May02 0:00
hald-addon-acpi: listening on acpid socket /var/run/acpid.socket
smmsp 4244 0.0 0.0 57700 896 ? Ss May02 0:00 sendmail:
Queue runner en 01:00:00 for /var/spool/clientmqueue
root 3786 0.0 0.0 21644 904 ? Ss May02 0:00 xinetd
-stayalive -pidfile /var/run/xinetd.pid
root 4271 0.0 0.0 74808 1004 ? Ss May02 0:00 crond
nobody 1414 0.0 0.0 12176 1020 ? S 00:00 0:01
/usr/bin/nmon -f -t -m /var/log/nmon
root 3618 0.0 0.0 21692 1048 ? S May02 0:00 hald-runner
root 3590 0.0 0.0 21040 1232 ? Ssl May02 0:01 pcscd
dbus 3537 0.0 0.0 32848 1288 ? Ss May02 0:00
dbus-daemon --system
root 4015 0.0 0.0 66948 1288 ? Ss May02 0:02 sendmail:
accepting connections
root 3855 0.0 0.0 65920 1300 ? S May02 0:00 /bin/sh
/usr/bin/mysqld_safe --datadir=/var/lib/mysql
--socket=/var/lib/mysql/mysql.sock --log-error=/var/log/mysqld.log
--pid-file=/var/run/mysqld/mysqld.pid --user=mysql
root 9441 0.0 0.0 66172 1680 pts/0 S 17:40 0:00 -bash
nagios 3933 0.0 0.0 45304 1728 ? Ss May02 0:11 nrpe -c
/etc/nagios/nrpe.cfg -d
root 4397 0.0 0.0 4924 1728 ? S May02 3:32
/var/ossec/bin/ossec-syscheckd
root 9526 0.0 0.0 81616 2000 pts/0 R+ 17:48 0:00 ps auwwx
--sort rss
root 3712 0.0 0.0 137736 2040 ? Ssl May02 0:04 automount
root 3765 0.0 0.0 134044 2096 ? Ss May02 0:00 cupsd
20122 9414 0.0 0.0 90528 2176 ? S 17:40 0:00 sshd:
Federico.Don en pts/0
xfs 4299 0.0 0.0 38528 2336 ? Ss May02 0:00 xfs
-droppriv -daemon
avahi 4338 0.0 0.0 39232 2408 ? Ss May02 0:01
avahi-daemon: running [eze1-vnn-jira-demo-2.local]
root 9440 0.0 0.0 132956 2420 pts/0 S 17:40 0:00 su -
20122 9415 0.0 0.0 81940 2540 pts/0 Ss 17:40 0:00 -bash
root 2985 0.0 0.0 56868 2576 ? Sl May02 0:40
/usr/sbin/vmtoolsd
root 4345 0.0 0.0 139236 2696 ? S May02 0:02 python
/usr/bin/denyhosts.py --daemon --config=/etc/denyhosts/denyhosts.cfg
root 9402 0.0 0.0 90372 3832 ? Ss 17:39 0:00 sshd:
Federico.Don [priv]
68 3617 0.0 0.0 49112 5048 ? Ss May02 0:05 hald
ntp 3817 0.0 0.0 37184 8792 ? SLs May02 0:01 ntpd -u
ntp:ntp -p /var/run/ntpd.pid -g
apache 8573 0.0 0.0 230224 12196 ? S 16:09 0:00
/usr/sbin/httpd
apache 6289 0.0 0.0 230264 12268 ? S 11:53 0:03
/usr/sbin/httpd
apache 5476 0.0 0.0 230236 12280 ? S 10:27 0:05
/usr/sbin/httpd
apache 6294 0.0 0.1 230228 12412 ? S 11:53 0:04
/usr/sbin/httpd
apache 28258 0.0 0.1 230236 12428 ? S May09 0:09
/usr/sbin/httpd
apache 9133 0.0 0.1 230684 12580 ? S 17:12 0:00
/usr/sbin/httpd
apache 6287 0.0 0.1 230688 12676 ? S 11:53 0:04
/usr/sbin/httpd
apache 7740 0.0 0.1 230704 12696 ? S 14:47 0:02
/usr/sbin/httpd
apache 6926 0.0 0.1 230828 12704 ? S 12:56 0:03
/usr/sbin/httpd
apache 6304 0.0 0.1 230712 12708 ? S 11:54 0:03
/usr/sbin/httpd
apache 6300 0.0 0.1 230816 12724 ? S 11:53 0:04
/usr/sbin/httpd
apache 6305 0.0 0.1 230808 12724 ? S 11:54 0:04
/usr/sbin/httpd
apache 6927 0.0 0.1 230704 12732 ? S 12:56 0:03
/usr/sbin/httpd
apache 7324 0.0 0.1 230784 12764 ? S 13:52 0:02
/usr/sbin/httpd
apache 6286 0.0 0.1 230692 12768 ? S 11:53 0:04
/usr/sbin/httpd
apache 6298 0.0 0.1 230828 12768 ? S 11:53 0:03
/usr/sbin/httpd
apache 6306 0.0 0.1 230708 12772 ? S 11:54 0:03
/usr/sbin/httpd
apache 6900 0.0 0.1 230692 12860 ? S 12:53 0:03
/usr/sbin/httpd
apache 5477 0.0 0.1 230796 12924 ? S 10:27 0:04
/usr/sbin/httpd
root 4126 0.0 0.1 224632 14640 ? Ss May02 0:03
/usr/sbin/httpd
mysql 3902 0.1 0.3 334332 38092 ? Sl May02 20:10
/usr/libexec/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql
--pid-file=/var/run/mysqld/mysqld.pid --skip-external-locking
--socket=/var/lib/mysql/mysql.sock
jira 10285 1.7 31.7 5276176 3909956 ? Sl May02 210:32
/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
Saludos y gracias por su tiempo.
El 10 de mayo de 2012 16:42, Ernesto Pérez Estévez
<centos en ecualinux.com>escribió:
> 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 shared buffers
> cached
> > Mem: 12011 11946 64 0 17 91
> > -/+ buffers/cache: 11837 173
> > 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 en centos.org
> > http://lists.centos.org/mailman/listinfo/centos-es
> >
>
> _______________________________________________
> CentOS-es mailing list
> CentOS-es en centos.org
> http://lists.centos.org/mailman/listinfo/centos-es
>
Más información sobre la lista de distribución CentOS-es