Re: [gentoo-user] Performance problem (slow hard drive?)

2005-04-06 Thread Volker Armin Hemmann
On Wednesday 06 April 2005 04:03, Ow Mun Heng wrote:
 On Mon, 2005-04-04 at 17:35 +0200, Volker Armin Hemmann wrote:
   I also experimented
  a little bit with swsusp (without much success),

 try suspend2 then.. 15 secs from running to hibernate

thanks, swsusp also shut down my box in less than 30 sec, but was never able 
to recover it. So .. I stoped experimenting and do clean boots ... at least 
hw-faults are showing up fast this way.
--
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] Performance problem (slow hard drive?)

2005-04-05 Thread Richard Fish
Shawn Singh wrote:

One thing that I noticed with my installs of Linux is that different
filesystems seem to perform differently...ie. my installst that are
using Reiserfs seem to have quicker reads and writes than my installs
that are using ext2 or ext3...
  


Indeed.  I just converted my root filesystem from xfs to reiserfs 3.6. 
My root filesystem contains ~375000 files, and scanning that many files
with xfs took a bit over 10 minutes.  It takes less than 6 minutes with
reiserfs.

-Richard


--
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] Performance problem (slow hard drive?)

2005-04-05 Thread Ow Mun Heng
On Mon, 2005-04-04 at 17:35 +0200, Volker Armin Hemmann wrote:
  I also experimented 
 a little bit with swsusp (without much success),

try suspend2 then.. 15 secs from running to hibernate

-- 
Ow Mun Heng
Gentoo/Linux on DELL D600 1.4Ghz 
98% Microsoft(tm) Free!! 
Neuromancer 10:03:05 up 1 day, 13:58, 5 users, load average: 0.15, 0.29,
0.27 


--
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] Performance problem (slow hard drive?)

2005-04-04 Thread Covington, Chris
 I've been experiencing performance problems in my laptop 
 (Acer Aspire 1522WLMi). 

How much memory (RAM) do you have?  That could be the bottleneck.

---
Chris Covington
IT
Plus One Health Management
75 Maiden Lane Suite 801
NY, NY 10038
646-312-6269
http://www.plusoneactive.com 

--
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] Performance problem (slow hard drive?)

2005-04-04 Thread Jan Han Xie
On Monday 04 April 2005 16:55, Jose Gonzalez Gomez wrote:
 Hi there,

 I've been experiencing performance problems in my laptop (Acer Aspire
 1522WLMi). I have the feeling that the problem is related to hard
 drive performance, as whenever I do some I/O intensive task (mainly
 tested compiling Java code) my system performance goes down, and
 switching to any other application takes a lot (hard drive performance
 problem while doing swapping?). I hasn't been able to solve it,
 although I've read doco and tried tweaking the hd peformance with
 hdparm.

 Here is the info for my system, notice the unknown devices in lspci
 output (any missing driver in kernel?) and the BuffType=unknown,
 BuffSize=0kB in hdparm output (is my hard drive using its 8Mb
 internal buffer???):

 Portage 2.0.51.19 (default-linux/amd64/2004.3, gcc-3.4.2,
 glibc-2.3.4.20041102-r1, 2.6.9-gentoo-r14 x86_64)
 System uname: 2.6.9-gentoo-r14 x86_64 AMD Athlon(tm) 64 Processor 3000+

 packet root # lspci
 :00:00.0 Host bridge: VIA Technologies, Inc.: Unknown device 0204
 :00:00.1 Host bridge: VIA Technologies, Inc.: Unknown device 1204
 :00:00.2 Host bridge: VIA Technologies, Inc.: Unknown device 2204
 :00:00.3 Host bridge: VIA Technologies, Inc. K8M800
 :00:00.4 Host bridge: VIA Technologies, Inc.: Unknown device 4204
 :00:00.7 Host bridge: VIA Technologies, Inc. K8M800
 :00:01.0 PCI bridge: VIA Technologies, Inc. VT8237 PCI bridge [K8T800
 South] :00:0a.0 Ethernet controller: Linksys, A Division of Cisco
 Systems [AirConn] INPROCOMM IPN 2220 Wireless LAN Adapter (rev 01)
 :00:0b.0 CardBus bridge: Texas Instruments PCI7420 CardBus Controller
 :00:0b.1 CardBus bridge: Texas Instruments PCI7420 CardBus Controller
 :00:0b.2 FireWire (IEEE 1394): Texas Instruments PCI7x20
 1394a-2000 OHCI Two-Port PHY/Link-Layer Controller
 :00:0c.0 Ethernet controller: Realtek Semiconductor Co., Ltd.
 RTL-8169 Gigabit Ethernet (rev 10)
 :00:10.0 USB Controller: VIA Technologies, Inc. VT82x UHCI USB
 1.1 Controller (rev 80)
 :00:10.1 USB Controller: VIA Technologies, Inc. VT82x UHCI USB
 1.1 Controller (rev 80)
 :00:10.2 USB Controller: VIA Technologies, Inc. VT82x UHCI USB
 1.1 Controller (rev 80)
 :00:10.3 USB Controller: VIA Technologies, Inc. USB 2.0 (rev 82)
 :00:11.0 ISA bridge: VIA Technologies, Inc. VT8235 ISA Bridge
 :00:11.1 IDE interface: VIA Technologies, Inc.
 VT82C586A/B/VT82C686/A/B/VT823x/A/C PIPC Bus Master IDE (rev 06)
 :00:11.5 Multimedia audio controller: VIA Technologies, Inc.
 VT8233/A/8235/8237 AC97 Audio Controller (rev 50)
 :00:11.6 Communication controller: VIA Technologies, Inc. AC'97
 Modem Controller (rev 80)
 :00:18.0 Host bridge: Advanced Micro Devices [AMD] K8
 [Athlon64/Opteron] HyperTransport Technology Configuration
 :00:18.1 Host bridge: Advanced Micro Devices [AMD] K8
 [Athlon64/Opteron] Address Map
 :00:18.2 Host bridge: Advanced Micro Devices [AMD] K8
 [Athlon64/Opteron] DRAM Controller
 :00:18.3 Host bridge: Advanced Micro Devices [AMD] K8
 [Athlon64/Opteron] Miscellaneous Control
 :01:00.0 VGA compatible controller: nVidia Corporation NV36
 [GeForce FX Go5700] (rev a1)

 packet root # grep VIA /usr/src/linux/.config
 CONFIG_BLK_DEV_VIA82CXXX=y
 CONFIG_SCSI_SATA_VIA=m
 CONFIG_VIA_RHINE=m
 # CONFIG_VIA_RHINE_MMIO is not set
 # CONFIG_VIA_VELOCITY is not set
 # CONFIG_I2C_VIA is not set
 CONFIG_I2C_VIAPRO=m
 CONFIG_SENSORS_VIA686A=m

 packet root # hdparm -vid /dev/hda

 /dev/hda:
  multcount= 16 (on)
  IO_support   =  1 (32-bit)
  unmaskirq=  1 (on)
  using_dma=  1 (on)
  keepsettings =  0 (off)
  readonly =  0 (off)
  readahead= 256 (on)
  geometry = 65535/16/63, sectors = 80026361856, start = 0

  Model=TOSHIBA MK8025GAS, FwRev=KA023A, SerialNo=74631490S
  Config={ Fixed }
  RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=48
  BuffType=unknown, BuffSize=0kB, MaxMultSect=16, MultSect=16
  CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=156301488
  IORDY=on/off, tPIO={min:120,w/IORDY:120}, tDMA={min:120,rec:120}
  PIO modes:  pio0 pio1 pio2 pio3 pio4
  DMA modes:  sdma0 sdma1 sdma2 mdma0 mdma1 mdma2
  UDMA modes: udma0 udma1 udma2 udma3 udma4 *udma5
  AdvancedPM=yes: unknown setting WriteCache=enabled
  Drive conforms to: device does not report version:

  * signifies the current active mode

 packet root # hdparm -tT /dev/hda

 /dev/hda:
  Timing cached reads:   2216 MB in  2.00 seconds = 1107.06 MB/sec
  Timing buffered disk reads:   76 MB in  3.03 seconds =  25.06 MB/sec


 Any suggestions?

 Thanks in advance, best regards
 Jose
 --
 gentoo-user@gentoo.org mailing list

I think your hd is not slow from your hdparm -tT result.
And hdparm often says unknown type of cache, it doesn't matter.

-- 
Regards,
Jan

Computer Science  Engineering Department,
College of Computer Science, Zhejiang University,
Hangzhou, China


pgpo3otC5dWSj.pgp
Description: PGP signature


Re: [gentoo-user] Performance problem (slow hard drive?)

2005-04-04 Thread Volker Armin Hemmann
Hi,

On Monday 04 April 2005 10:55, Jose Gonzalez Gomez wrote:
 Hi there,

 I've been experiencing performance problems in my laptop (Acer Aspire
 1522WLMi). I have the feeling that the problem is related to hard
 drive performance, as whenever I do some I/O intensive task (mainly
 tested compiling Java code) my system performance goes down, and
 switching to any other application takes a lot (hard drive performance
 problem while doing swapping?). I hasn't been able to solve it,
 although I've read doco and tried tweaking the hd peformance with
 hdparm.

swap is incredibly slow on linux. As soon as you are hitting swap, your box is 
dead slow.

And this is not, because the swapping mechanism is stupid (it seems to be 
stupid for me, because it always swaps out the wrong things), but because how 
it reads the data back (if I remember right, there were some discussions on 
lkml in january and february about low swap performance).

For example:
I have 512mb ram, and this is enough. Really. But to be safe, I have 1gig 
swap.

So, I have KDE 3.4 with a lot of eye-candy running, some konqueror-windows 
with tabs, kmail, swap is not used.

I download BIGFILE (like some linux-isos), suddenly KDE is dead slow. Ok, the 
harddisk is doing a lot of stuff, so it is normal for everything that wants 
to load something is slow, but hey, the download has ended, BIGFILE lies 
around on my harddisk, but KDE is still mostly swapped out and the 
cachesbuffers are huge(Reducing swappiness to 10 does not help)? What is 
that? And why does it not get better over the next minutes/hours?

How do I get my performance back? Easy: swapoff -a  swapon -a and bingo, KDE 
is lighting fast again.

Something is very broken in swapland, but at least the workaround is easy ...















--
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] Performance problem (slow hard drive?)

2005-04-04 Thread Volker Armin Hemmann
Hi,
On Monday 04 April 2005 17:24, Christoph Gysin wrote:
 Volker Armin Hemmann wrote:
  How do I get my performance back? Easy: swapoff -a  swapon -a and
  bingo, KDE is lighting fast again.

 What about not using swap at all? With 1 gig RAM on your desktop machine,
 are you ever going to fill up your RAM entirely? If swapping on linux
 sucks, disable it.

 Of course this is not recommended on a production server ;-)

 Christoph

because when I compile HUGEAPP I sometimes need some swap. I also experimented 
a little bit with swsusp (without much success), and I think it is better to 
have a slowdown, than the oom-killer killing the wrong app ...

--
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] Performance problem (slow hard drive?)

2005-04-04 Thread Graham Murray
Volker Armin Hemmann [EMAIL PROTECTED] writes:

 swap is incredibly slow on linux. As soon as you are hitting swap, your box 
 is 
 dead slow.

It is not just swap which causes the system to become slow. I find
that it does the same when running 'emerge sync' and vmstat shows no
or only very light swap activity. Yet top shows 80% (often in the
upper 95-98%) CPU in 'Wait for I/O'. My hard disks have DMA enabled
and 'hdparm -i' shows they are all using UDMA4, so why should the I/O
be consuming so much CPU? I would expect it to just start the disk
transfers then suspend the process (waiting for the DMA transfer to
complete) and allocate the CPU to running another process which is not
waiting for disk I/O.
--
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] Performance problem (slow hard drive?)

2005-04-04 Thread Hans-Werner Hilse
Hi,

On Mon, 4 Apr 2005 10:55:24 +0200 Jose Gonzalez Gomez
[EMAIL PROTECTED] wrote:

 I've been experiencing performance problems in my laptop (Acer Aspire
 1522WLMi). I have the feeling that the problem is related to hard
 drive performance, as whenever I do some I/O intensive task (mainly
 tested compiling Java code) my system performance goes down, and
 switching to any other application takes a lot (hard drive performance
 problem while doing swapping?). I hasn't been able to solve it,
 although I've read doco and tried tweaking the hd peformance with
 hdparm.

Do you have
- preemption enabled for that kernel (should allow to switch apps faster
when swapping is in progress)
- some logical layers between the hard disk and the swap device (DM, other
block dev abstractions, file system...)?
- enabled a _reasonable_ io scheduler for the kernel?
- some memory eaters running (UML, VMware...)?
- checked if thermal throttling may cause that?

HWH

-- 
This message is made of 100% recycled bits and bytes!
--
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] Performance problem (slow hard drive?)

2005-04-04 Thread Jose Gonzalez Gomez
On Apr 4, 2005 5:49 PM, Hans-Werner Hilse [EMAIL PROTECTED] wrote:
 Hi,
 
 On Mon, 4 Apr 2005 10:55:24 +0200 Jose Gonzalez Gomez
 [EMAIL PROTECTED] wrote:
 
  I've been experiencing performance problems in my laptop (Acer Aspire
  1522WLMi). I have the feeling that the problem is related to hard
  drive performance, as whenever I do some I/O intensive task (mainly
  tested compiling Java code) my system performance goes down, and
  switching to any other application takes a lot (hard drive performance
  problem while doing swapping?). I hasn't been able to solve it,
  although I've read doco and tried tweaking the hd peformance with
  hdparm.
 
 Do you have
 - preemption enabled for that kernel (should allow to switch apps faster
 when swapping is in progress)

No, I'll try to enable it...

 - some logical layers between the hard disk and the swap device (DM, other
 block dev abstractions, file system...)?

No that I'm aware off, just followed the handbook, so I have a
dedicated swap partition.

 - enabled a _reasonable_ io scheduler for the kernel?

Where can I check that? Any kernel option?

 - some memory eaters running (UML, VMware...)?

Do you consider several Java virtual machines a memory eater? ;o) If
yes then I guess so... I have a JBoss server running, Eclipse, and I
use Maven to compile and deploy my Java (J2EE) application

 - checked if thermal throttling may cause that?

Umm... no, but I didn't think of that as I always noticed disk
activity whenever my system slowed down...

 
 HWH
--
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] Performance problem (slow hard drive?)

2005-04-04 Thread Ivan Yosifov
Try setting vm.swappiness = 0 in /etc/sysctl.conf . The default is 60.
The smaller the value, the more reluctant the kernel will be to swap.
Range is 0...100 .

On Mon, 2005-04-04 at 17:35 +0200, Volker Armin Hemmann wrote:
 Hi,
 On Monday 04 April 2005 17:24, Christoph Gysin wrote:
  Volker Armin Hemmann wrote:
   How do I get my performance back? Easy: swapoff -a  swapon -a and
   bingo, KDE is lighting fast again.
 
  What about not using swap at all? With 1 gig RAM on your desktop machine,
  are you ever going to fill up your RAM entirely? If swapping on linux
  sucks, disable it.
 
  Of course this is not recommended on a production server ;-)
 
  Christoph
 
 because when I compile HUGEAPP I sometimes need some swap. I also 
 experimented 
 a little bit with swsusp (without much success), and I think it is better to 
 have a slowdown, than the oom-killer killing the wrong app ...
 
 --
 gentoo-user@gentoo.org mailing list
 
 
-- 
Ivan Yosifov.

--
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] Performance problem (slow hard drive?)

2005-04-04 Thread Richard Fish
Jose Gonzalez Gomez wrote:

packet root # hdparm -tT /dev/hda

/dev/hda:
 Timing cached reads:   2216 MB in  2.00 seconds = 1107.06 MB/sec
 Timing buffered disk reads:   76 MB in  3.03 seconds =  25.06 MB/sec
  


Unfortunately, disk throughput is an almost useless measure of
performance for your situation.  This is because it is really the
average seek time that is killing you, not throughput.  And that toshiba
drive is running at 4200rpm, with an average seek time of ~19ms.  Or put
in other words, that means your performance when needing to access
different areas of the disk simultaneously (for example, the kernel
swapping memory while an app is trying to read or write files) is about
50 IOs/sec.

My suggestions (in order of least to most expensive):

1. Play with the 'swappiness' parameter (google it).

2. Reduce the amount of swap, and make sure it is located adjacent to
your root partition (or, if you use a /usr partition, put it next to /usr).

3. Partition your disk, if you don't already.  Making partitions helps
to keep related files close together, reducing the time it takes to seek
from one to the other, and reduces the effect of fragmentation in
Linux.  If you don't need all 80GB, you could even leave the last 20-30%
unallocated, which is typically the worst performing section of the disk
(for throughput).

4. Purchase a new disk.  The 60GB 7200rpm Hitachi disks are the fastest
disks available for a laptop today, with an average seek time of ~14ms.

5. Upgrade memory (1G recommended).

A word on partitioning: I have 2 of those Hitachi disks in my laptop, in
a raid0 configuration.  After a small boot partition, swap (2G) is the
next thing on the disks, followed by 20G of root, followed by 5G of var,
2G of tmp, and 50G of home.  The last 32G of the array is not allocated
to anything in particular.  With 2 processes accessing root  swap, I
run over 120 IOs/sec.  If those same two processes have to randomly
access the entire array, the performance drops to 94 IOs/sec.

Hope this helps.

-Richard

--
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] Performance problem (slow hard drive?)

2005-04-04 Thread Richard Fish
Graham Murray wrote:

It is not just swap which causes the system to become slow. I find
that it does the same when running 'emerge sync' and vmstat shows no
or only very light swap activity. Yet top shows 80% (often in the
upper 95-98%) CPU in 'Wait for I/O'. My hard disks have DMA enabled
and 'hdparm -i' shows they are all using UDMA4, so why should the I/O
be consuming so much CPU? I would expect it to just start the disk
transfers then suspend the process (waiting for the DMA transfer to
complete) and allocate the CPU to running another process which is not
waiting for disk I/O.


My understanding of the 'wait for I/O' (WIO) state is that it _doesn't_
consume CPU cycles.  That is, if I run a process (like dd if=/dev/hda
of=/dev/null bs=32k), if the IO is really consuming CPU cycles, then the
CPU should not be in an idle loop and I should notice my CPU fans spin
up and extra heat coming from my laptop.  This doesn't happen, even
though my system shows 80% WIO.

However, if while that dd command is running, I also start gzip -9
/dev/urandom /dev/null, the gzip command consumes 90% of the CPU,
taking over all of the time that was previously in WIO.   So I am pretty
sure that other processes are able to use the processor while in the WIO
state.  I think it is just and indication that the processor has been
idled, because anything that would like to run cannot due to needing IO
to complete.

That said, the system will seem slow, because almost everything has to
do _some_ IO to the disk to be useful.  And swapping even a few pages
in/out would delay the whole system.

-Richard
--
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] Performance problem (slow hard drive?)

2005-04-04 Thread Volker Armin Hemmann
On Monday 04 April 2005 21:34, Ivan Yosifov wrote:
 Try setting vm.swappiness = 0 in /etc/sysctl.conf . The default is 60.
 The smaller the value, the more reluctant the kernel will be to swap.
 Range is 0...100 .

thanks, I know about swappiness:
energy portage # cat /proc/sys/vm/swappiness
10


10 is not much better than 60, but 100 is much worse.

The problem is not swapping itself, it is, that always the wrong stuff ends in 
the swapspace and it is so dead slow, as if every single bit is personally 
transfered first class, before the next on is going over the cable ...
--
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] Performance problem (slow hard drive?)

2005-04-04 Thread Volker Armin Hemmann
On Monday 04 April 2005 17:31, Jose Gonzalez Gomez wrote:


 I'm developing in Java/J2EE using Eclipse, Maven, JBoss and KDE, with
 512Mb of main memory and 1Gb of swap. Assuming this is the problem, is
 there any other solution than buying a 1Gb memory module and throwing
 away one of my 256Mb modules (I have no free slot)??? Can't the swap
 performance be improved in any way?

hm, you could search your favorite lkml-archive for 'swap' and 
'performance' .. there were some patches in the last 4 month, but I do know 
nothing about them ;)
--
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] Performance problem (slow hard drive?)

2005-04-04 Thread Shawn Singh
One thing that I noticed with my installs of Linux is that different
filesystems seem to perform differently...ie. my installst that are
using Reiserfs seem to have quicker reads and writes than my installs
that are using ext2 or ext3...

Also, another thing that I noticed, is that I trim down services that
I don't absolutely need to be running..and that seems to help with
performance.

The nice thing about Gentoo is that a lot of stuff doesn't get started
by default. :)

I hope this helps.

Shawn

On Apr 4, 2005 8:40 AM, Covington, Chris [EMAIL PROTECTED] wrote:
  I've been experiencing performance problems in my laptop
  (Acer Aspire 1522WLMi).
 
 How much memory (RAM) do you have?  That could be the bottleneck.
 
 ---
 Chris Covington
 IT
 Plus One Health Management
 75 Maiden Lane Suite 801
 NY, NY 10038
 646-312-6269
 http://www.plusoneactive.com
 
 --
 gentoo-user@gentoo.org mailing list
 

--
gentoo-user@gentoo.org mailing list