LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Distro with the smallest memory footprint? (https://www.linuxquestions.org/questions/linux-newbie-8/distro-with-the-smallest-memory-footprint-728795/)

Maxxi 05-27-2009 04:21 AM

Distro with the smallest memory footprint?
 
Hey guys,

I'm looking for an operating system with an extremely small memory footprint that can run either windows or linux command line apps. I would settle for a DOS-prompt, but the fact that it can't address all of my memory rules it out, so I turned to Linux.

I downloaded Slitaz and Damn Small Linux (both latest versions). Damn Small Linux doesn't recognize my southbridge and therefor won't even boot. I tested it in a virtual environment, where it actually worked and with only 23MB of RAM usage it seems to be perfect for my need.

Slitaz booted without a problem, but could only address 3 of my 4GB RAM. Also, with 68MB it used three times as much memory than DSL.

So my question to all you Linux gurus is: Which other distro has an extremely small memory footprint and can address at least 4GB of RAM? If it was an x64-version that would be even better. Any suggestions?

shpenat 05-27-2009 04:57 AM

Hi and welcome to LQ

You need to have x68_64 architecture and system supporting it to be able to address full 4GB of RAM. If you have only x86 architecture, you wouldn't be able to do it no matter what system you use.

I would suggest build your own distro with LFS so you can minimize the memory usage as much as you want but they support only x86 architecture. So I actually don't have any particular distro to suggest. Maybe someone else will.

Maxxi 05-27-2009 09:17 AM

Hi shpenat,

thanks for your answer. Of course I have a computer with x64 architecture, or else I wouldn't have stuck 4GB of RAM into it, or asked specifically for an x64-distro ;)

Your suggestion with LFS is great, but that goes far beyond what I need. First of all I'm on 56k, so downloading a large distro just to slim it down myself later is no option. DSL and Slitaz were all small enough to grab in a decent amount of time. Also, I haven't been working in Linux for a decade now, so I want to keep it simple. Using LFS would require me to look far deeper into the workings of Linux than I care to. I don't want to study chemistry, just because I need to take a pill. After all, I just want to run a simple, memory-hungry commandline tool. Building a custom Linux for that is just way overdoing it.

In the meantime I found Tiny Core, which is an even more slimmed down distro, but it also seems to be unable to access more than 3GB of RAM. After browsing through tons of pages, it seems that the Linux community sticks rather to x86 architecture. I can't believe that there isn't at least one slim distro that has x64-compatibility, or support for 4GB RAM in a x86 environment. I'll search some more, but as it looks now, I'll be much better off using an XP x64 lite.

shpenat 05-27-2009 11:54 AM

Maybe try basic installation of ArchLinux or Debian (without any graphical interface). We used ArchLinux on machine used for numerical simulations. But 56k modem is quite limiting factor. So if you know win64XP will do fine, use them. There is no need to use linux at all cost :)

H_TeXMeX_H 05-27-2009 01:22 PM

This has been asked before, but in a different way, anyway check here:
http://www.linuxlinks.com/Distributions/Floppy/
http://www.linuxlinks.com/Distributi...Distributions/

Here's one that supposedly needs only 4 MB RAM:
http://natld.berlios.de/

Quads 05-27-2009 01:40 PM

Just out of curiousity, what are you doing with this machine? I'm just curious what you are doing with a powerful machine like that that would cause you to want virtually no operating system.

Saptech 05-27-2009 02:04 PM

I to say try a minimum debian 64 and install only what you need. Even though you're using dialup, maybe you can do your downloading at night when you're sleeping.

http://cdimage.debian.org/debian-cd/...64-netinst.iso

Also there are others such as Archlinux & Crux to name a few.

shpenat 05-27-2009 02:30 PM

H_TeXMeX_H: I know that similar questions were already raised, but this one is special in requiring x86_64 architecture. Most of these small distros (if not all) are designed with old machines (i386) in mind. Nobody expects anybody with 4GB RAM to require minimalistic OS. I personally really don't know any existing minimalistic distribution with x86_64 support.

H_TeXMeX_H 05-27-2009 02:36 PM

Of course then the question is why ? Why do you need such a thing ? There is no need for such a thing, which is probably why nobody made it.

Quads 05-27-2009 07:36 PM

Quote:

Originally Posted by H_TeXMeX_H (Post 3554667)
Of course then the question is why ? Why do you need such a thing ? There is no need for such a thing, which is probably why nobody made it.

I figured there had to be a good reason, that's why I asked.

Maxxi 05-28-2009 11:09 AM

