LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 12-21-2012, 12:25 AM   #1
dwim
LQ Newbie
 
Registered: Apr 2011
Distribution: Slackware
Posts: 7

Rep: Reputation: 0
udev without devtmpfs and other ram saving tricks


Hi all,

I am currently wiping an Ubuntu installation from an old computer. Ubuntu bairly functions on it, and runns almost exclusivly in swap. As I am installing slackware 14.0, I am looking for tricks to reduce memory waste.

I know that udev mounts a devtmpfs over /dev at boot. I believe that it does this in the /etc/rc.d/rc.udev script. Is there a way that I can get udev to work without this to save ram, how much ram does that even use anyway?

I know how to reduce the size of /dev/shm and I am going to install LXDE or XKDE or WMaker (haven't made up my mind yet). What other things could I do to reduce ram usage and optimize the installation for an old laptop?
 
Old 12-21-2012, 11:40 AM   #2
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,755

Rep: Reputation: 466Reputation: 466Reputation: 466Reputation: 466Reputation: 466
I'd say don't use udev at all. Boot normally once and run `lsmod` to get a list of any essential kernel modules needed. Then, uncomment these in your /etc/rc.d/rc.modules file and do `chmod 644` /etc/rc.d/rc.udev to accomplish that.
You'll want to comment the commands which mount /run tmpfs in /etc/rc.d/rc.S. By making rc.udev non-executable you'll automatically avoid the code there which mounts /dev on tmpfs.

For of the WM's you mention, wmaker is your best best -although fluxbox would also work. Avoid running services you don't need, such as https, ftp and others -maybe even disable syslog if you feel you don't need it.

By default, mounting tmpfs will reserve *half* of available RAM each time it is used -unless my math is wrong, that means that mounting /dev and /run on tmpfs will only leave you with 1/4 of your available RAM...

On the other hand, if you like having udev, then it might be best to use Slack 13.37 (before rc.S and udev were upgraded) or use 14.0 but with the old versions of udev and sysvinit-scripts from 13.37.

If you don'T mind using older GTK1 programs, you could look around my site for GTK1 alternatives to many of your commonly-used programs. Hundreds to choose from here:
http://distro.ibiblio.org/amigolinux/download/
 
Old 12-21-2012, 02:31 PM   #3
guanx
Senior Member
 
Registered: Dec 2008
Posts: 1,014

Rep: Reputation: 146Reputation: 146
Quote:
Originally Posted by dwim View Post
...
I know that udev mounts a devtmpfs over /dev at boot. I believe that it does this in the /etc/rc.d/rc.udev script. Is there a way that I can get udev to work without this to save ram, how much ram does that even use anyway?
...
To get rid of devtmpfs and to save ram are mutually exclusive. I actually save ram by getting rid of udev and use devtmpfs on my small system with about 14MB available memory.
 
Old 12-21-2012, 02:43 PM   #4
guanx
Senior Member
 
Registered: Dec 2008
Posts: 1,014

Rep: Reputation: 146Reputation: 146
Quote:
Originally Posted by gnashley View Post
...
By default, mounting tmpfs will reserve *half* of available RAM each time it is used -unless my math is wrong, that means that mounting /dev and /run on tmpfs will only leave you with 1/4 of your available RAM...
...
Yes 1/2 time 1/2 gives 1/4. Your math is perfect.
But how does this have anything to do with Linux?
 
Old 12-21-2012, 03:33 PM   #5
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Main: Gentoo Others: What fits the task
Posts: 15,592
Blog Entries: 2

Rep: Reputation: 4045Reputation: 4045Reputation: 4045Reputation: 4045Reputation: 4045Reputation: 4045Reputation: 4045Reputation: 4045Reputation: 4045Reputation: 4045Reputation: 4045
Quote:
Originally Posted by gnashley View Post
By default, mounting tmpfs will reserve *half* of available RAM each time it is used -unless my math is wrong, that means that mounting /dev and /run on tmpfs will only leave you with 1/4 of your available RAM...
A tmpfs is reserving exactly zero percents of your RAM. It will use only the RAM that it needs, not more, not less. By default a tmpfs can be as large as the half of the total available RAM, so having two tmpfs will not reduce the usable space for one of the mounts to 1/4th of the RAM and it will not leave you with only 1/4th of your RAM usable.
 
Old 12-22-2012, 06:52 AM   #6
slacktroll
Member
 
Registered: May 2011
Distribution: Slackware 14.0 on Thinkpad X60
Posts: 57

Rep: Reputation: 3
Please OP, provide us readers some more information about this old machine so we can help you.
What's the specification of the machine?

How fast cpu does it have?
What cpu family does it have?
How much ram does it have?
What kind of ram does it have? (EDO RAM/SDRAM/DDRAM?)
How much discspace does it have?
How fast is the disc?
How much cache does the disc have?

What's the computers full title? ("eg Dell superultra book 123");
 
Old 01-22-2013, 05:27 PM   #7
Woodsman
Senior Member
 
Registered: Oct 2005
Distribution: Slackware 14.1
Posts: 3,482

Rep: Reputation: 534Reputation: 534Reputation: 534Reputation: 534Reputation: 534Reputation: 534
I'd like to continue this thread.

I have some vintage PCs here. Lately I'm wondering whether I should continue tinkering with them or retire them permanently. I've read dozens of blogs and other opinions how to use vintage hardware and none of those ideas help around here. For the ways in which I use computers, tinkering is all that remains to justify their existence.

I'd like to keep this thread focused on optimizing vintage hardware and not how to use them in various or esoteric ways.

I have a 486 system, with a Cyrix 586 hybrid CPU, 16 MB of RAM, a 20GB drive, SMC EtherCard Plus Elite16T 8013WC 10 Mbps NIC, a CD drive, 5-1/4 and 3-1/2 inch floppy drives, and an ATI Ultra 8514 video card. The video card is dying as one row of on-board memory is dead, at least as reported by diagnostics during initialization. WFWG 3.11 runs real nice still. I have Slackware 11.0 installed but short of installing really old Slackware releases, trying to run a Linux based system on this machine is like convincing a pig to sing. BTW, I have the Microsoft TCP/IP package installed in WFWG and the machine connects to my network shares just fine. A 10 Mbps NIC means transferring files is a test of patience. Everything more or less works as long as I remember to set the date and time in the BIOS before booting because the CMOS battery died long ago. I don't really care about this system much outside of being a conversation piece. Wattage: 50 watts idle; 60 watts with disk activity.

The other two machines seem more promising although I might be at the point of diminished returns.

One is a Pentium I system, ASUS TXP4 motherboard, with a 400 MHz K6-III+ CPU, 66 MHz FSB overclocked to 68 MHz, 256 MB RAM (maximum supported by the motherboard), a 40 GB Seagate Barracuda IV drive, Diamond Stealth 3D 3000 PCI video card, Creative Labs Sound Blaster AWE64 ISA Plug and Play sound card, 3COM Fast EtherLink XL (3C905) El90x1 10/100 PCI NIC, Creative Labs (MATSHITA CR-585 ZU17) 24x CD-ROM, 3-1/2 inch floppy drive, and a removable IDE hard drive bay. Currently I have WFWG 3.11, NT4, and Slackware 12.2 installed. For several years this machine and NT4 was my main office machine. Hopefully the days of dial-up never return. Wattage: About 37 watts idle; 45-55 watts with disk activity.

The other machine is a Pentium II system, Asus P2B motherboard, with 350 MHz Pentium II-ECC (Deschutes) CPU, 100 MHz FSB, 448 MB RAM (768 MB supported), 40 GB Seagate Barracuda IV drive, Creative Labs 3Dfx Interactive Blaster Banshee AGP video card, C-Media 8738 PCI Plug and Play sound card, ADMtek NC100 (Linksys LNE100TX, no WOL) PCI Network Everywhere Fast Ethernet 10/100 NIC, HP 9300 CD-Writer+, Lite-On DH-20A4P 20X IDE DVD +/- RW, 3-1/2 floppy drive, and a removable IDE hard drive bay. Same operating systems as the previous machine. Wattage: About 60 watts idle; 72 watts with disk activity.

How to make these machines useful?

WFWG is like lightning on the Pentium machines. NT4 is snappy. I can't offer optimistic words for Linux based systems and I have tried several through the years. Slackware 12.2 is there because I prefer Slackware. Command line operations are tolerable. Desktop environments are not tolerable. Using a window manager helps load the desktop faster but who stares at the desktop screen all day? A person needs apps and that is where the classic advice of using a window manager collapses.

These machines are not fast. Period. Tinkering with them requires gobs of patience. Forget about asking any person even vaguely acquainted with desktop computers to use these machines. A young child or toddler might be persuaded to use them to run a paint program but that is about all and there are no rug rats here.

Surfing the web? Never mind. These machines simply can't cope with the modern web. Period. Fifteen years ago I used the 486 and Netscape 3 to access the web with a 14.4K modem, but the web was overwhelmingly text based and static then. Configuring these machines as a house guest web portal is more or less insulting the house guest.

USB? The two Pentium systems have USB 1.x ports. Not really useful unless I attach extender cables because the ports are located in the back of the cases.

I've tinkered with disabling udev. There are some related hacks needed, such as ensuring /dev/pts gets created and mounted. The old rc.netdevice script works well when udev is disabled. Overall, a nominal saving in RAM and no noticeable improvement in response.

A second office machine? Forget about OpenOffice or LibreOffice. Perhaps GTK 1.1 apps might suffice, as Gilbert probably can attest, but why would anybody want to use the system solely for that purpose, especially when there are two dual core systems in the house?

I've tinkered with tmpfs but with the limited RAM, I have not noticed anything helpful by using tmpfs.

I have not tried anything related to using the machines as dumb terminals.

I'm in the process of updating the 12.2 installs to 13.1. (Updating to 14.0 is for another day.) Regardless, this might be my last hurrah with these machines, outside of using them to test networking functions.

So let the discussion and recommendations begin.
 
Old 01-22-2013, 05:58 PM   #8
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Main: Gentoo Others: What fits the task
Posts: 15,592
Blog Entries: 2

Rep: Reputation: 4045Reputation: 4045Reputation: 4045Reputation: 4045Reputation: 4045Reputation: 4045Reputation: 4045Reputation: 4045Reputation: 4045Reputation: 4045Reputation: 4045
I would retire the 486, but the other machines look fine.
The other machines look promising (I would try to lower the multiplicator on the K6-III to 4 and run it with FSB100, this may or may not work, but if it works it should give you a nice speedup). If you find NT snappy I would try it with Slitaz on those systems, newer software, but should fly.
If you want a desktop system, Slackware with a tiling WM (or another lightweight WM) and lightweight software (use Mutt as mail-client, ranger/mc/vifm as filemanager, a lightweight browser like surf, dillo or even lynx, ...) should do the job.
If you want to make a few servers, Slackware without GUI should also be fast enough on those systems to act as web-, mail- and/or file-server. Maybe you also want to create a little cluster, it is up to you.
 
1 members found this post helpful.
Old 01-22-2013, 10:57 PM   #9
dwim
LQ Newbie
 
Registered: Apr 2011
Distribution: Slackware
Posts: 7

Original Poster
Rep: Reputation: 0
Sorry if it seemed like post and run. I did learn from the responses, but the machine died anyway.

@Woodsman
Just set those old boxes to calculating pi and use them as space heaters ;-)

