SEARCH

Enter your search query in the box above ^, or use the forum search tool.

You are not logged in.

#1 2012-08-05 15:40:12

J93
Member
Registered: 2012-06-30
Posts: 28

[Solved] Reducing startup time and memory usage..?

Hi all,

I am trying to get my ram usage to a minimal when Idle on the computer (No programs open);

I've got it to about 100MB (Did have it at about 60MB but it's risen since?);

Is there anytrhing I can do to reduce it even further?

## Openbox autostart.sh
## ====================
## When you login to your CrunchBang Openbox session, this autostart script 
## will be executed to set-up your environment and launch any applications
## you want to run at startup.
##
## More information about this can be found at:
## http://openbox.org/wiki/Help:Autostart
##
## If you do something cool with your autostart script and you think others
## could benefit from your hack, please consider sharing it at:
## http://crunchbanglinux.org/forums/
##
## Have fun! :)

## Start session manager
##lxsession &

## Start Thunar Daemon
thunar --daemon &

## Set desktop wallpaper
nitrogen --restore &

## Launch panel
tint2 &

## Start xscreensaver
##xscreensaver -no-splash &

## Start Conky after a slight delay
(sleep 3s && conky -q) &

## Start volumeicon after a slight delay
(sleep 3s && volumeicon) &

## cb-fortune - have Statler say a little adage
#(sleep 120s && cb-fortune) &

That is my autostart script for Openbox.

Can i reduce it even more?

I also use conky:

##############################################
# Settings
##############################################
use_xft yes
xftfont Sans-serif:size=8
update_interval 1.0
total_run_times 0
own_window yes
own_window_transparent yes
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
double_buffer yes
minimum_size 230 200
maximum_size 230 200
maximum_width 230
draw_shades yes
draw_graph_borders yes
default_color white
default_shade_color black
alignment top_left
gap_x 12
gap_y 12
no_buffers yes
cpu_avg_samples 2
default_bar_size 40 6

##############################################
#  Output
##############################################
TEXT
${font sans-serif:bold:size=8}${time %A, %d %B %Y} ${alignr}${time %H:%M}
# SYSTEM INFO
System ${hr 2}
${font sans-serif:normal:size=8}Uptime:$alignr$uptime
RAM: $mem/$memmax $alignr$memperc% ${membar 6, 40}
Swap:$swap/$swapmax $alignr$swapperc% ${swapbar 6, 40}
Disk: ${fs_used /}/${fs_size /} $alignr${fs_used_perc /}% ${fs_bar 6, 40 /}
CPU usage: $alignr${cpu cpu0}% ${cpubar 6, 40}

#NETWORK
${font sans-serif:bold:size=8}Network ${hr 2}
${font sans-serif:normal:size=8}U: ${upspeed wlan0}kb/s - T: ${totalup wlan0}$alignr${upspeedgraph wlan0 6,40 0000ff ff0000}
D: ${downspeed wlan0}kb/s - T: ${totaldown wlan0}$alignr${downspeedgraph wlan0 6,40 ff0000 0000ff}

#MUSIC
${font sans-serif:bold:size=8}${if_running vlc}Playing ${hr 2}
${scroll 50 6${exec ~/.conkyVlc.py --datatype=TI} - ${exec ~/.conkyVlc.py --datatype=AR}}
Position:  ${exec ~/.conkyVlc.py --datatype=PT}/${exec ~/.conkyVlc.py --datatype=LE}$alignr${execibar 1 ~/.conkyVlc.py --datatype=PP}${endif}

I've got minimal info (Atleast I think I do).

I'm simply asking if I can reduce my memory usage by adjust or Uninstalling unneeded things.

Thanks,

J93.

Last edited by J93 (2012-08-05 21:23:18)

Offline

Help fund CrunchBang, donate to the project!

#2 2012-08-05 15:58:47

rhowaldt
#!*$%:)
Registered: 2011-03-09
Posts: 4,396

Re: [Solved] Reducing startup time and memory usage..?

you could stop using Thunar and start using a CLI filemanager like simply bash or midnight commander (which is two-paned) instead.
you could use feh to set your wallpaper instead of nitrogen.

then, there is loads of system-stuff that isn't started through your Openbox autostart, which could do with some cleaning up as well. start up your computer, then do

ps aux

in a terminal to get a list of your running apps. if you, for example, do not have a printer connected, and cupsd is running, you could just disable that. same with saned, which runs for scanners. there are a couple more examples but this is all from the top of my head. you could post the output of that command here so we can take a look.

