Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Fri Apr 06, 2012 7:37 am 
Offline
Junior Member

Joined: Fri Jan 02, 2009 9:11 am
Posts: 36
I have a number of servers (web, db, ftp) that are all built from a base install of Ubuntu 11.10 with software then installed with apt-get.

There are a number of similar services running from init.d which I don't really know what they are.

Does any one know which services can be stopped just to remove some memory footprint. Or is it a very bad idea to start doing this?


Top
   
 Post subject:
PostPosted: Fri Apr 06, 2012 7:43 am 
Offline
Senior Newbie

Joined: Fri Mar 09, 2012 1:11 pm
Posts: 5
Try using this command:
apt-get autoremove

Make sure none of the packages are needed before you press Y though


Top
   
PostPosted: Fri Apr 06, 2012 8:26 pm 
Offline
Newbie

Joined: Tue Mar 20, 2012 5:13 pm
Posts: 3
Location: Tokyo, Japan
Hi,

ollietrex wrote:
There are a number of similar services running from init.d which I don't really know what they are.

Does any one know which services can be stopped just to remove some memory footprint. Or is it a very bad idea to start doing this?


well, post a list of your running services (best: output of "ps axuf") so someone can have a look :)


Top
   
 Post subject:
PostPosted: Fri Apr 13, 2012 3:15 pm 
Offline
Junior Member

Joined: Fri Jan 02, 2009 9:11 am
Posts: 36
My web server has the following output.

Code:

USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root         2  0.0  0.0      0     0 ?        S    Mar28   0:00 [kthreadd]
root         3  0.0  0.0      0     0 ?        S    Mar28   0:00  \_ [ksoftirqd/0]
root         4  0.0  0.0      0     0 ?        S    Mar28   0:21  \_ [kworker/0:0]
root         5  0.0  0.0      0     0 ?        S    Mar28   0:00  \_ [kworker/u:0]
root         6  0.0  0.0      0     0 ?        S    Mar28   0:00  \_ [migration/0]
root         7  0.0  0.0      0     0 ?        S    Mar28   0:00  \_ [migration/1]
root         8  0.0  0.0      0     0 ?        S    Mar28   0:00  \_ [kworker/1:0]
root         9  0.0  0.0      0     0 ?        S    Mar28   0:00  \_ [ksoftirqd/1]
root        10  0.0  0.0      0     0 ?        S    Mar28   0:00  \_ [migration/2]
root        11  0.0  0.0      0     0 ?        S    Mar28   0:00  \_ [kworker/2:0]
root        12  0.0  0.0      0     0 ?        S    Mar28   0:00  \_ [ksoftirqd/2]
root        13  0.0  0.0      0     0 ?        S    Mar28   0:00  \_ [migration/3]
root        14  0.0  0.0      0     0 ?        S    Mar28   0:00  \_ [kworker/3:0]
root        15  0.0  0.0      0     0 ?        S    Mar28   0:00  \_ [ksoftirqd/3]
root        16  0.0  0.0      0     0 ?        S<   Mar28   0:00  \_ [cpuset]
root        17  0.0  0.0      0     0 ?        S<   Mar28   0:00  \_ [khelper]
root        18  0.0  0.0      0     0 ?        S    Mar28   0:00  \_ [kworker/u:1]
root        22  0.0  0.0      0     0 ?        S    Mar28   0:00  \_ [xenwatch]
root        23  0.0  0.0      0     0 ?        S    Mar28   0:00  \_ [xenbus]
root       149  0.0  0.0      0     0 ?        S    Mar28   0:06  \_ [sync_supers]
root       151  0.0  0.0      0     0 ?        S    Mar28   0:00  \_ [bdi-default]
root       153  0.0  0.0      0     0 ?        S<   Mar28   0:00  \_ [kblockd]
root       163  0.0  0.0      0     0 ?        S<   Mar28   0:00  \_ [md]
root       247  0.0  0.0      0     0 ?        S<   Mar28   0:00  \_ [rpciod]
root       249  0.0  0.0      0     0 ?        S    Mar28   0:29  \_ [kworker/0:1]
root       280  0.0  0.0      0     0 ?        S    Mar28   0:00  \_ [kswapd0]
root       281  0.0  0.0      0     0 ?        SN   Mar28   0:00  \_ [ksmd]
root       282  0.0  0.0      0     0 ?        S    Mar28   0:00  \_ [fsnotify_mark]
root       286  0.0  0.0      0     0 ?        S    Mar28   0:00  \_ [ecryptfs-kthrea]
root       288  0.0  0.0      0     0 ?        S<   Mar28   0:00  \_ [nfsiod]
root       291  0.0  0.0      0     0 ?        S    Mar28   0:00  \_ [jfsIO]
root       292  0.0  0.0      0     0 ?        S    Mar28   0:00  \_ [jfsCommit]
root       293  0.0  0.0      0     0 ?        S    Mar28   0:00  \_ [jfsCommit]
root       294  0.0  0.0      0     0 ?        S    Mar28   0:00  \_ [jfsCommit]
root       295  0.0  0.0      0     0 ?        S    Mar28   0:00  \_ [jfsCommit]
root       296  0.0  0.0      0     0 ?        S    Mar28   0:00  \_ [jfsSync]
root       297  0.0  0.0      0     0 ?        S<   Mar28   0:00  \_ [xfs_mru_cache]
root       298  0.0  0.0      0     0 ?        S<   Mar28   0:00  \_ [xfslogd]
root       299  0.0  0.0      0     0 ?        S<   Mar28   0:00  \_ [xfsdatad]
root       300  0.0  0.0      0     0 ?        S<   Mar28   0:00  \_ [xfsconvertd]
root       301  0.0  0.0      0     0 ?        S<   Mar28   0:00  \_ [glock_workqueue]
root       302  0.0  0.0      0     0 ?        S<   Mar28   0:00  \_ [delete_workqueu]
root       303  0.0  0.0      0     0 ?        S<   Mar28   0:00  \_ [gfs_recovery]
root       304  0.0  0.0      0     0 ?        S<   Mar28   0:00  \_ [crypto]
root       866  0.0  0.0      0     0 ?        S    Mar28   0:00  \_ [khvcd]
root       979  0.0  0.0      0     0 ?        S<   Mar28   0:00  \_ [kpsmoused]
root       980  0.0  0.0      0     0 ?        S    Mar28   0:46  \_ [kworker/2:1]
root      1008  0.0  0.0      0     0 ?        S    Mar28   0:07  \_ [kjournald]
root      1016  0.0  0.0      0     0 ?        S    Mar28   0:43  \_ [kworker/1:1]
root      1033  0.0  0.0      0     0 ?        S    Mar28   0:42  \_ [kworker/3:1]
root      2235  0.0  0.0      0     0 ?        S    Mar28   0:09  \_ [flush-202:0]
root         1  0.0  0.2   2732  1428 ?        Ss   Mar28   0:01 /sbin/init
root      1034  0.0  0.0   2364   472 ?        S    Mar28   0:00 upstart-udev-bridge --daemon
root      1036  0.0  0.0   2232   312 ?        S<s  Mar28   0:00 udevd --daemon
root      1078  0.0  0.0   2228   316 ?        S<   Mar28   0:00  \_ udevd --daemon
root      1131  0.0  0.0   2228   304 ?        S<   Mar28   0:00  \_ udevd --daemon
syslog    2029  0.0  0.1  29472   988 ?        Sl   Mar28   0:09 rsyslogd -c4
root      2063  0.0  0.1   2424   680 ?        Ss   Mar28   0:02 cron
root      2112  0.0  0.0   1836   480 hvc0     Ss+  Mar28   0:00 /sbin/getty -8 38400 hvc0
root      6049  0.0  0.1   3596   700 ?        Ss   Mar28   0:00 /usr/sbin/ntpd
ntpd      6050  0.0  0.1   3492   748 ?        S    Mar28   0:04  \_ /usr/sbin/ntpd
root     17516  0.0  0.1   4860   688 ?        Ss   20:08   0:00 nginx: master process /usr/sbin/nginx
www-data 17517  0.2  0.5   5844  2900 ?        S    20:08   0:00  \_ nginx: worker process


Top
   
 Post subject:
PostPosted: Fri Apr 13, 2012 3:20 pm 
Offline
Junior Member

Joined: Fri Jan 02, 2009 9:11 am
Posts: 36
My database server:

