SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hello.
Since i am familiar with windows for a long time, i always tried everything possible, to make a system faster, more secure and more flat.
Of course, i don't want to make a lfs now, but i still try to manage this now under my sw12.1 with conventional methods.
During the installation there are several options(daemons) , which one can check or uncheck, that's already ok.
But i want more tweaking.
-
-
Could someone do me a favour and reply to this by giving some small hints, how to tweak effectively my system?
My primary aims look like that:
-
- faster bootup
- boot up debug screen shall only be visible, until x and my vga are ready, then
the gui login screen shall appear, although dmesg still is running in the back.
- deactivating uneccesary daemons ( already done by setup, but what else is possible
?)
- that's all for the time being!
-
-
I'm already reading the LinuxSysAdmin Guide, the Securing and configuring the Linux-Kernel-the ultimate solution and two other documents now, and i will follow their hints, but only for completion, i'm now asking here in the forum, what else could be made.
THX!
I think, i already have done that.
My slackware boot logo flickers for about 1 second, just to show every noob, what i'm running.
I mean after that i see the dmesg-boot screen scrolling ( at leat i think it is dmesg too, what is happening then).
I want to shorten this procedure.
Then you want one of those parallelising init replacements. I'll recycle a post with some names of 'em in it. The thread also goes a bit into measuring performance and tries to ask what is and what isn't relevant wrt optimisation: http://www.linuxquestions.org/questi...22#post3157022
You could try compiling your own kernel containing only options relevant to your system -- but I wouldn't expect too much of a difference in boot-up time with a custom kernel compared to the generic-smp kernel. If you read `man lilo.conf` it will tell you that adding the "compact" option to /etc/lilo.conf (and subsequently running /sbin/lilo to write it to the MBR, of course) reduces load time. This does not work on ALL systems though, so it's a hit-or-miss solution.
Quote:
Originally Posted by me-$-on
- boot up debug screen shall only be visible, until x and my vga are ready, then
the gui login screen shall appear, although dmesg still is running in the back.
By this I'm assuming you want a GUI login screen to appear instead of the console login and subsequent "startx" command. To do this, edit /etc/inittab and change your default runlevel from 3 to 4. You would change this:
Code:
# Default runlevel. (Do not set to 0 or 6)
id:3:initdefault:
to this:
Code:
# Default runlevel. (Do not set to 0 or 6)
id:4:initdefault:
That only provides ONE VT though, so if you want more than one (ie you want it to be more like runlevel 3) you would have to edit this part:
Code:
# These are the standard console login getties in multiuser mode:
c1:1235:respawn:/sbin/agetty 38400 tty1 linux
c2:1235:respawn:/sbin/agetty 38400 tty2 linux
c3:1235:respawn:/sbin/agetty 38400 tty3 linux
c4:1235:respawn:/sbin/agetty 38400 tty4 linux
c5:1235:respawn:/sbin/agetty 38400 tty5 linux
c6:12345:respawn:/sbin/agetty 38400 tty6 linux
and include 4 as an option in more of the VTs (by default, the only VT available in runlevel 4 is tty6). See `man inittab` for more information.
Quote:
Originally Posted by me-$-on
- deactivating uneccesary daemons ( already done by setup, but what else is possible
?)
All of the init scripts that launch services are located in /etc/rc.d/. To enable/disable services, you can set/unset the executable bit using `chmod +x rc.scriptname` and `chmod -x rc.scriptname` as root. Disable the scripts you don't need (of course, figuring out which scripts and services you don't need is up to you). If you REALLY want a fast bootup you can hack the rc.S and rc.M files, but that would be for advanced users only and you should understand exactly what the scripts are doing before editing them.
One of the things you can do is recompile your kernel with everything you need in the kernel. Use no modules at all. Then make /etc/rc.d/rc.udev not executable. This will turn off hot pluging and also prevent module loading. If you need some module, I do believe that some video for linux stuff only runs from modules, you can't do this.
You could also hack the start up scripts and background things so the script continues while other things go on in the background. This will take a little work and some knowledge of what need to run before other things start. For example, and maybe the only thing, rc.inet1 needs to complete before rc.inet2 starts. If you are adventurous you might want to fold inet2 into inet1, good luck.
As for disabling dmesg at boot up I would suggest against it. It doesn't take much, if any at all, time for it to run and when something BAD happens it usually is your only information as to what is the trouble. So don't blind yourself for a millisecond of boot time.
Do you really want to speed up the boot procedure?
I have lilo waiting 0 seconds - so that's as fast as that part of booting can get.
I use ranish partition manager as a boot manager so if I want to change the boot partition or which partitions are available I use that.
Normally I don't, so I just hit enter.
What slows down booting are the periodic file system checks and probing for new hardware.
If you really wanted to speed up the boot procedure those would be the two areas to concentrate on - and I would advise against it and pose the question how much time are you really saving?
With Linux you do not have to re-boot very often at all, unlike with versions of Microsoft OS's.
You boot once maybe in the morning - saving max 1 minute in booting time will cost you a lot of work.
The hardware testing seems tedious but compared to the difficulties you would have if you installed new hardware or if you got problems with your file systems, I'd say that slight delay is worth it.
I would definitely say that you should turn off daemons that you don't use - if not for speed then for security reasons. For example, don't have cups and apache running when in fact they aren't being used.
If you think you need to re-boot, check out the telinit command and what sighup does.
What slows down booting are the periodic file system checks and probing for new hardware.
If you really wanted to speed up the boot procedure those would be the two areas to concentrate on - and I would advise against it and pose the question how much time are you really saving?
If you system starts doing a routine fsck you can simply CTRL-c out of it if you don't feel like waiting.
The biggest gains are from not using the huge kernel, turning off services you don't need, and making sure you don't have errors at bootup. If you have trouble getting an IP from DHCP, for instance, that can particularly slow things down.
Of course hacking the init scripts is necessary to go the extra mile, and only you can decide if it is worth it.
Ok, all those hints are exactly what i supposed, to get.
Thanks!
-
-
It is right, that most linux systems are started once and that the little amount of time does not count comparing to the usage of almost a whole day.
-
-
The computer i'm trying to tweak is the one of my cousin.
I tweaked his old wxp up to the most possible performance.
After having still many problems with intrusion and infection by malicious scripts, i decided to lift his mind into the devine spheres of linux.
-
Better for me than coming every three weeks and reinstalling everything!
-
Now he misses the 11 seconds start-up, as he had before with windows.
He uses his computer only for internet, printing, multimedia.
-
So now I have many ideas posted by you and i will try some things first on my slackware before doing this for my cousin.
-
And, it is right, that the DHCP procedure and the udev-triggering take the most time while boot-up.
And, i think, for an usb, i need udev, or not?
You don't have to, but it can make life simpler. I don't recommend bypassing udev/HAL/dbus for your cousin just to boot a little quicker.
This thread, Boot time Slackware and Debian, might interest you as well. It shows an example of speeding up the boot a little by pushing some of the actions to a cron job.
I don't think ldconfig, fc-cache, update-mime-database, or update-desktop-database need to be included in such a "house-cleaning" cron job. These are/can be run as a background process during boot so they should not slow the boot down.
Here is my shortened /etc/cron.daily/house-cleaning
Quote:
#!/bin/sh
# /etc/cron.daily/house-cleaning
# These were taken out of /etc/rc.d/rc.M to speed up the boot
# Update any existing icon cache files:
if find /usr/share/icons 2> /dev/null | grep -q icon-theme.cache ; then
for theme_dir in /usr/share/icons/* ; do
if [ -r ${theme_dir}/icon-theme.cache ]; then
echo "Updating icon-theme.cache in ${theme_dir}..."
/usr/bin/gtk-update-icon-cache -t -f ${theme_dir} 1> /dev/null 2> /dev/nu$
fi
done
# This would be a large file and probably shouldn't be there, but if it is
# then it must be kept updated, too:
if [ -r /usr/share/icons/icon-theme.cache ]; then
echo "Updating icon-theme.cache in /usr/share/icons..."
/usr/bin/gtk-update-icon-cache -t -f /usr/share/icons 1> /dev/null 2> /dev/$
fi
fi
# SCIM and other GTK+ input methods like this file kept updated:
if [ -x /usr/bin/gtk-query-immodules-2.0 ]; then
echo "Updating gtk.immodules: gtk-query-immodules-2.0 > /etc/gtk-2.0/gtk.imm$
/usr/bin/gtk-query-immodules-2.0 > /etc/gtk-2.0/gtk.immodules 2> /dev/null
fi
Doing something like this is particularly useful if you do reboot your computer more than once in a day. Remember that hacked init scripts can get overwritten during a system upgrade if you are not careful.
Now he misses the 11 seconds start-up, as he had before with windows.
Windows really started up in 11 seconds? What version of Windows is that? Is that from hibernation or suspend or is it the true bootup time? Maybe I've just been using old hardware with Windows, but bootup time was nothing like that.
Windows really started up in 11 seconds? What version of Windows is that? Is that from hibernation or suspend or is it the true bootup time? Maybe I've just been using old hardware with Windows, but bootup time was nothing like that.
Windows "boot time" is an illusion because once you login you have to wait for X amount of services to start before you have your full resources to use. In Linux, when the system is booted pretty much everything is already started, so there is no "slow time" right after you log in. This is particularly notable if the Windows installation uses things like Anti-Virus/Spyware, etc software or uses Automatic Updates (or any Auto-Update features).
Windows "boot time" is an illusion because once you login you have to wait for X amount of services to start before you have your full resources to use. In Linux, when the system is booted pretty much everything is already started, so there is no "slow time" right after you log in. This is particularly notable if the Windows installation uses things like Anti-Virus/Spyware, etc software or uses Automatic Updates (or any Auto-Update features).
Very true -- but I don't think any of my Windows systems even got to the desktop in 15 seconds. But I haven't used Windows regularly for a while, so it may have been old hardware just being slow -- but I'm still impressed.
Very true -- but I don't think any of my Windows systems even got to the desktop in 15 seconds. But I haven't used Windows regularly for a while, so it may have been old hardware just being slow -- but I'm still impressed.
Windows XP, for instance, can actually run really well even on old hardware if it is trimmed up nicely. Disabling all unnecessary services (particularly network related ones), disabling unused hardware (drivers), turning off graphical fluff (including systray icons), using static page files on another hdd, and defragging the system at least once a month can do wonders. If you don't need networking at all, you can really cut some stuff out and get even a PIII class computer to boot in about a dozen seconds.
Regardless of all of this, however, you can never cut as much as you can with Linux, because Windows is not truly modular like Linux is. I can get my Slackware system to boot in a few seconds if I want to by simply just hacking the init scripts.
I think the next versions of Windows are moving towards a more modular style, because M$ is realizing not everyone wants bloated software like Vista.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.