How to get my CENTOS 5.x install to be less bloated.
Hello LQ Community
Firstly let me thank the site owners and all members for the massive amounts of info on this site, i have many times been able to solve my linux problems by using information on this site. But i have finally found myself in dire need of help, so i have finally registered an account and here we are. I was just given my new dedicated server hosted in Amsterdam. Rather than giving me what i asked for (CENTOS, YUM and RPM) they have given me this super overbloated install of CENTOS. The server has 2gb of ram which is plenty, but right now it is sitting with no websites, no cron jobs... nothing... and it's burning 800mb of ram according to top. top - 10:31:36 up 22:00, 1 user, load average: 0.05, 0.06, 0.05 Tasks: 77 total, 2 running, 75 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: 2066392k total, 854948k used, 1211444k free, 181708k buffers Swap: 4192956k total, 0k used, 4192956k free, 610472k cached Here is a copy of the ps -aux USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND root 1 0.0 0.0 2060 612 ? Ss Aug06 0:00 init [3] root 2 0.0 0.0 0 0 ? S< Aug06 0:00 [migration/0] root 3 0.0 0.0 0 0 ? SN Aug06 0:00 [ksoftirqd/0] root 4 0.0 0.0 0 0 ? S< Aug06 0:00 [watchdog/0] root 5 0.0 0.0 0 0 ? S< Aug06 0:00 [migration/1] root 6 0.0 0.0 0 0 ? SN Aug06 0:00 [ksoftirqd/1] root 7 0.0 0.0 0 0 ? S< Aug06 0:00 [watchdog/1] root 8 0.0 0.0 0 0 ? S< Aug06 0:00 [events/0] root 9 0.0 0.0 0 0 ? S< Aug06 0:01 [events/1] root 10 0.0 0.0 0 0 ? S< Aug06 0:00 [khelper] root 11 0.0 0.0 0 0 ? S< Aug06 0:00 [kthread] root 15 0.0 0.0 0 0 ? S< Aug06 0:01 [kblockd/0] root 16 0.0 0.0 0 0 ? S< Aug06 0:01 [kblockd/1] root 17 0.0 0.0 0 0 ? S< Aug06 0:00 [kacpid] root 103 0.0 0.0 0 0 ? S< Aug06 0:00 [cqueue/0] root 104 0.0 0.0 0 0 ? S< Aug06 0:00 [cqueue/1] root 107 0.0 0.0 0 0 ? S< Aug06 0:00 [khubd] root 109 0.0 0.0 0 0 ? S< Aug06 0:00 [kseriod] root 177 0.0 0.0 0 0 ? S Aug06 0:00 [pdflush] root 178 0.0 0.0 0 0 ? S Aug06 0:01 [pdflush] root 179 0.0 0.0 0 0 ? S< Aug06 0:00 [kswapd0] root 180 0.0 0.0 0 0 ? S< Aug06 0:00 [aio/0] root 181 0.0 0.0 0 0 ? S< Aug06 0:00 [aio/1] root 345 0.0 0.0 0 0 ? S< Aug06 0:00 [kpsmoused] root 376 0.0 0.0 0 0 ? S< Aug06 0:00 [ata/0] root 377 0.0 0.0 0 0 ? S< Aug06 0:00 [ata/1] root 378 0.0 0.0 0 0 ? S< Aug06 0:00 [ata_aux] root 382 0.0 0.0 0 0 ? S< Aug06 0:00 [scsi_eh_0] root 383 0.0 0.0 0 0 ? S< Aug06 0:00 [scsi_eh_1] root 384 0.1 0.0 0 0 ? S< Aug06 2:24 [kjournald] root 411 0.0 0.0 0 0 ? S< Aug06 0:00 [kauditd] root 445 0.0 0.0 2248 608 ? S<s Aug06 0:00 /sbin/udevd -d root 1172 0.0 0.0 0 0 ? S< Aug06 0:00 [kmpathd/0] root 1173 0.0 0.0 0 0 ? S< Aug06 0:00 [kmpathd/1] root 1413 0.0 0.0 0 0 ? S< Aug06 0:00 [kondemand/0] root 1414 0.0 0.0 0 0 ? S< Aug06 0:00 [kondemand/1] root 1808 0.0 0.0 12132 652 ? S<sl Aug06 0:02 auditd root 1810 0.0 0.0 13072 796 ? S<sl Aug06 0:00 /sbin/audispd root 1841 0.0 0.0 1720 568 ? Ss Aug06 0:03 syslogd -m 0 root 1844 0.0 0.0 1672 400 ? Ss Aug06 0:00 klogd -x rpc 1894 0.0 0.0 1804 548 ? Ss Aug06 0:00 portmap root 1931 0.0 0.0 1952 816 ? Ss Aug06 0:00 rpc.statd root 1976 0.0 0.0 5432 588 ? Ss Aug06 0:00 rpc.idmapd dbus 2003 0.0 0.0 2740 916 ? Ss Aug06 0:00 dbus-daemon --system root 2018 0.0 0.0 2140 748 ? Ss Aug06 0:00 /usr/sbin/hcid root 2022 0.0 0.0 1736 488 ? Ss Aug06 0:00 /usr/sbin/sdpd root 2047 0.0 0.0 0 0 ? S< Aug06 0:00 [krfcommd] root 2094 0.0 0.0 12720 1324 ? Ssl Aug06 0:00 pcscd root 2118 0.0 0.0 1908 436 ? Ss Aug06 0:00 /usr/bin/hidd --server root 2138 0.0 0.0 9376 1156 ? Ssl Aug06 0:00 automount root 2161 0.0 0.0 1668 528 ? Ss Aug06 0:00 /usr/sbin/acpid root 2191 0.0 0.0 6984 1048 ? Ss Aug06 0:03 /usr/sbin/sshd root 2206 0.0 0.0 9740 2028 ? Ss Aug06 0:00 cupsd root 2230 0.0 0.0 9016 1856 ? Ss Aug06 0:00 sendmail: accepting connections smmsp 2238 0.0 0.0 8068 1488 ? Ss Aug06 0:00 sendmail: Queue runner@01:00:00 for /var/spool/clientmqueue root 2254 0.0 0.0 1896 468 ? Ss Aug06 0:00 gpm -m /dev/input/mice -t exps2 root 2269 0.0 0.0 5256 1104 ? Ss Aug06 0:00 crond xfs 2298 0.0 0.0 3520 1324 ? Ss Aug06 0:00 xfs -droppriv -daemon root 2327 0.0 0.0 2240 428 ? Ss Aug06 0:00 /usr/sbin/atd avahi 2357 0.0 0.0 2560 1364 ? Ss Aug06 0:00 avahi-daemon: running [techsessie.local] avahi 2358 0.0 0.0 2560 420 ? Ss Aug06 0:00 avahi-daemon: chroot helper 68 2373 0.0 0.1 5352 3592 ? Ss Aug06 0:00 hald root 2374 0.0 0.0 3124 1060 ? S Aug06 0:00 hald-runner 68 2381 0.0 0.0 1992 808 ? S Aug06 0:00 hald-addon-acpi: listening on acpid socket /var/run/acpid.so cket root 2427 0.0 0.0 1984 512 ? S Aug06 0:00 /usr/sbin/smartd -q never root 2430 0.0 0.0 1652 448 tty1 Ss+ Aug06 0:00 /sbin/mingetty tty1 root 2431 0.0 0.0 1656 452 tty2 Ss+ Aug06 0:00 /sbin/mingetty tty2 root 2432 0.0 0.0 1652 448 tty3 Ss+ Aug06 0:00 /sbin/mingetty tty3 root 2433 0.0 0.0 1652 448 tty4 Ss+ Aug06 0:00 /sbin/mingetty tty4 root 2434 0.0 0.0 1656 448 tty5 Ss+ Aug06 0:00 /sbin/mingetty tty5 root 2437 0.0 0.0 1656 452 tty6 Ss+ Aug06 0:00 /sbin/mingetty tty6 root 2486 0.0 0.4 24412 9876 ? SN Aug06 0:00 /usr/bin/python -tt /usr/sbin/yum-updatesd root 2488 0.0 0.0 2692 1324 ? SN Aug06 0:00 /usr/libexec/gam_server 68 7693 0.0 0.0 1988 776 ? S Aug06 0:00 hald-addon-keyboard: listening on /dev/input/event1 root 25468 0.0 0.1 10000 2840 ? Ss 09:12 0:00 sshd: root@pts/0 root 25471 0.0 0.0 4532 1408 pts/0 Ss 09:12 0:00 -bash root 25964 0.0 0.0 4248 948 pts/0 R+ 10:32 0:00 ps -aux root 25965 0.0 0.0 4156 752 pts/0 S+ 10:32 0:00 less I am getting better and better at understanding things liux related these days, so i will state what i think is the biggest problem and hope that i am not on the wrong path... i think that basically there are just too many services started that are not needed on a typical LAMP setup. From my research i found that i could use chkconfig and i found this info. chkconfig --list|egrep '[123]:on' acpid 0:off 1:off 2:off 3:on 4:on 5:on 6:off anacron 0:off 1:off 2:on 3:on 4:on 5:on 6:off apmd 0:off 1:off 2:on 3:on 4:on 5:on 6:off atd 0:off 1:off 2:off 3:on 4:on 5:on 6:off auditd 0:off 1:off 2:on 3:on 4:on 5:on 6:off autofs 0:off 1:off 2:off 3:on 4:on 5:on 6:off avahi-daemon 0:off 1:off 2:off 3:on 4:on 5:on 6:off bluetooth 0:off 1:off 2:on 3:on 4:on 5:on 6:off cpuspeed 0:off 1:on 2:on 3:on 4:on 5:on 6:off crond 0:off 1:off 2:on 3:on 4:on 5:on 6:off cups 0:off 1:off 2:on 3:on 4:on 5:on 6:off firstboot 0:off 1:off 2:off 3:on 4:off 5:on 6:off gpm 0:off 1:off 2:on 3:on 4:on 5:on 6:off haldaemon 0:off 1:off 2:off 3:on 4:on 5:on 6:off hidd 0:off 1:off 2:on 3:on 4:on 5:on 6:off ip6tables 0:off 1:off 2:on 3:on 4:on 5:on 6:off iptables 0:off 1:off 2:on 3:on 4:on 5:on 6:off irqbalance 0:off 1:off 2:on 3:on 4:on 5:on 6:off isdn 0:off 1:off 2:on 3:on 4:on 5:on 6:off kudzu 0:off 1:off 2:off 3:on 4:on 5:on 6:off lvm2-monitor 0:off 1:on 2:on 3:on 4:on 5:on 6:off mcstrans 0:off 1:off 2:on 3:on 4:on 5:on 6:off mdmonitor 0:off 1:off 2:on 3:on 4:on 5:on 6:off messagebus 0:off 1:off 2:off 3:on 4:on 5:on 6:off microcode_ctl 0:off 1:off 2:on 3:on 4:on 5:on 6:off netfs 0:off 1:off 2:off 3:on 4:on 5:on 6:off network 0:off 1:off 2:on 3:on 4:on 5:on 6:off nfslock 0:off 1:off 2:off 3:on 4:on 5:on 6:off pcscd 0:off 1:off 2:on 3:on 4:on 5:on 6:off portmap 0:off 1:off 2:off 3:on 4:on 5:on 6:off readahead_early 0:off 1:off 2:on 3:on 4:on 5:on 6:off restorecond 0:off 1:off 2:on 3:on 4:on 5:on 6:off rpcgssd 0:off 1:off 2:off 3:on 4:on 5:on 6:off rpcidmapd 0:off 1:off 2:off 3:on 4:on 5:on 6:off sendmail 0:off 1:off 2:on 3:on 4:on 5:on 6:off setroubleshoot 0:off 1:off 2:off 3:on 4:on 5:on 6:off smartd 0:off 1:off 2:on 3:on 4:on 5:on 6:off sshd 0:off 1:off 2:on 3:on 4:on 5:on 6:off syslog 0:off 1:off 2:on 3:on 4:on 5:on 6:off xfs 0:off 1:off 2:on 3:on 4:on 5:on 6:off yum-updatesd 0:off 1:off 2:off 3:on 4:on 5:on 6:off If i am correct in my thinking, can someone please tell me which of these i can safely switch off? Or if the list is shorter of what to leave swtiched on then that would also be welcome info for me. Thanks in advance for any help, i hope one day to be able to help other here. Sneef |
You can switch off:
firstboot gpm (if you don't use your mouse in terminals) bluetooth(if you don't use bluetooth) ip6tables (if you use ipv4) cups (id you're not interested in printing) More info on services here: http://www.mjmwired.net/resources/mj...9.html#service (FC9 oriented but should apply to CentOS just as well). |
All times are GMT -5. The time now is 06:46 PM. |