Offline

#3 2012-08-05 16:05:40

J93
Member
Registered: 2012-06-30
Posts: 28

Re: [Solved] Reducing startup time and memory usage..?

rhowaldt wrote:

----

Here is the output:

USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root         1  0.0  0.0   2036   704 ?        Ss   16:30   0:00 init [2]         
root         2  0.0  0.0      0     0 ?        S    16:30   0:00 [kthreadd]
root         3  0.0  0.0      0     0 ?        S    16:30   0:00 [migration/0]
root         4  0.0  0.0      0     0 ?        S    16:30   0:00 [ksoftirqd/0]
root         5  0.0  0.0      0     0 ?        S    16:30   0:00 [watchdog/0]
root         6  0.0  0.0      0     0 ?        S    16:30   0:00 [events/0]
root         7  0.0  0.0      0     0 ?        S    16:30   0:00 [cpuset]
root         8  0.0  0.0      0     0 ?        S    16:30   0:00 [khelper]
root         9  0.0  0.0      0     0 ?        S    16:30   0:00 [netns]
root        10  0.0  0.0      0     0 ?        S    16:30   0:00 [async/mgr]
root        11  0.0  0.0      0     0 ?        S    16:30   0:00 [pm]
root        12  0.0  0.0      0     0 ?        S    16:30   0:00 [sync_supers]
root        13  0.0  0.0      0     0 ?        S    16:30   0:00 [bdi-default]
root        14  0.0  0.0      0     0 ?        S    16:30   0:00 [kintegrityd/0]
root        15  0.0  0.0      0     0 ?        S    16:30   0:00 [kblockd/0]
root        16  0.0  0.0      0     0 ?        S    16:30   0:00 [kacpid]
root        17  0.0  0.0      0     0 ?        S    16:30   0:00 [kacpi_notify]
root        18  0.0  0.0      0     0 ?        S    16:30   0:00 [kacpi_hotplug]
root        19  0.0  0.0      0     0 ?        S    16:30   0:00 [kseriod]
root        20  0.1  0.0      0     0 ?        S    16:30   0:03 [kondemand/0]
root        22  0.0  0.0      0     0 ?        S    16:30   0:00 [khungtaskd]
root        23  0.0  0.0      0     0 ?        S    16:30   0:00 [kswapd0]
root        24  0.0  0.0      0     0 ?        SN   16:30   0:00 [ksmd]
root        25  0.0  0.0      0     0 ?        S    16:30   0:00 [aio/0]
root        26  0.0  0.0      0     0 ?        S    16:30   0:00 [crypto/0]
root       188  0.0  0.0      0     0 ?        S    16:30   0:00 [ksuspend_usbd]
root       189  0.0  0.0      0     0 ?        S    16:30   0:00 [khubd]
root       190  0.0  0.0      0     0 ?        S    16:30   0:00 [ata/0]
root       191  0.0  0.0      0     0 ?        S    16:30   0:00 [ata_aux]
root       192  0.0  0.0      0     0 ?        S    16:30   0:00 [scsi_eh_0]
root       193  0.0  0.0      0     0 ?        S    16:30   0:00 [scsi_eh_1]
root       195  0.0  0.0      0     0 ?        S    16:30   0:00 [scsi_eh_2]
root       196  0.0  0.0      0     0 ?        S    16:30   0:00 [scsi_eh_3]
root       240  0.0  0.0      0     0 ?        S    16:30   0:00 [jbd2/sda1-8]
root       241  0.0  0.0      0     0 ?        S    16:30   0:00 [ext4-dio-unwrit]
root       289  0.0  0.0   2428   956 ?        S<s  16:30   0:00 udevd --daemon
root       381  0.0  0.0   2424   812 ?        S<   16:30   0:00 udevd --daemon
root       398  0.0  0.0   2424   812 ?        S<   16:30   0:00 udevd --daemon
root       478  0.0  0.0      0     0 ?        S    16:30   0:00 [kpsmoused]
root       490  0.0  0.0      0     0 ?        S    16:30   0:00 [flush-8:0]
root       517  0.0  0.0      0     0 ?        S    16:30   0:00 [phy0]
root       685  0.0  0.0      0     0 ?        S    16:30   0:00 [firewire_sbp2]
root       944  0.0  0.1  27452  1596 ?        Sl   16:30   0:00 /usr/sbin/rsyslogd -c4
102        961  0.1  0.1   2844  1180 ?        Ss   16:30   0:01 /usr/bin/dbus-daemon --sys
106        980  0.0  0.4  14400  4016 ?        Ssl  16:30   0:00 /usr/sbin/hald
root       981  0.0  0.1   3456  1236 ?        S    16:30   0:00 hald-runner
avahi      995  0.0  0.1   2844  1496 ?        S    16:30   0:00 avahi-daemon: running [cru
avahi      996  0.0  0.0   2844   488 ?        S    16:30   0:00 avahi-daemon: chroot helpe
root      1028  0.0  0.1   3524  1188 ?        S    16:30   0:00 hald-addon-input: Listenin
root      1030  0.0  0.1   3524  1168 ?        S    16:30   0:00 /usr/lib/hal/hald-addon-rf
root      1031  0.0  0.1   3524  1164 ?        S    16:30   0:00 /usr/lib/hal/hald-addon-le
root      1041  0.0  0.1   3528  1184 ?        S    16:30   0:00 hald-addon-storage: pollin
106       1045  0.0  0.1   3336  1152 ?        S    16:30   0:00 /usr/lib/hal/hald-addon-ac
root      1075  0.0  0.0   3816   940 ?        Ss   16:30   0:00 /usr/sbin/cron
root      1081  0.0  0.1  16204  1728 ?        Ss   16:30   0:00 /usr/sbin/gdm
root      1089  0.0  0.3  16516  3348 ?        S    16:30   0:00 /usr/sbin/gdm
root      1097  4.2  3.7  47396 36144 tty7     Ss+  16:30   1:15 /usr/bin/X :0 -audit 0 -au
root      1138  0.0  0.2   6712  2604 ?        Ss   16:30   0:00 /usr/sbin/cupsd -C /etc/cu
root      1167  0.0  0.0      0     0 ?        S    16:30   0:00 [kconservative/0]
ntp       1216  0.0  0.2   4692  1944 ?        Ss   16:30   0:00 /usr/sbin/ntpd -p /var/run
root      1241  0.3  0.7  22212  6848 ?        S    16:30   0:05 /usr/bin/python -O /usr/sh
root      1260  0.0  0.0   1712   564 tty1     Ss+  16:30   0:00 /sbin/getty 38400 tty1
root      1261  0.0  0.0   1712   564 tty2     Ss+  16:30   0:00 /sbin/getty 38400 tty2
root      1262  0.0  0.0   1712   564 tty3     Ss+  16:30   0:00 /sbin/getty 38400 tty3
root      1263  0.0  0.0   1712   568 tty4     Ss+  16:30   0:00 /sbin/getty 38400 tty4
root      1264  0.0  0.0   1712   564 tty5     Ss+  16:30   0:00 /sbin/getty 38400 tty5
root      1265  0.0  0.0   1712   568 tty6     Ss+  16:30   0:00 /sbin/getty 38400 tty6
root      1267  0.1  0.7  12712  7056 ?        S    16:30   0:01 /usr/bin/python -O /usr/sh
root      1313  0.0  0.3  17408  2944 ?        Sl   16:30   0:00 /usr/sbin/console-kit-daem
jamie     1385  0.0  0.7  13020  7128 ?        Ss   16:30   0:01 /usr/bin/openbox --startup
jamie     1428  0.0  0.0   3240   348 ?        Ss   16:30   0:00 /usr/bin/ssh-agent /usr/bi
jamie     1431  0.0  0.0   3292   712 ?        S    16:30   0:00 /usr/bin/dbus-launch --exi
jamie     1437  0.2  0.1   2688   972 ?        Ss   16:30   0:03 /usr/bin/dbus-daemon --for
jamie     1448  0.0  1.4  66868 14248 ?        Sl   16:30   0:01 thunar --daemon
jamie     1450  0.0  0.5  12124  5524 ?        S    16:30   0:00 tint2
jamie     1451  0.6  0.4  64420  4392 ?        Sl   16:30   0:11 conky -q
jamie     1452  0.0  0.8  17468  7800 ?        S    16:30   0:00 volumeicon
jamie     1457  0.0  0.1   3116  1268 ?        S    16:30   0:00 /usr/lib/gamin/gam_server
jamie     1459  0.0  1.4  30392 14380 ?        S    16:30   0:00 python /usr/bin/system-con
jamie     1460  0.0  1.7  32516 17000 ?        S    16:30   0:00 /usr/bin/python -O /usr/sh
root      1464  0.0  0.1   4764  1060 ?        Ss   16:30   0:00 wpa_supplicant -B -i wlan0
root      1503  0.0  0.0   2336   804 ?        Ss   16:30   0:00 /sbin/dhclient -v -cf /var
jamie     1515  0.0  0.2   7040  2240 ?        S    16:31   0:00 /usr/lib/gvfs/gvfsd
jamie     1520  0.0  0.2  30176  2464 ?        Ssl  16:31   0:00 /usr/lib/gvfs//gvfs-fuse-d
jamie     1558  0.0  0.2   6228  2824 ?        S    16:31   0:00 /usr/lib/libgconf2-4/gconf
jamie     1616  0.5  3.2  89516 31276 ?        S    16:32   0:08 pidgin
jamie     2235  5.0  3.2  98108 31048 ?        SLl  16:46   0:41 vlc
jamie     3604  0.0  0.3   7656  3124 ?        S    16:52   0:00 /usr/lib/gvfs/gvfs-gdu-vol
root      3606  0.0  0.3  13496  2996 ?        Sl   16:52   0:00 /usr/lib/udisks/udisks-dae
root      3607  0.0  0.0   5092   772 ?        S    16:52   0:00 udisks-daemon: polling /de
jamie     3673  0.0  0.5  17064  5660 ?        S    16:52   0:00 /usr/lib/notify-osd/notify
jamie     5485 62.6 15.3 375104 148468 ?       Sl   16:59   0:05 /usr/lib/iceweasel/firefox
jamie     5502  7.1  2.5  54276 24428 ?        Sl   16:59   0:00 /usr/bin/python /usr/bin/t
jamie     5511  0.0  0.0   1904   696 ?        S    16:59   0:00 gnome-pty-helper
jamie     5512  3.6  0.3   5756  3052 pts/0    Ss   16:59   0:00 /bin/bash
jamie     5561  0.0  0.0   1752   512 ?        S    17:00   0:00 sh -c ~/.conkyVlc.py --dat
jamie     5562  0.0  0.4   9396  4356 ?        R    17:00   0:00 python2 /home/jamie/.conky
jamie     5563  0.0  0.1   3876  1048 pts/0    R+   17:00   0:00 ps aux

I do use a printer however not a scanner; So i will remove saned.

Offline

#4 2012-08-05 16:32:19

rhowaldt
#!*$%:)
Registered: 2011-03-09
Posts: 4,396

Re: [Solved] Reducing startup time and memory usage..?

from what i see, there is only a bunch of tiny things you can stop. for example, i stopped the firewire-module from loading because i don't have firewire on my laptop. also, you are using volumeicon, which is something i removed because, well, i don't need it. but these are really about shaving off some KBs from your RAM usage, nothing more. so the question is whether that is really useful.

the other thing you could try, as far as startup goes, is to monitor your startup using bootchart. then you can see if things are taking more time than they should. but this is territory where i don't quite know what i am talking about anymore.

you could also check your dmesg and see if there are errors or something in there. try and Google those, try and remove those errors so the bootup is speedier.

all this will not have a huge impact, imo. but it will help a bit.

Offline

#5 2012-08-05 16:37:01

J93
Member
Registered: 2012-06-30
Posts: 28

Re: [Solved] Reducing startup time and memory usage..?

rhowaldt wrote:

from what i see, there is only a bunch of tiny things you can stop. for example, i stopped the firewire-module from loading because i don't have firewire on my laptop. also, you are using volumeicon, which is something i removed because, well, i don't need it. but these are really about shaving off some KBs from your RAM usage, nothing more. so the question is whether that is really useful.

the other thing you could try, as far as startup goes, is to monitor your startup using bootchart. then you can see if things are taking more time than they should. but this is territory where i don't quite know what i am talking about anymore.

you could also check your dmesg and see if there are errors or something in there. try and Google those, try and remove those errors so the bootup is speedier.

all this will not have a huge impact, imo. but it will help a bit.

I've replaced nitrogen with feh already; Got my background to load on boot already.
Easily done.

I guess I can't reduce it much more as they are all low RAM usage.

Thank you for your help; How do i mark this as resolved?

Offline

#6 2012-08-05 18:21:32

rhowaldt
#!*$%:)
Registered: 2011-03-09
Posts: 4,396

Re: [Solved] Reducing startup time and memory usage..?

just edit your first post and add [Solved] to the title.
glad i could help!

Offline

Board footer

Powered by FluxBB

Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.

Debian Logo