Code:
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root         2  0.0  0.0      0     0 ?        S    Mar28   0:00 [kthreadd]
root         3  0.0  0.0      0     0 ?        S    Mar28   0:04  \_ [ksoftirqd/0]
root         4  0.0  0.0      0     0 ?        S    Mar28   0:13  \_ [kworker/0:0]
root         5  0.0  0.0      0     0 ?        S    Mar28   0:00  \_ [kworker/u:0]
root         6  0.0  0.0      0     0 ?        S    Mar28   0:00  \_ [migration/0]
root         7  0.0  0.0      0     0 ?        S    Mar28   0:00  \_ [migration/1]
root         8  0.0  0.0      0     0 ?        S    Mar28   0:00  \_ [kworker/1:0]
root         9  0.0  0.0      0     0 ?        S    Mar28   0:01  \_ [ksoftirqd/1]
root        10  0.0  0.0      0     0 ?        S    Mar28   0:00  \_ [migration/2]
root        11  0.0  0.0      0     0 ?        S    Mar28   0:00  \_ [kworker/2:0]
root        12  0.0  0.0      0     0 ?        S    Mar28   0:18  \_ [ksoftirqd/2]
root        13  0.0  0.0      0     0 ?        S    Mar28   0:00  \_ [migration/3]
root        14  0.0  0.0      0     0 ?        S    Mar28   0:00  \_ [kworker/3:0]
root        15  0.0  0.0      0     0 ?        S    Mar28   0:02  \_ [ksoftirqd/3]
root        16  0.0  0.0      0     0 ?        S<   Mar28   0:00  \_ [cpuset]
root        17  0.0  0.0      0     0 ?        S<   Mar28   0:00  \_ [khelper]
root        18  0.0  0.0      0     0 ?        S    Mar28   0:00  \_ [kworker/u:1]
root        22  0.0  0.0      0     0 ?        S    Mar28   0:00  \_ [xenwatch]
root        23  0.0  0.0      0     0 ?        S    Mar28   0:00  \_ [xenbus]
root       149  0.0  0.0      0     0 ?        S    Mar28   0:05  \_ [sync_supers]
root       151  0.0  0.0      0     0 ?        S    Mar28   0:00  \_ [bdi-default]
root       153  0.0  0.0      0     0 ?        S<   Mar28   0:00  \_ [kblockd]
root       163  0.0  0.0      0     0 ?        S<   Mar28   0:00  \_ [md]
root       247  0.0  0.0      0     0 ?        S<   Mar28   0:00  \_ [rpciod]
root       248  0.0  0.0      0     0 ?        S    Mar28   0:40  \_ [kworker/2:1]
root       280  0.0  0.0      0     0 ?        S    Mar28   0:00  \_ [kswapd0]
root       281  0.0  0.0      0     0 ?        SN   Mar28   0:00  \_ [ksmd]
root       282  0.0  0.0      0     0 ?        S    Mar28   0:00  \_ [fsnotify_mark]
root       286  0.0  0.0      0     0 ?        S    Mar28   0:00  \_ [ecryptfs-kthrea]
root       288  0.0  0.0      0     0 ?        S<   Mar28   0:00  \_ [nfsiod]
root       291  0.0  0.0      0     0 ?        S    Mar28   0:00  \_ [jfsIO]
root       292  0.0  0.0      0     0 ?        S    Mar28   0:00  \_ [jfsCommit]
root       293  0.0  0.0      0     0 ?        S    Mar28   0:00  \_ [jfsCommit]
root       294  0.0  0.0      0     0 ?        S    Mar28   0:00  \_ [jfsCommit]
root       295  0.0  0.0      0     0 ?        S    Mar28   0:00  \_ [jfsCommit]
root       296  0.0  0.0      0     0 ?        S    Mar28   0:00  \_ [jfsSync]
root       297  0.0  0.0      0     0 ?        S<   Mar28   0:00  \_ [xfs_mru_cache]
root       298  0.0  0.0      0     0 ?        S<   Mar28   0:00  \_ [xfslogd]
root       299  0.0  0.0      0     0 ?        S<   Mar28   0:00  \_ [xfsdatad]
root       300  0.0  0.0      0     0 ?        S<   Mar28   0:00  \_ [xfsconvertd]
root       301  0.0  0.0      0     0 ?        S<   Mar28   0:00  \_ [glock_workqueue]
root       302  0.0  0.0      0     0 ?        S<   Mar28   0:00  \_ [delete_workqueu]
root       303  0.0  0.0      0     0 ?        S<   Mar28   0:00  \_ [gfs_recovery]
root       304  0.0  0.0      0     0 ?        S<   Mar28   0:00  \_ [crypto]
root       866  0.0  0.0      0     0 ?        S    Mar28   0:00  \_ [khvcd]
root       965  0.0  0.0      0     0 ?        S    Mar28   0:22  \_ [kworker/0:1]
root       981  0.0  0.0      0     0 ?        S<   Mar28   0:00  \_ [kpsmoused]
root      1004  0.0  0.0      0     0 ?        S    Mar28   0:40  \_ [kworker/1:1]
root      1009  0.0  0.0      0     0 ?        S    Mar28   0:00  \_ [kjournald]
root      1047  0.0  0.0      0     0 ?        S    Mar28   0:41  \_ [kworker/3:1]
root     10495  0.0  0.0      0     0 ?        S    20:08   0:00  \_ [flush-202:0]
root         1  0.0  0.3   3212  1724 ?        Ss   Mar28   0:00 /sbin/init
root      1045  0.0  0.1   2660   608 ?        S    Mar28   0:00 upstart-udev-bridge --daemon
root      1049  0.0  0.1   2640  1012 ?        Ss   Mar28   0:00 udevd --daemon
root      1705  0.0  0.1   2636   656 ?        S    Mar28   0:00  \_ udevd --daemon
root      1710  0.0  0.1   2636   648 ?        S    Mar28   0:00  \_ udevd --daemon
root      1923  0.0  0.0   2660   344 ?        S    Mar28   0:00 upstart-socket-bridge --daemon
syslog    2040  0.0  0.2  29088  1376 ?        Sl   Mar28   1:51 rsyslogd -c5
102       2047  0.0  0.1   3576   920 ?        Ss   Mar28   0:00 dbus-daemon --system --fork --activation=upstart
daemon    2078  0.0  0.0   2292   348 ?        Ss   Mar28   0:00 atd
root      2079  0.0  0.1   2440   824 ?        Ss   Mar28   0:01 cron
root      2138  0.0  0.1   1980   532 hvc0     Ss+  Mar28   0:00 /sbin/getty -8 38400 hvc0
ntp       2316  0.0  0.2   3668  1440 ?        Ss   Mar28   1:21 /usr/sbin/ntpd -p /var/run/ntpd.pid -g -u 105:110
root      3945  0.0  0.4   6436  2324 ?        Ss   Mar28   0:02
mysql     8960  0.0  3.6 122984 18596 ?        Ssl  Mar28   4:12 /usr/sbin/mysqld




Top
   
 Post subject:
PostPosted: Fri Apr 13, 2012 5:27 pm 
Offline
Senior Member

Joined: Sun Mar 07, 2010 7:47 pm
Posts: 1970
Website: http://www.rwky.net
Location: Earth
The only one I'd consider disabling is atd on your database server. I personally never use it.

_________________
Paid support
How to ask for help
1. Give details of your problem
2. Post any errors
3. Post relevant logs.
4. Don't hide details i.e. your domain, it just makes things harder
5. Be polite or you'll be eaten by a grue


Top
   
 Post subject:
PostPosted: Fri Apr 13, 2012 8:23 pm 
Offline
Newbie

Joined: Tue Mar 20, 2012 5:13 pm
Posts: 3
Location: Tokyo, Japan
Hi,

that's already looking very good. With the exception of "atd", there are no unnecessary services running (everything in square brackets, like "[khelper]" is a kernel task, that you can't stop or start manually). And even "atd" (it's like a complement to cron; used to run one time tasks at some point in the future) sometimes has its uses and probably uses nearly no resources, so you may as well keep it running.

However, this part is strange:
Code:
root      3945  0.0  0.4   6436  2324 ?        Ss   Mar28   0:02


A process without a name, running as root? That looks quite suspicious. Can you confirm that this isn't simply a display error?


Top
   
 Post subject:
PostPosted: Mon Apr 16, 2012 5:59 pm 
Offline
Junior Member

Joined: Fri Jan 02, 2009 9:11 am
Posts: 36
I removed some stuff which I did not want people to see which I know needs to be running :D

Good spot :D


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group