About the only thing I can think of for those older machines would be using them as simple personal servers.
 
Old 01-23-2013, 03:44 AM   #10
Poucket
Member
 
Registered: Dec 2012
Location: California
Distribution: Slackware 14.1
Posts: 38

Rep: Reputation: Disabled
http://homepage.hispeed.ch/rscheideg...grade_faq.html
Woodsman,
A place to start might be
CPU upgrades for the asus P2B board before installing linux.

Last edited by Poucket; 01-23-2013 at 03:58 AM.
 
Old 01-23-2013, 06:47 AM   #11
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,755

Rep: Reputation: 466Reputation: 466Reputation: 466Reputation: 466Reputation: 466
I actually think I'd save that old 486 first -if you anyone ever needs to access an old floppy or large floppy, you have way to access them!
For a long time I ran a 333MHz PII with 512MB RAM, or less. With 768 'twould be a bit better, but even with 448 you can get by -have at least 512MB swap for it. Response is pretty good if you use fluxbox or windowmaker on there. Naturally, KDE/QT or GTK2 apps are gonna take time to start, but should respond pretty good, once started.

I'm just now finally abandoning a slack pre-11.0 installation which I first started using on that PII. I later migrated it to a PIII 700MHz box. Classic glibc-2.3.6/gcc-3.4.6 -can't get anymore stable than that was. The real show-stopper on that system became the GTK2 version -flashplayer-9.0 and later needs a newer version -so my wife was unable to see any videos...
 
Old 01-24-2013, 06:06 PM   #12
Woodsman
Senior Member
 
Registered: Oct 2005
Distribution: Slackware 14.1
Posts: 3,482

Rep: Reputation: 534Reputation: 534Reputation: 534Reputation: 534Reputation: 534Reputation: 534
Quote:
Just set those old boxes to calculating pi and use them as space heaters ;-)
This might be the best solution, although an expensive one.

I updated both systems to Slackware 13.1. Doing so was irritating because they are slow. I needed to repartition both and had hoped to use parted magic. Although there is a "low RAM" boot option, obvious is that parted magic is not designed for vintage hardware, for sure. I waited and waited and waited.... Then waited some more. In the end I pulled the drives and inserted them into my office machine drive bay and performed almost all work there.

The bottom line is working with these machines require gobs of patience. Advice for restoring the machines pretty much reduces to the equivalent of trying to fit a size 10 foot into a size 8 shoe. As I mentioned, reconfiguring with a window manager and apps like xfe for a file manager is only a foundation. Running useful apps remains the hurdle as most apps nowadays are not designed with vintage computers in mind.

Neither the stock Firefox nor Opera will run on the K6-III+ machine (Pentium I class) because those browsers now are compiled i686. I could compile my own Firefox but performance would be intolerable anyway. Possibly a browser like Midori might work, but Midori is missing some important features, such as NoScript (JavaScript white listing).

The 486 is a nice conversation piece, but as I can run WFWG 3.11 on the K6-III+ box, there is not much sense in doing anything with the 486.

The K6-III+ box does have one remaining use: my parallel port flat bed scanner is connected to that machine and for the couple of pages I scan a year, keeping NT4 running on that machine makes sense. Being a parallel port scanner, I never have been able to connect or use directly in a Linux based system, which is one reason I have kept that machine with NT4.

The PII box is an i686 class system. A little tinkering might salvage some nominal usage.

Yet, in the end I'm reconciling this might be the end of the road for these machines.

Quote:
CPU upgrades for the asus P2B board before installing linux.
I ran into that web page many years ago. Outside of pure hobbying there is no sense in spending money on my old machines.

Quote:
I actually think I'd save that old 486 first -if you anyone ever needs to access an old floppy or large floppy, you have way to access them!
Actually, I did just that several years ago. I saved my entire floppy collection. My office machine has a 3-1/2 inch floppy drive, which I used to save those floppies, but I used the 486 with the 5-1/4 inch drive to save those disks. Not that I have any lofty goals for saving that software, but as hard drive space is relatively inexpensive, I got a kick out of saving all the floppies. Fortunately for me, I do not live in a high humidity area and I kept the floppies stored in clean area for all those years. I was able to read every single disk.

Quote:
The real show-stopper on that system became the GTK2 version -flashplayer-9.0 and later needs a newer version -so my wife was unable to see any videos...
That pretty much summarizes the main point. At one time Linux based systems were touted as being eco-friendly by keeping vintage hardware in use. That has not been the case for a long time. For many years now free/libre software developers have been unforgiving to those who try to keep vintage hardware running.
 
Old 01-24-2013, 06:34 PM   #13
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Main: Gentoo Others: What fits the task
Posts: 15,592
Blog Entries: 2

Rep: Reputation: 4045Reputation: 4045Reputation: 4045Reputation: 4045Reputation: 4045Reputation: 4045Reputation: 4045Reputation: 4045Reputation: 4045Reputation: 4045Reputation: 4045
Quote:
Originally Posted by Woodsman View Post
At one time Linux based systems were touted as being eco-friendly by keeping vintage hardware in use. That has not been the case for a long time. For many years now free/libre software developers have been unforgiving to those who try to keep vintage hardware running.
Not really. It depends on the software you use. Mutt as mailclient runs as good on a K6-III as on a Phenom II X6, the same is true for newsbeuter as RSS reader, Ranger/mc/vifm as filemanager (and there are some GUI filemanagers that are lightweight). For the browser you might want to have a look at xombrero (formerly xxxterm), designed to be lightweight and with focus on security features.
 
Old 01-24-2013, 07:39 PM   #14
Woodsman
Senior Member
 
Registered: Oct 2005
Distribution: Slackware 14.1
Posts: 3,482

Rep: Reputation: 534Reputation: 534Reputation: 534Reputation: 534Reputation: 534Reputation: 534
Quote:
Not really. It depends on the software you use. Mutt as mailclient runs as good on a K6-III as on a Phenom II X6, the same is true for newsbeuter as RSS reader, Ranger/mc/vifm as filemanager (and there are some GUI filemanagers that are lightweight). For the browser you might want to have a look at xombrero (formerly xxxterm), designed to be lightweight and with focus on security features.
That you have gone out of your way to list some apps that might help affirms my point that using these old machines is like squeezing a size 10 foot into a size 8 shoe. Are these old machines usable? Yes, by geeks and hobbyists but not by most people (what some people call the WAF --- wife acceptance factor). That's the point of my original post: how to make these computers usable for most people, not for people like you or me whose usage skills are at the far ends of the bell curve.

Edit: With that said, adding a SATA controller card and a 1GB NIC could convert one of the machines into a backup server --- something I've been contemplating.

Last edited by Woodsman; 01-24-2013 at 07:59 PM.
 
Old 01-24-2013, 08:21 PM   #15
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Main: Gentoo Others: What fits the task
Posts: 15,592
Blog Entries: 2

Rep: Reputation: 4045Reputation: 4045Reputation: 4045Reputation: 4045Reputation: 4045Reputation: 4045Reputation: 4045Reputation: 4045Reputation: 4045Reputation: 4045Reputation: 4045
Quote:
Originally Posted by Woodsman View Post
That you have gone out of your way to list some apps that might help affirms my point that using these old machines is like squeezing a size 10 foot into a size 8 shoe.
Actually no, I have not gone out of my way, I use Mutt as mail client, newsbeuter for RSS and Ranger as file-manager, on all my machines, from the EeePC 701 (630MHz Celeron, 512MB) to the six-core machine with 16GB RAM. I would use a vim-like browser, like xombrero or dwb, but currently they lack features that I only get with Firefox and the Pentadactyl plugin.
 
  


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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] udev and dbus - using the notivy-send command in a script started by udev markush Slackware 2 10-14-2012 09:26 AM
UDEV: Unable to run a command line interface script after USB automount using udev mohamr2 Linux - Embedded & Single-board computer 8 08-16-2011 10:39 AM
UDEV - SBLive(emu10k) - Mandriva hangs at UDEV during boot.....still! Grrr. peterlowrie Linux - Hardware 2 05-23-2010 06:37 PM
udev/hal issue upon resuming from suspend to ram radu.pop Linux - Software 1 11-14-2009 09:21 PM
New Tricks and Toys For Linux Addicts- USB tricks and Portables OS's! linus72 Linux - Newbie 3 05-29-2009 05:36 PM


All times are GMT -5. The time now is 02:27 AM.

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