LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
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.

Notices

Reply
 
Search this Thread
Old 12-11-2004, 01:47 AM   #1
Ikebo
Member
 
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, 04:38 AM   #2
SciYro
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, 04:37 PM   #3
Ikebo
Member
 
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.
 
  


Reply


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 02:13 AM
Explaining "mem" & processor usage?? KendersPlace Linux - Newbie 1 08-20-2003 09:25 PM
Low Mem Laptop Debian Install FROM Zip Disk gboutwel Linux - Software 3 01-26-2003 12:58 PM
Large disk size Shaddell Linux - General 1 01-07-2003 09:16 PM
Now the disk size is to small... Hachaso Linux - Software 5 05-18-2001 05:33 PM


All times are GMT -5. The time now is 01:16 PM.

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