You are not logged in.

#1 2013-06-21 09:57:31

Darkzom
Member
Registered: 2011-03-15
Posts: 28

Less free space after every boot (real tight system, 20 Mb free space)

Hi all,

I am posting this in the newbie corner but I do not know if it should fit in Desktop Enviroments subforum, anyway I will explain as best as I can and if I posted in the wrong subsection please move the topic to the appropiate one.

A friend of mine wanted to revive its Asus eeepc surf 2g (the one with soldered SSD chip) as he was not using it anymore due to the pain in the ass it was to run the Win XP it came pre-installed with and the linux distro also pre-installed is not really user friendly. The main proble is that it only has 2 gigs of HD, After checking and testing lots of distros all of them require between 2.5g and 4.5g of minimum free space to install so I decided I would give a go to build Arch from scratch with a lightweight DE and basic but fully-featured set of packages. (I have been an arch user since 4 years and really happy)

He is not a very techy person (very very little computer knowledge and does not figures out anything by his own) so anything complicated or really out of the standard would not work, system requires fully featured desktop, media players and codecs (audio and video), automounting of USBs, compressed archive manager, standard web browser with flash, etc... the most you can fit in 2G, which believe me is real tight. (I know you could just use a USB to install or SD Card but the goal was to achieve this with 0 extra cost)

Tested with LXDE but I had doubts it would be perfect for my friend and then I tried with XFCE which is a little more overweight than LXDE but seems more like the standard windows desktop we all used, more or less I installed;

LXDM
XFCE with everything required to automount USB drives (ntfs included) and save session on logout unchecked
networkmanager
VLC with full set of multimedia codecs to be used as music and video player
Image viewer from xfce project
Firefox with Flash player (set cache manually to 0 Mb)
lightweight compressed archives manager and pdf viewer (the ones with less space requirements I could find and working perfectly)
Fully cleaned pkg cache with "pacman -Scc" while installing everything

After all I managed to make everything fit into this little space with 20 Mb remaining disk space. I am sure this can be achieved with less as I am no expert but I believe it is a really good figure. If you have some tips and tricks to release some more space please feel free to let me know!! (maybe if more space can be released there could be a way to make abiword and some more packages fit). Of course this is a "closed" install, no package updates possible after I give it to him.

Too long intro but I wanted to make you understand the importance of space, now it comes the question:

Why it happens that whenever I boot I see less disk space? like 1-1.5 Mb less each time, now I am sitting at 16 Mb after some reboots just by testing rebooting 4 times straight to see if it happened always. What am I missing?

By the way, it is amazing how a customized and lightweight arch install can be so responsive in this little bastard! celeron, 2gigs HD and 512 Ram!!!

Thanks in advance for reading such a long post and for your answers!!!

Darkzom

Last edited by Darkzom (2013-06-21 09:59:29)

Offline

#2 2013-06-21 10:19:52

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Less free space after every boot (real tight system, 20 Mb free space)

https://wiki.archlinux.org/index.php/Li … y_programs ?
Use e.g. ncdu to find where the free space disappears - maybe it's creating some logs in /var/log ? I don't use DEs, so I don't know where are they dumping all the errors - xsession-errors or something?

Offline

#3 2013-06-21 10:46:53

Darkzom
Member
Registered: 2011-03-15
Posts: 28

Re: Less free space after every boot (real tight system, 20 Mb free space)

Nice, thanks! Good idea! I will try that as soon as I get home. Did not thought of log files increasing disk usage as it is an issue not existing in standard systems.

Found this too:

Journal

systemd has its own logging system called the journal; therefore, running a syslog daemon is no longer required. To read the log, use:
# journalctl
By default (when Storage= is set to auto in /etc/systemd/journald.conf), the journal writes to /var/log/journal/. The directory /var/log/journal/ is a part of the systemd package. If you or some program delete that directory, systemd will not recreate it automatically; however, it will be recreated during the next update of the systemd package. Until then, logs will be written to /run/systemd/journal, and logs will be lost on reboot.

Is there a way to turn completely off all logs? I know it is not really a wise move but in this case I guess I could give it a try, removing the whole /var/log/ could cause any harm?

Offline

#4 2013-06-21 10:51:54

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,456
Website

Re: Less free space after every boot (real tight system, 20 Mb free space)

I was going to suggest journal logs as a likely issue.  While you've managed to squeeze arch on there, it doesn't sounds like it will be viable in the long term.

Have you tried slitaz?  That will give you essentially everything you have now, but with a *lot* more breathing room.  No pacman of course, but tazpkg is the second best package manager IMO.

