[sclug] Where to start troubleshooting machine speed?

Alex Butcher lug at assursys.co.uk
Mon Sep 5 13:44:36 UTC 2005


On Mon, 5 Sep 2005, Darren Davison wrote:

> On Mon, Sep 05, 2005 at 11:45:03AM +0100, Alex Butcher wrote:
>> If the answer to any of those questions is 'no' or 'don't know', you're not
>> performing an apples-to-apples comparison.
>
> The live CD is a good idea, especially as I can't afford to start
> re-installing distros I'm not familiar with on machines I need to use every
> day unfortunately :)

...which was why I suggested it. ;-)

>> Things I would look at:
>>
>> - Disc DMA, interrupt unmasking, 32-bit IO (significant for compilation,
>> amongst other things, I find)
>
> On the laptop:
> hdparm /dev/hda
>
> /dev/hda:
> multcount    = 16 (on)
> IO_support   =  0 (default 16-bit)
> unmaskirq    =  0 (off)
> using_dma    =  1 (on)
> keepsettings =  0 (off)
> readonly     =  0 (off)
> readahead    = 256 (on)
> geometry     = 65535/16/63, sectors = 60011642880, start = 0
>
> hdparm -tT /dev/hda
> /dev/hda:
> Timing cached reads:   2632 MB in  2.00 seconds = 1316.20 MB/sec
> Timing buffered disk reads:   64 MB in  3.15 seconds =  20.33 MB/sec
>
>
> and the desktop:
> hdparm /dev/hda
>
> /dev/hda:
> multcount    = 16 (on)
> IO_support   =  0 (default 16-bit)
> unmaskirq    =  0 (off)
> using_dma    =  1 (on)
> keepsettings =  0 (off)
> readonly     =  0 (off)
> readahead    = 256 (on)
> geometry     = 65535/16/63, sectors = 61492838400, start = 0

hdparm -c1 -u1 -k1 -d1 /dev/hd? on both machines would result in them being
configured "optimally". But, as I understand it, if DMA is being used, then
-u1 and -c1 have no effect, unless DMA gets switched off and the drive
reverts to PIO mode. Regardless, that hdparm command line is standard on all
my machines.

> hdparm -tT /dev/hda
>
> /dev/hda:
> Timing cached reads:   1284 MB in  2.00 seconds = 641.14 MB/sec
> Timing buffered disk reads:   84 MB in  3.05 seconds =  27.57 MB/sec
>
> The cached reads is obviously markedly different there..

Poort cache performance, but better 'real-world' performance, as would be
expected from a desktop drive (probably 7200 RPM) compared with a laptop drive
(probably 4500 or 5400 RPM).

That said, 27MB/s is still a little on the ropey side for a modern disc.

>> - Check physical configuration of desktop machine (e.g. cabling, jumpers)
>> especially if a DIY box (though I've had problems with largeish PC vendors
>> misconfiguring the machines they've sold)
>
> it was custom built for me, do you mean check the cabling is secure or
> actually test there are no faulty cables?  (Probably beyond me other than
> ripping them all out and replacing them)

That, and checking that the drives are all correctly jumpered for
master/slave, and that they're cabled as follows:

<------------------- <= 18" --------------->
|------------------------------|-----------|
Motherboard                  Slave      Master
                           (if present)

Note that the Slave connector on the cable is closer to the Master connector
than the Motherboard connector. These connectors are also colour-coded these
days: <http://www.pcguide.com/ref/hdd/if/ide/confCable80-c.html>.

You may get away with improper cabling, but this is How It Is Supposed To Be
Done according to the ATA spec, so...

>> - X configuration (for X application performance)
>
> virtually identical on both machines in that they both use DRI and permit the
> graphics driver to use an additional 16Mb of system RAM.

OK, so the graphics chipset will be stealing memory bandwidth from the CPU.
Run CPU (and compilation) benchmarks in text mode, in that case.

>> - Booting the laptop's kernel with mem=768M to make its configuration more
>> closely match that of the desktop.
>
> I'll give it a go.
>
>
>> - Comparing CPUs; cache and frontside-bus speed for a start.
>
> differences in the output of cat /proc/cpuinfo are below.
>
> laptop:
> model name      : Intel(R) Pentium(R) M processor 1.70GHz
> stepping        : 6
> cpu MHz         : 1693.182
> cache size      : 2048 KB
> flags           : fpu vme de pse tsc msr mce cx8 sep mtrr pge mca cmov pat
> clflush dts acpi mmx fxsr sse sse2 ss tm pbe est tm2
> bogomips        : 3350.52
>
> desktop:
> model name      : Intel(R) Pentium(R) 4 CPU 2.40GHz
> stepping        : 4
> cpu MHz         : 2412.203
> cache size      : 512 KB
> flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca
> cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm
> bogomips        : 4767.74

The Pentium M is a newer, improved architecture[1] than the plain old Pentium
4. Clock speeds are not directly comparable.

That Pentium M also has four times the cache size of that Pentium 4!

Further, that Pentium 4 may have a 400MHz, 533MHz or 800MHz frontside bus
speed (i.e. directly affecting memory/IO bus performance). The Pentium M has
either a 400Hz or a 533MHz FSB. If the Pentium 4 has a 400MHz FSB and the
Pentium M has a 533MHz FSB, that will be a positive for the Pentium M.

>> HTH,
>> Alex.
>
> yep, gives me plenty to start looking at without feeling that I'm shooting in
> the dark.  Thanks.

Based on what you've told us so far, I'd kinda expect the laptop to be
faster...

[1] Actually, Pentium M is the "old" Pentium III architecture updated to run
with faster clockspeeds and some new instruction sets. The Pentium 4 was
designed to be scaled up to ~6GHz+ but power/heat issues meant that it was
becoming impractical to do so, forcing Intel to fall back to 'plan B'.
-- 
Alex Butcher      Brainbench MVP for Internet Security: www.brainbench.com
Bristol, UK                      Need reliable and secure network systems?
PGP/GnuPG ID:0x271fd950                         <http://www.assursys.com/>


More information about the Sclug mailing list