LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   How to Optimize Slackware 10.2? (https://www.linuxquestions.org/questions/slackware-14/how-to-optimize-slackware-10-2-a-369220/)

zeroz52 10-02-2005 10:21 PM

How to Optimize Slackware 10.2?
 
Hey all I'm new to Slackware (10.2) and want to do some "tweaking/optimizing" of my system. I haven't optimized a distro before or played around much. Can somone point me to a good how to guide or something. I'm worried I'll screw something up :eek: For instance, I also have Vector Linux installed and did a boot time to the login between the 2 and Vector beat my full install of slack 10.2 by 26sec. I'm not looking to have the fastest thing alive. I just want my slack to be working at it's full potential.

Thanks for any help or advice you may have.

Cheers

Penguin of Wonder 10-02-2005 11:58 PM

i'll be honest, i can't answer your question. but i hope someone else can because i'd like to see that guide myself

Yalla-One 10-03-2005 01:49 AM

If you still have Vector Linux installed, it might be interesting to compare the startup scripts in /etc/rc.d to see how Vector speeds up the boot process (and at which cost)

I normally divide quite clearly between bootup optimization and runtime optimization, with the latter being the most important since I hardly ever at all reboot my system.

Some performance tuning I have done (in no particular order), and i encourage others to supplement this list so we might get a full-blown Slacware performance tweaking guide :)

Boot performance

1. Edit /etc/rc.d/rc.pcmcia and replace PCIC=probe with the uncommented driver for your card. You can find out which card you have by running lsmod or dmesg. My experience is that most use YENTA, but you want to verify this.

2. Experimental make ldconfig run in the background (edit /etc/rc.d/rc.M) by adding & behind /sbin/ldconfig (/sbin/ldconfig &)

Run-time performance

1. Tweaking harddrive with hdparm. If your disk supports it, set your harddisk to 32bit mode rather than 16-bit, and enable multcount. You definitely want to make sure that DMA is enabled (if you support it ofcourse)

hmm - that's all for now - I'd welcome more points to this list as it's not very long yet...

-Y1

zeroz52 10-03-2005 07:51 AM

Thanks for the reply Yalla. That is a very good idea regarding comparing the script in Vector to what Slackware has. Have you ever compilied your kernel for your system. Doing that should help alot, right?

Anyone that has little tips or tricks please post them. Even post what not to do, as I'm sure those of us new to the world of Slack could run into the same problem unless we are on the lookout for it.

BroX 10-03-2005 07:59 AM

Easiest thing to do is disable running of services in /etc/rc.d/ that you don't need. E.g.
Code:

chmod -x /etc/rc.d/rc.pcmcia
Cheers, Leon.

Yalla-One 10-03-2005 08:00 AM

I certainly recommend recompiling a custom kernel specifically for your equipment. Also make sure you get the right optimizations in, such as preemt.

There's a debate ongoing on what's fastest - using modules or static - I gave up on that discussion long ago and went with static which has served me fine since I know exactly what's needed on my PC. (That's a bold statement, but it took me about 6 months of fine-reading about kernels in general, my system specifically and an equal amount of trial and error to get there)

-Y1

zeroz52 10-03-2005 08:27 AM

LJSBrokken,

chmod -x /etc/rc.d/rc.pcmcia

Does the -x remove it from the list or just disable it at startup?

"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""

Yalla,


What is preemt? Any recommended reads on kernel info? Not on how to compile it as I know there is lots of info on that on these forums.


Thanks

weimond 10-03-2005 08:32 AM

-x makes it not executable

Penguin of Wonder 10-03-2005 08:32 AM

Maybe i'm just seeing things, but the pcmcia tweak really seemed to help. Slackware lags a bit on my computer with KDE, even with the 'eye-candy' close to being turned off, but its not as bad as before.

Yalla-One 10-03-2005 08:34 AM

I'll risk answering for LJSBrokken as well ;) the chmod -x just makes it non-executable, which means the file is still there, but doesn't run as boot.
Don't do that if you have a PCMCIA card reader in your system (most laptops do) though, as it'll leave your PCMCIA devices unusable :)

The preempt is a way the scheduler works in the kernel to juggle the different tasks etc.

My only, but strong, recommendation is to set aside a couple of hours, sit down with "make menuconfig" and read through *ALL* the help pages. Then you'll find the schedulers, the filesystems, the disk controllers, the frequencies etc etc, and once you've read it (combined with an output of "lspci -v" to see what hardware you have, you can make a killer-kernel that's super-fast custom made for your system

-Y1

zeroz52 10-03-2005 08:46 AM

Thanks Yalla for all your info, it is greatly appreciated. I will be giving that a real good read then. I don't need the PCMCIA as I don't have a laptop or any of those devices in my system. I built my system so I know exactly what I have in it so hopely that should help me out some. One thing that seems to take forever when I'm booting 10.2 is the "hotplugging" search at boot-up. Vector has the same but it takes a fraction of the time. How useful is this feature? Any thoughts?

Thanks

maginotjr 10-03-2005 08:47 AM

one thing that realy makes the boot slowdown is the ldconfig command... this command is something that doesnt need to be started every boot, or at least dont need to be in the boot, can be 5 min later in background where will make no diference in the system perfomance and the system will be already booted...

if im not wrong you will find it on /etc/rc.d/rc.M

is that line the make ldconfig start.. . you just need to comment the command line with a # and right other new line with the follow
echo "ldconfig" | at now +5min

before this make "which at" so you can get the full path to the command and write it on the line above (for eg. /usr/sbin/at now +5min)

[ ]´s

kornerr 10-03-2005 10:02 AM

Slackware Essentials 2 will help you a lot!

Have a good reading.

Janusz11 10-03-2005 12:43 PM

Ah, good thread! Keep it going lads, I'm also very interested in this topic! :)

chess 10-03-2005 12:53 PM

Quote:

Originally posted by maginotjr
one thing that realy makes the boot slowdown is the ldconfig command... this command is something that doesnt need to be started every boot, or at least dont need to be in the boot, can be 5 min later in background where will make no diference in the system perfomance and the system will be already booted...

if im not wrong you will find it on /etc/rc.d/rc.M

is that line the make ldconfig start.. . you just need to comment the command line with a # and right other new line with the follow
echo "ldconfig" | at now +5min

before this make "which at" so you can get the full path to the command and write it on the line above (for eg. /usr/sbin/at now +5min)

[ ]´s

Thanks for this -- I am going to try it when I get home tonight. The ldconfig is the slowest part by far for my boot process as well, so if it can be backgrounded that would be great.

Good thread.

zeroz52 10-03-2005 12:54 PM

Keep it coming all, this is great information. Maybe even "Sticky" worthy if we get enough info. Every lil bit helps us Slack n00bs like myself and is probably worthwhile info for even you pros out there. :study:

Theta13579 10-03-2005 12:59 PM

Re: How to Optimize Slackware 10.2?
 
I smell a, KERNEL COMPILE!!!!

http://www.kernel.org/

KMcD 10-03-2005 01:04 PM

If you're really going for speed a 2.6.x kernel would be a better bet then a 2.4.x kernel. Don't worry, they are very stable now, once you get a config working for your system you can reuse this for every recompile and tweak as necessary for any new features you'd like to add (or old ones to remove). You could also try using some patchsets. I use the nitro patchset, get it here (search for nitro)

Vgui 10-03-2005 03:31 PM

Good recommendations up above, I really recommend tweaking as much as you can with hdparm. Of course you'll want to track running processes to see if you can shut some down (both for speed, memory, and security reasons).
Another thing I recommend is doing an optimized compile of some software. The pre-built packages from the Slackware site are nice, but most of the time I use them as a last resort. My first idea when installing software is to compile it with correct CHOST, CFLAGS, etc. set. Then use checkinstall to create a package so you can still keep everything organized. I find that compiling a few heavily used components (bash, alsa*, applications, etc.) really helps with speed (even if it is just placebo affect). Slackware is i486 (or was it i386) optimized, whereas 99% of modern computers are i686 based. Look up some gentoo guides or the like on how to set useful flags for your system. The other benefit of compiling is you can remove things you don't need (like alternative languages, desktop integration for a wm you aren't using, etc.).

EDIT: Another thing is to use a fast file system. I personally switched from ext2 to reiserfs3 and it felt a lot faster for read / write.

chess 10-03-2005 07:18 PM

Quote:

Originally posted by maginotjr
one thing that realy makes the boot slowdown is the ldconfig command... this command is something that doesnt need to be started every boot, or at least dont need to be in the boot, can be 5 min later in background where will make no diference in the system perfomance and the system will be already booted...

if im not wrong you will find it on /etc/rc.d/rc.M
...

[ ]�s

...
I tried doing this by editing /etc/rc.d/rc.M as follows:

#Update all the shared library links:
if [ -x /sbin/ldconfig ]; then
echo "Updating shared library links: /sbin/idconfig"
# /sbin/ldconfig
echo "/sbin/ldconfig" | /usr/bin/at now +5min
fi

The changes are in bold. On boot, I got these messages:

...
Updating shared library links: /sbin/ldconfig
warning: commands will be executed using (in order) a) $SHELL b) login shell c) /bin/sh
job 2 at 2005-10-03 20:20
Can't open /var/run/atd.pid to signal atd. No atd running?
...

? What the heck does that mean? The "Warning" line seems ok, but what about the "/var/run/atd.pid"?

shilo 10-04-2005 12:03 AM

Re: How to Optimize Slackware 10.2?
 
Quote:

Originally posted by zeroz52
Hey all I'm new to Slackware (10.2) and want to do some "tweaking/optimizing" of my system.
<SNIP>
I'm worried I'll screw something up

Totally different tact than the other replies (though they can all still be used with my idea). If you are running Slackware Dual-boot, change to triple-boot. If Slackware is all that you have, change to dual boot. The other distro to install? Slackware!!! DON'T share anything (partitions) between the two Slackware installs.

Now you are all set. You've got Slackware (1) for your everyday computer. You've got Slackware (2) for your, "Hey, I'm gonna try this crazy tweak/optimization idea out, and if it doesn't work, I'll just re-install and lose nothing" computer.

This is one of the best way to go about tweaking. You can boot between the two for comparisons. You aren't worried about breaking anything, because repairs are only a re-install away. Also, you aren't wondering so much' "Is this REALLY faster, or is it just my imagination?" You have a stock install to compare to.

There are more benefits. Did you break your installation? No need for a Rescue CD. You can boot the working install, and a little bit of mount (and maybe chroot) magic later, you are back to working. Want more benefits?

You can keep one as a "clean" install so that packages built for others are more likely to actually work for them.

You can test out version upgrades without worry.

You can learn kernel compiling with less worry (one of your systems should always be working).

You can test new software versions out without worrying so much ("Hey, wonder if that Xorg CVS is any better on my system")

You aren't afraid to try out BIG changes ("Someone said recompiling glibc for i686 is a good idea," or " whould Slackware run better if I recompiled EVERY package i686, and used 2.6 kernel headers?")

You feel more comfortable removing packages ("Do I really need that bison package")

You aren't worried about not running services ("Can I safely 'chmod -x etc/rc.d/rc.portmap'?")

You have a place to build new packages ("Is this program going to honor 'DESTDIR=' or am I gonna get a mess in my / ?")

So, in summary, the quickest way to learn about tweaking/optimizing Slackware is to have an install that you don't care about. No specific stuff for you, but you will learn much nore quickly if you know that any mistakes can be fixed by re-installing. A side-benefit is that you will learn to install Slackware VERY quickly.

Penguin of Wonder 10-04-2005 01:07 AM

The first time I installed slack I used the fat system. I now use the reiserfs3 system. It's not even funny how much better it is, though it still makes me laugh when i say that.

zeroz52 10-04-2005 10:30 AM

Thanks for the Reply Shilo! That is exactly what I ended up doing. I have a base install and another base install that I'm going to use to test out ideas ect with. When you say "DON'T share anything (partitions) between the two Slackware installs." Do you mean to have a seperate /swap, /, and /home or just seperate / and /home? Thanks.

drumz 10-04-2005 06:42 PM

Swap can be shared because it gets erased on every reboot. It's just virtual memory.


All times are GMT -5. The time now is 12:39 AM.