Last edited by Trilby (2013-06-21 10:54:21)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#5 2013-06-21 10:55:09

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Less free space after every boot (real tight system, 20 Mb free space)

slitaz uses busybox and Xvesa instead of coreutils and full Xserver, so whether it's a viable option depends on the user's needs and setup.

slitaz hasn't been updated in over a year.

Offline

#6 2013-06-21 11:18:16

Darkzom
Member
Registered: 2011-03-15
Posts: 28

Re: Less free space after every boot (real tight system, 20 Mb free space)

Hmmm, really interesting this Slitaz distro, didn't knew about it. I tried puppy as tiny distro but was not fully satisfied for my friend's usage, also karol seems to be right, no updates over the last year according to the webpage and too customized, however it is truly amazing the sizes those distros achieve...

Also busybox, openbox, lxde... tried distros with those DE's and I would put them if it was my computer but the main problem is the target user...

found also this topic:

https://bbs.archlinux.org/viewtopic.php?id=164067

They talk about a /var/log/ that's out of control but it is interesting.

Does anybody know if I would have any issues by removing /var/log/ completely and creating an empty /var/log file? No logs would be created at all if I am not mistaken...

Offline

#7 2013-06-21 11:27:42

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Less free space after every boot (real tight system, 20 Mb free space)

There's a bug related to systemd's journal not respecting the set max size.
It's by far the biggest component of my /var/log

$ du -sh /var/log
40M	/var/log
$ du -sh /var/log/journal/
34M	/var/log/journal/

Logs are meant to help fix problems, so they're not exactly useless.


Edit: Did you already removed extra locales and other cruft from that tiny installation?

Last edited by karol (2013-06-21 11:29:46)

Offline

#8 2013-06-21 12:00:34

Darkzom
Member
Registered: 2011-03-15
Posts: 28

Re: Less free space after every boot (real tight system, 20 Mb free space)

Yes I started yesterday to remove all unnecessary stuff from locales and other places, not finished though, however if the logs start to increase no matter what I remove it would be filled again sad

I know logs are great tools but considering you can always remove /var/log file and try to recreate the issue to check the log as it would re-populate the /var/log/ dir, maybe it is a good idea to remove logs completely if it does not harm the system directly.

Offline

#9 2013-06-21 12:19:13

morrow
Member
Registered: 2012-10-16
Posts: 3

Re: Less free space after every boot (real tight system, 20 Mb free space)

Assuming that you haven't installed a standalone logging daemon, you can tell systemd-journald to only store logs in RAM by setting

Storage = volatile

in journald.conf (see journald.conf(5) for more details).

As for the unwanted locales, try using localepurge.

A slightly more risky way of gaining free space would be to use btrfs with transparent compression, which would probably give you an extra 150-250 MB to use at the cost of somewhat increased CPU usage and potentially some bugs.

Offline

#10 2013-06-21 12:41:12

progandy
Member
Registered: 2012-05-17
Posts: 5,307

Re: Less free space after every boot (real tight system, 20 Mb free space)

If arch is too big, you might want to try alpine linux which has a smaller system size.


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' | alias ENGLISH='LANG=C.UTF-8 ' |

Offline

#11 2013-06-21 14:12:09

Darkzom
Member
Registered: 2011-03-15
Posts: 28

Re: Less free space after every boot (real tight system, 20 Mb free space)

Thanks for the replies! smile

@morrow: Regarding systemd logs in RAM it is a good idea but I am tempted to try and go with no logs at all. Thanks for the localepurge package! I will use it as I am sure it is removing more data than I would know of manually.

@progandy: Alpine linux looks good really, did not knew about it, I will try from USB but first I want to limit logs and remove locales and stuff and see if it behaves good.

Has anybody tried removing logs completely? (by deleting "/var/log/" and creating an empty file "/var/log" or other ways)

Offline

#12 2013-06-21 15:00:21

berbae
Member
From: France
Registered: 2007-02-12
Posts: 1,304

Re: Less free space after every boot (real tight system, 20 Mb free space)

Storage=none
in /etc/systemd/journald.conf
"turns off all storage, all log data received will be dropped"
and with:
ForwardToConsole=yes
you still can see the log messages on the console.

Offline

#13 2013-06-22 14:03:51

Darkzom
Member
Registered: 2011-03-15
Posts: 28

Re: Less free space after every boot (real tight system, 20 Mb free space)

Thanks berbae! Did it and it is working fine.

I had 60Mb in journald logs, only 2 days of use!

Offline

Board footer

Powered by FluxBB