Thanks for all your answers guys!

Quote:

Originally Posted by Quads (Post 3554614)
Just out of curiousity, what are you doing with this machine? I'm just curious what you are doing with a powerful machine like that that

would cause you to want virtually no operating system.

I have to compress 2TB of data. I'm using 7zip for the job, which is very efficient, but also very memory hungry. To max out the program, it needs at least 8GB of RAM. Since I have only 4GB, I'm bound to use smaller dictionaries, which results in lower compression. I have already been working on better equipped machines with it and so I know how much more compression I would gain from a bigger dictionary. Anyway, I'm currently running Vista 64, where I can only free 3.5GB of my 4 GB RAM. Thanks to Window's memory management, 7z can only assign about 3.2GB for the job. To get the most out of it, a simple, yet powerful command shell without any bells and whistles would be best for this task.


Quote:

Originally Posted by H_TeXMeX_H
This has been asked before, but in a different way, anyway check here:
http://www.linuxlinks.com/Distributions/Floppy/
http://www.linuxlinks.com/Distributi...Distributions/

Thanks, those are some very extensive lists, but downloading all those just to see whether they can address 4GB of RAM is just out of question. I already mentioned that I'm on 56k. That's why I asked if someone could actually name a small distro, which supported that feature.


Quote:

Originally Posted by H_TeXMeX_H
Here's one that supposedly needs only 4 MB RAM:
http://natld.berlios.de/

Very impressive! But this distro is far too old. It uses an ancient kernel that is incompatible with my comp. I assume it would also lack support for more than 3GB RAM thanks to its age. The memory footprint is really secondary. If I can't access the range after 3072MB, then even the smallest memory footprint won't make upfor that wasted gigabyte.


Quote:

Originally Posted by H_TeXMeX_H
Of course then the question is why ? Why do you need such a thing ? There is no need for such a thing, which is probably why nobody made it.

There's a first time for everything, isn't it ;) There was a time when there were no small x86 distros either and someone had to start making them ;) There are more memory hungry apps that would profit from a slim OS on a powerful rig. Check out the lugdunum server for example. It's a server for the edonkey network. The more RAM you have, the more users you can handle. So the gain is even more obvious in this case.
Oh and I found a post at the Tiny Core forums, where someone showed interest re-compiling it for x64 architecture. So it's really just a matter of time until people like me will find what they need ;)


Quote:

Originally Posted by Saptech
I to say try a minimum debian 64 and install only what you need. Even though you're using dialup, maybe you can do your downloading at night when you're sleeping.

Thanks a lot! It's small enough to try it out :) In the meantime I downloaded finnix. It's also pretty slim and supports x64 architecture! I already tried it out and it was actually capable of addressing the full 4GB plus it recognized both of my CPU's cores :) So, thanks for all your help guys :)

Just for the record, in case someone has a similar request in the future: I tried DSL, DSL-N, Slitaz, Puppy, TinyCore, Syslinux, and some other minor distros and all were limited to 3GB RAM. In this case, an x86 distro would have sufficed, as those can actually address 4GB. I found some of those, but they were all in the realms of 600+MB, so they were no option.

H_TeXMeX_H 05-28-2009 11:19 AM

Quote:

Originally Posted by Maxxi (Post 3555540)
Very impressive! But this distro is far too old. It uses an ancient kernel that is incompatible with my comp. I assume it would also lack support for more than 3GB RAM thanks to its age. The memory footprint is really secondary. If I can't access the range after 3072MB. Then even the smallest memory footprint won't make up for that wasted gigabyte.

I'm sorry, but there is absolutely NO WAY you can get a 2.6 kernel and Linux OS to run with 4 MB of RAM (I dare you to try), the kernel is just too big, it depends on large libs that can only be trimmed to a certain point, etc. It's not possible, IMO. You'll have to use 2.2 or 2.4 for such a low amount of RAM.

But then why do you want support for 4 GB of RAM if you want to run it with 4 MB of RAM ? Was there some typo somewhere ?

I think you need to think about what you really want a bit more.

shpenat 05-28-2009 11:45 AM

Quote:

Originally Posted by H_TeXMeX_H (Post 3555548)
I'm sorry, but there is absolutely NO WAY you can get a 2.6 kernel and Linux OS to run with 4 MB of RAM (I dare you to try), the kernel is just too big, it depends on large libs that can only be trimmed to a certain point, etc. It's not possible, IMO. You'll have to use 2.2 or 2.4 for such a low amount of RAM.

You got my attention. That's something to try! I let you know if I were successful. Though it will probably have to be one purpose kernel.

H_TeXMeX_H 05-28-2009 02:04 PM

Make sure to compile it for compact size, there is such an option ... but my money's against you :)

farslayer 05-28-2009 02:09 PM

So by the time you are running a 2.2 or 2.4 kernel, you'll not take advantage of the features in your CPU that would boost your performance. So what performance you gain in RAM you may loose in CPU capability probably hurting yourself more.

You might be better off just installing something like a barebones Debian 64 install as suggested.

You might want to do a search for 32 bit vs 64 bit Linux compression benchmarks

Maxxi 05-28-2009 04:11 PM

Quote:

Originally Posted by H_TeXMeX_H (Post 3555548)
But then why do you want support for 4 GB of RAM if you want to run it with 4 MB of RAM ? Was there some typo somewhere ?

I think you need to think about what you really want a bit more.

lol that's a classic misunderstanding. I never said that I wanted an OS that would fit into just 4MB of RAM. In fact you even quoted the part where I said that the memory footprint is of lesser importance ;) All I asked for was a version that would just provide all necessities to run command line tools without any other waste of RAM and that could address 4GB of RAM. I'm fine with everything that stays below 70MB of RAM usage, because that's basically how far down I can get WinXP Lite's memory usage.

Oh and just a remark regarding the massive kernel size. When I checked out DSL I found that it used an approx 900kb 2.4 kernel. May be I'm wrong, after all I'm not Linux savvy at all, but it seems that they compiled a very slim version of the original 2.4 kernel. So with some work an extremely slim 2.6 kernel version might be possible. Just let me stress once more that it's not what I'm looking for ;)



Quote:

Originally Posted by farslayer
So by the time you are running a 2.2 or 2.4 kernel, you'll not take advantage of the features in your CPU that would boost your performance. So what performance you gain in RAM you may loose in CPU capability probably hurting yourself more.

I'm very well aware of that, but compressing time is secondary. The final size is of more importance to me, because that will stay for the years to come. After 3 years it won't matter whether it took 2 weeks or a month to compress the data. Also, I already mentioned that with Finnix I found a version that not just runs in x64-mode, but also supports multiple CPU-cores, so the performance should be just as good as in Windows.



Quote:

Originally Posted by farslayer
You might be better off just installing something like a barebones Debian 64 install as suggested.

Is that the same as Debian Minimal, or are those two separate distros?

i92guboj 05-28-2009 04:44 PM

Quote:

Originally Posted by Maxxi (Post 3555841)
Oh and just a remark regarding the massive kernel size. When I checked out DSL I found that it used an approx 900kb 2.4 kernel. May be I'm wrong, after all I'm not Linux savvy at all, but it seems that they compiled a very slim version of the original 2.4 kernel. So with some work an extremely slim 2.6 kernel version might be possible. Just let me stress once more that it's not what I'm looking for ;)

Yep, and that's the size that you get with a compressed image, which is what the stuff under /boot is. Of course, the image is uncompressed on your ram, so, it's larger than you think.

And besides that, you have a good bunch of modules under /lib/modules/, which are also part of your kernel and need to be loaded before you can use them. To get a realistic measure you would need to build all of these statically into your kernel, and then look at the uncompressed image, and not vmlinuz or similar images.

Quads 05-28-2009 10:06 PM

Quote:

Originally Posted by farslayer (Post 3555727)
So by the time you are running a 2.2 or 2.4 kernel, you'll not take advantage of the features in your CPU that would boost your performance. So what performance you gain in RAM you may loose in CPU capability probably hurting yourself more.

That's an idea. Just install ubuntu and start tearing pieces out of it.

What is there to gain by stripping it down so small? Once you have all of this ram at your disposal, what is a few mb?

H_TeXMeX_H 05-29-2009 03:22 AM

Um, some of those things you quoted are not my quotes ... I didn't say those things.

So then you want to run these smaller distros in virtual machines or something ?

Maxxi 05-29-2009 07:12 AM

Quote:

Originally Posted by H_TeXMeX_H (Post 3556280)
Um, some of those things you quoted are not my quotes ... I didn't say those things.

Oops, you're right. I corrected that now :)


Quote:

Originally Posted by H_TeXMeX_H (Post 3556280)
So then you want to run these smaller distros in virtual machines or something ?

No, that would be a waste of ressources and processing power and I need all that I can get. They are supposed to function as an alternate minimalistic operating system, where a single tool can address as much RAM as necessary without having to take the left overs from more memory intense operating systems.


All times are GMT -5. The time now is 05:53 AM.