Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 12-11-2004, 02:47 AM   #1
Registered: Jun 2004
Location: Michigan, USA
Distribution: Ubuntu
Posts: 77

Rep: Reputation: 15
optimize for size -- disk io & mem

I read a post on this site about the idea of optimizing the kernel and other large binaries for size (-Os) to reduce disk i/o. Has anyone had any success with this idea? I can see it maybe having performance improvements for huge apps like KDE.

My question is, would there be any reasonable memory improvement for this approach as well? I have a machine with limited memory at home (32-64MB) and I was considering compiling the kernel with -Os to reduce the size of the kernel image in memory (rather than -O3).

Is that a reasonable approach? Anyone every consider/try this?
Old 12-11-2004, 05:38 AM   #2
Senior Member
Registered: Oct 2003
Location: hopefully not here
Distribution: Gentoo
Posts: 2,038

Rep: Reputation: 51
while it can reduce the size of the system, it will also make it run slower ..... its just one of those things, but if your system has that little ram, why bother using KDE? .. you should invest in looking at minimal desktop, that will take up far less RAM

also, the kernel isent that big to begin with, so using -Os on it can only make it slower, and probably only save enough space to add a picture to RAM

so i wouldent recomend using -Os for small programs like the kernel, you should optimise for speed here, and if size is important, then go for size on programs that it can make a difrence

im not sure, but uclibc can make programs very smaller, but i dont remember if it has effect on RAM.. it would make them smaller tho, but slower

anyways, i used a system with only 64MB of ram before, took long to compile everything, but there wasent really any need to make things smaller, its not like the system was fast enough to run to many programs off of anyways
Old 12-11-2004, 05:37 PM   #3
Registered: Jun 2004
Location: Michigan, USA
Distribution: Ubuntu
Posts: 77

Original Poster
Rep: Reputation: 15
Good point. I guess it's kind of a problem specific issue anyway. Compiling the 2.6 and 2.4 series kernels for O3 vs Os yields about 300k size reduction. I guess it would only be useful to use the smaller kernel if swap space usage is around 300k.

Heh, and I didn't mean to imply I used KDE on 64MB RAM. I can only imagine the results. I just used that as an example where -Os may improve size considerably, maybe reducing i/o. That's an interesting tradeoff to consider.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Why should you give the size of the swap disk as twice the size of RAM vmniza Linux - Newbie 3 09-17-2004 03:13 AM
Explaining "mem" & processor usage?? KendersPlace Linux - Newbie 1 08-20-2003 10:25 PM
Low Mem Laptop Debian Install FROM Zip Disk gboutwel Linux - Software 3 01-26-2003 01:58 PM
Large disk size Shaddell Linux - General 1 01-07-2003 10:16 PM
Now the disk size is to small... Hachaso Linux - Software 5 05-18-2001 06:33 PM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 05:58 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration