LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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 10-08-2008, 05:40 PM   #1
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=15, FreeBSD_12{.0|.1}
Posts: 6,263
Blog Entries: 24

Rep: Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194
Very slow Slackware 12.1 on Toshiba Laptop


Hi all, longtime/fulltime Linux user, Mandrake/Mandriva since 7.0.

First time to post.

I am not a distro hopper, but am looking for an alternative to Mandriva 2009 and have pretty much settled on Slackware which I have not run since Slackware 4 (still have the CD set though!).

Anyway, I have Slackware 12.1 installed from DVD on a couple of desktops and am more than pleased with it! I will look no further.

But I am having problems with my main personal laptop - a Toshiba M45/100GB HDD/1GB Ram/1.8Ghz Centrino/CD/DVD... nice machine. I installed Slackware over the 20GB XP partition which I never use anyway and made it dual boot with Mandriva 2006, my main box with which I have been VERY happy. I wanted to work out any config and package problems on the 20GB partition while I continue to use Mdv 2006, then reinstall it to be a mostly Slackware machine.

My problem is that Slackware is very slow on this box and I am about out of things to try to figure out why! In addition to being consistently slower in all things, it also periodically pauses for maybe 1/4 second when under a little more load.

When I say slow, I mean everything is slow - not dead slow but at a crawl compared to Mandriva on the same machine. For example, I compared an FTP transfer of same file to/from one of my Slack desktops from Slack and Mandriva:

Slack: 19.8 sec
Mandriva: 3.2 sec

And it is not just network functions, all apps load and run slower, even things like a recursive directory listing from a terminal just drags compared to Mandriva or my other Slacks boxes. And for terminal operations it makes little difference whether I am in an X terminal or plain text login... still slow.

Using top shows some correlation between the pauses I mentioned and kjournald/pdflush - although they are not actually hogging the CPU, maybe 17% CPU load when it happens.

top also does not show anything using much CPU - it's more like the CPU is just running slow or being blocked for some reason.

dmesg shows no problems that I can see, and I have disabled everything not essential at boot (hald, httpd, pcmcia) and have tried it with and without acpi... huge and generic kernels, all with no effect. It is like gravity, I simply cannot influence it!

I will be glad to supply more system info and dmesg, top output, etc. but did not want to make this post much longer than necessary.

I am in new territory troubleshooting this one and am looking mostly for suggestion of where to look and probably some tools/commands/options that I may not have stumbled over yet.

All help/suggestions appreciated!
 
Old 10-08-2008, 06:13 PM   #2
T3slider
Senior Member
 
Registered: Jul 2007
Distribution: Slackware64-14.1
Posts: 2,367

Rep: Reputation: 843Reputation: 843Reputation: 843Reputation: 843Reputation: 843Reputation: 843Reputation: 843
From CHANGES_AND_HINTS.TXT:
Quote:
Originally Posted by CHANGES_AND_HINTS.TXT
If you notice extremely long wait times when formatting partitions in the
installer, and you're installing on a Thinkpad that has a SATA drive, it's
possible that the wrong driver is being used, which disables DMA on the drive
(and could happen on other machines). A bit more detail about it is here:
http://www.thinkwiki.org/wiki/Proble...stem_hard_disk
Try passing "hda=noprobe" to the kernel when booting the installer, and it
should use the correct libata driver.
I would be willing to bet that's the issue (ie your SATA drive is being detected as an IDE drive) -- however, it could also be something else. Your hard drive *should* be detected as /dev/sda if your drive is indeed SATA (and I believe it is from a quick google search) and NOT /dev/hda. You should try passing "hda=noprobe" to the kernel. You can either reinstall the whole thing and pass "hda=noprobe" to the installer AND add that as a kernel parameter when setting up LILO (it asks if you want to pass any kernel parameters), OR you can modify your /etc/lilo.conf and /etc/fstab files without reinstalling.

[edit]To determine if DMA is enabled, you could check dmesg output or issue `hdparm -I /dev/hda` (assuming your drive is /dev/hda).[/edit]

To modify your lilo.conf file, you should change the "boot = /dev/hda" line (or whatever device it points to) to "boot = /dev/sda" (or wherever your hard drive SHOULD reside). You would also have to change the "root = /dev/hda1" line (assuming your Slackware root partition is /dev/hda1) to "root = /dev/sda1" in your kernel stanza. You would need to add a line like the following to pass the hda=noprobe option:
Code:
append="hda=noprobe"
The you would run `lilo` as root to write to the MBR. However, because /etc/fstab is already setup for /dev/hda1 (assuming that this is the problem, of course), you would need to modify it to point to the correct sda drive. I have never done this myself, so my instructions could be missing something; however, a search of the forums should help -- if this is the problem.

If it's NOT the problem, we will likely need more information.

Last edited by T3slider; 10-08-2008 at 06:17 PM.
 
Old 10-08-2008, 06:14 PM   #3
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656
Have a look at /proc/cpuinfo (you can cat it). If it is anything like my laptop it is not able to throttle the cpu speed up, and it is stuck at the lowest speed which for my laptop is 600MHz.

I ended up needing to build cpu-freq-utils. After this I was able to force my cpu to the proper full speed (1.6GHz).

If you run cpufreq-info, it will give you all the levels that the processor can go to. Then you use cpufreq-set to set the speed. In your case

Code:
cpufreq-set -f 1.8GHz
Hopefully it will be something simple like mine was. If so I can give you info on getting speedscaling to work properly.
 
Old 10-08-2008, 08:21 PM   #4
andrew.46
Senior Member
 
Registered: Oct 2007
Distribution: Slackware
Posts: 1,365

Rep: Reputation: 493Reputation: 493Reputation: 493Reputation: 493Reputation: 493
Hi,

I have been waiting to ask a stupid question about this issue:

Quote:
Originally Posted by T3slider View Post
I would be willing to bet that's the issue (ie your SATA drive is being detected as an IDE drive)
My own laptop was affected by this, and of course the problem was bypassed by passing 'hda=noprobe hdb=noprobe ....' to kernel and appending the same to lilo.conf.

But my question is: Is this a setup problem that has been rectified in updated kernels? A quick look at these forums alone seems to indicate that it is a reasonably commonly found problem.

Andrew
 
Old 10-08-2008, 09:48 PM   #5
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=15, FreeBSD_12{.0|.1}
Posts: 6,263

Original Poster
Blog Entries: 24

Rep: Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194
Thanks T3 - problem solved!

DUH! I had convinced myself it was filesystem related but my drive related troubleshooting must be rusty! I'll call it a much needed refresher and say thanks for the quick and accurate response.

For the benefit of anyone else having this problem:

T3 was correct - if the drive is using the IDE driver it will be mounted as 'hdx', if it is SATA it will be 'sdx' (x is drive order), so if it is an SATA drive and mounts as 'hdx' you need to change it.

Also, you can quicly see if it is using DMA by cat /proc/ide/hda/settings and look for the line using_dma, if the value is zero it is not using DMA.

I fixed it with a few quick edits of lilo.conf and fstab - easy enough. The trick for the faint of heart is to keep your system from becoming unbootable in the process - this provides a safe fallback:

1. Edit your fstab to use LABEL instead of device for the root partition (see man e2label if you do not have labels assigned to your Linux partitions) - then edit /etc/fstab to mount / using the label. This will make the root partition mount immune to the change from 'hdx' to 'sdx'. Double check your edits and reboot to make sure that part works.

2. Edit /etc/lilo.conf and create a new stanza to mount root using the new device name ('sdx') and pass hda=noprobe and root=/dev/sda5 to the kernel (use the correct 'sdx'). Run lilo to install this boot option NOT using initrd then reboot to make sure it works - now you have a bootable system to verify all is well and all your HD partitions are now 'sdx'.

3. You will find that your swap and any other Linux partitions did not mount so edit /etc/fstab once more to change all the 'hdx' to 'sdx' as needed. Now you have a working boot with the right mounts and drivers.

4. When happy with the new boot, edit /etc/lilo one last time to make your normal boot use the correct device, and be sure to pass hda=noprobe in the 'append' line. If using initrd it will remain the same.

That SHOULD allow you to make the switch with a safe fallback boot at each step. Worked for me!

Do not fear LILO, LILO is your friend! And thanks again T3!
 
Old 10-08-2008, 09:53 PM   #6
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=15, FreeBSD_12{.0|.1}
Posts: 6,263

Original Poster
Blog Entries: 24

Rep: Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194
bassmandrigal - Thanks, tell me more...

Thanks for the reply. It turns out that this was not my problem, but in the process of troubleshooting it I read many references to CPU speedscaling.

That is new to me and I always take notes on new things so if you have the time I would appreciate a quick summary of your problem and how it was solved.

Thanks again.
 
Old 10-08-2008, 11:39 PM   #7
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656
Well, the problem I experienced was in the post above. The steps to fix it took awhile to figure out (at least to get it the way I wanted). Unfortunately I am at work, without ssh access to my box, so this will be from memory.

First I needed the cpufreq-utils that I mentioned above. This gives me the programs needed to manually change my speed. However manual speedchanging is not ideal. So I also go and build cpufreq-daemon. This will allow you to setup rules based on power levels. This way you can have it at one speed if it is plugged into power, and varying speeds for certain battery levels.

Here is my conf file

Code:
[Profile]
name=On Demand High
minfreq=600000
maxfreq=1600000
policy=ondemand
[/Profile]

[Profile]
name=On Demand Low
minfreq=600000
maxfreq=1000000
policy=ondemand
[/Profile]

[Profile]
name=Performance High
minfreq=1600000
maxfreq=1600000
policy=performance
[/Profile]

[Profile]
name=Powersave Low
minfreq=600000
maxfreq=600000
policy=powersave
[/Profile]

# Full Power when plugged in
[Rule]
name=AC Rule
ac=on                    # (on/off)
profile=Performance High
[/Rule]

# lowest speed when batt is 0-20%
[Rule]
name=AC Off - Low Battery
ac=off                   # (on/off)
battery_interval=0-20
profile=Powersave Low
[/Rule]

# only go up to 1GHz when needed batt 20-50%
[Rule]
name=AC Off - Medium Battery
ac=off                   # (on/off)
battery_interval=20-50
profile=On Demand Low
[/Rule]

# until battery is 50% allow full speed throtling
[Rule]
name=AC Off - High Power
ac=off                   # (on/off)
battery_interval=50-100
profile=On Demand High
[/Rule]
I had this on my website, but I don't have my rc.local (with the various modprobes) or where the actual conf file goes. But the above works great for me. One complaint some people may have, is while it is plugged in I have the min and max speed set to 1.6GHz. Initially it was because a couple of years ago, the whole on-demand thing didn't work very well, and I have just gotten used to it, but the conf file is fairly straightforward and really easy to tailor to your needs.

Hope this helps.
 
Old 10-10-2008, 03:37 AM   #8
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=15, FreeBSD_12{.0|.1}
Posts: 6,263

Original Poster
Blog Entries: 24

Rep: Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194
Thanks bassmadrigal

Thanlks in advance for any future trouble that I may now avoid!
 
Old 10-11-2008, 09:29 PM   #9
arniekat
LQ Newbie
 
Registered: Oct 2008
Location: Round Rock, TX
Distribution: Slackware 14.2
Posts: 18
Blog Entries: 66

Rep: Reputation: 6
DMA Acceleration on Toshiba Laptop

I am posting to this because I had a similar problem and I also have several Toshiba laptops. Mine has a SATA drive and an Intel IDE DVD-ROM controller. When I tried to load Slackware 12.1, the hard drive was detected as 'hda' and the DVD as 'hdc'. No DMA on either. I could not play DVD's and file transfers were SLOW. In order to force the kernel to use the SATA driver, you have to tell the kernel not to probe 'hda' so it will allow the SATA driver to detect the drive. I did it by passing a hard drive boot parameter before I went on with the install. The boot parameter is "hda=noprobe" like in the above post. It detected the SATA drives as 'sda' and had DMA enabled and installed Slackware very quickly. After the installation, when you're configuring lilo and the installer asks if you want to pass boot parameters, I added this:
hda=noprobe hdc=noprobe libata.atapi_enabled=1
The part after hdc=noprobe specifically tells the kernel which driver to use for my DVD-ROM so it will have DMA. The complete line in lilo.conf file looks like this:
append="hda=noprobe hdc=noprobe libata.atapi_enabled=1"
It became device sr0 with DMA enabled (from dmesg) instead of hdc.
 
Old 10-27-2008, 10:36 AM   #10
iaf
LQ Newbie
 
Registered: Jun 2006
Posts: 7

Rep: Reputation: 0
Thumbs up DMA Acceleration on Dell Laptops

I experienced the same problem with Dell Latitude D620 laptops (SATA drives being recognised as IDE drives during Slackware 12.1 install). arniekat's fix (above) worked like a charm.
 
  


Reply



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
Toshiba A210 Laptop - Volume Control Wheel in Slackware BobNutfield Linux - Hardware 5 09-05-2008 12:40 PM
Problems installing Chicony USB 2.0 camera in Toshiba Laptop - Distro: Slackware 12 caduqued Linux - Laptop and Netbook 8 04-16-2008 01:58 PM
Problems installing Chicony USB 2.0 camera in Toshiba Laptop - Distro: Slackware 12 caduqued Linux - Desktop 1 04-11-2008 07:50 AM
Logging in/off too slow in Fedora 8 on Toshiba P4 laptop srirohit Linux - Newbie 3 01-15-2008 03:18 AM
Slackware 11 on Toshiba laptop - udev, speedstep? ak-87 Slackware 20 06-01-2007 06:06 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 08:15 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration