2001-12-01 04:56:13

by Justin Piszcz

[permalink] [raw]
Subject: Is it normal for freezing while...

Is it normal for a system to lockup while creating a 3GB test file?

Following command: dd if=/dev/zero of=file bs=1M count=3000

The system freezes up for 30-60 seconds for as many as 3-4 times during
the creation of the file.

Is this normal?
Anyway to tweak the /proc settings to avoid system freezing?




2001-12-01 05:16:55

by Andrew Morton

[permalink] [raw]
Subject: Re: Is it normal for freezing while...

war wrote:
>
> Is it normal for a system to lockup while creating a 3GB test file?
>

Seems that way.

It also seems that yesterday I sent you the URL of two patches:

http://www.zip.com.au/~akpm/linux/2.4/2.4.17-pre1/vm-fixes.patch
http://www.zip.com.au/~akpm/linux/2.4/2.4.17-pre1/elevator.patch

and I explicitly asked you to report on the result of applying them?

If you apply them, you'll find that the problem goes away. If you're
using ext3, you'll get better results if you mount with the `noatime'
option.

So please - test the patches, report the results. It's how things
work around here. Sometimes :)

Thanks.

-

2001-12-01 05:53:57

by Justin Piszcz

[permalink] [raw]
Subject: Re: Is it normal for freezing while...

Wow, responsiveness is wonderful with these patches.

Will they make it into 2.4.17, (ie: I've seen the -pre2 changelog, did
you incorporate them into -pre2)?
Even throughout the entire dd, it remained responsive
(mouse/cursor/network/etc).

Attached is the vmstat log during the dd.


Andrew Morton wrote:

> war wrote:
> >
> > Is it normal for a system to lockup while creating a 3GB test file?
> >
>
> Seems that way.
>
> It also seems that yesterday I sent you the URL of two patches:
>
> http://www.zip.com.au/~akpm/linux/2.4/2.4.17-pre1/vm-fixes.patch
> http://www.zip.com.au/~akpm/linux/2.4/2.4.17-pre1/elevator.patch
>
> and I explicitly asked you to report on the result of applying them?
>
> If you apply them, you'll find that the problem goes away. If you're
> using ext3, you'll get better results if you mount with the `noatime'
> option.
>
> So please - test the patches, report the results. It's how things
> work around here. Sometimes :)
>
> Thanks.
>
> -


Attachments:
vmstat.log.bz2 (3.93 kB)

2001-12-01 06:17:22

by Andrew Morton

[permalink] [raw]
Subject: Re: Is it normal for freezing while...

war wrote:
>
> Wow, responsiveness is wonderful with these patches.

yup. Thanks for testing...

> Will they make it into 2.4.17, (ie: I've seen the -pre2 changelog, did
> you incorporate them into -pre2)?
> Even throughout the entire dd, it remained responsive
> (mouse/cursor/network/etc).

Well, this is a stable kernel, and the patch does adversely
affect overall throughput.

There are two changes to the elevator in that patch. One
is a modest speedup for all workloads which, frankly, I'm
inclined to drop. The other is the part which gives the
improved responsiveness.

Being a cautious chap, I think I'll submit that patch, with
the default setting to "off", so there is no change to default
kernel behaviour. Then people can run `elvtune -b' to enable it.

-

2001-12-01 08:14:51

by Mike Galbraith

[permalink] [raw]
Subject: Re: Is it normal for freezing while...

On Fri, 30 Nov 2001, Andrew Morton wrote:

> war wrote:
> >
> > Wow, responsiveness is wonderful with these patches.
>
> yup. Thanks for testing...
>
> > Will they make it into 2.4.17, (ie: I've seen the -pre2 changelog, did
> > you incorporate them into -pre2)?
> > Even throughout the entire dd, it remained responsive
> > (mouse/cursor/network/etc).
>
> Well, this is a stable kernel, and the patch does adversely
> affect overall throughput.
>
> There are two changes to the elevator in that patch. One
> is a modest speedup for all workloads which, frankly, I'm
> inclined to drop. The other is the part which gives the
> improved responsiveness.
>
> Being a cautious chap, I think I'll submit that patch, with
> the default setting to "off", so there is no change to default
> kernel behaviour. Then people can run `elvtune -b' to enable it.

I confirmed that this works just fine for my test load.

2.5.1-pre1+vm-fixes+elevator+mini-ll+elvtune -b ~random
real 7m48.999s
user 6m41.020s
sys 0m30.130s

user : 0:06:47.59 73.0% page in : 669883
nice : 0:00:00.00 0.0% page out: 636094
system: 0:00:48.41 8.7% swap in : 143339
idle : 0:01:42.63 18.4% swap out: 154398

-----------------previous-results------------------
2.5.1-pre1
real 7m54.873s
user 6m41.070s
sys 0m30.170s

user : 0:06:47.35 72.6% page in : 661891
nice : 0:00:00.00 0.0% page out: 708836
system: 0:00:47.42 8.5% swap in : 140234
idle : 0:01:46.26 18.9% swap out: 172775

2.5.1-pre1+vm-fixes
real 7m48.438s
user 6m41.070s
sys 0m29.570s

user : 0:06:47.89 74.9% page in : 666952
nice : 0:00:00.00 0.0% page out: 621296
system: 0:00:47.70 8.8% swap in : 142391
idle : 0:01:28.94 16.3% swap out: 150721


2.5.1-pre1+vm-fixes+elevator
real 8m13.386s
user 6m38.330s
sys 0m31.680s

user : 0:06:45.24 70.3% page in : 596724
nice : 0:00:00.00 0.0% page out: 574456
system: 0:00:47.79 8.3% swap in : 123507
idle : 0:02:03.64 21.4% swap out: 138675

2.5.1-pre1+vm-fixes+elevator+mini-ll
real 8m12.437s
user 6m38.860s
sys 0m31.680s

user : 0:06:45.90 71.0% page in : 604385
nice : 0:00:00.00 0.0% page out: 572588
system: 0:00:47.50 8.3% swap in : 126731
idle : 0:01:58.05 20.7% swap out: 138055


2001-12-01 08:27:03

by Mike Fedyk

[permalink] [raw]
Subject: Re: Is it normal for freezing while...

On Fri, Nov 30, 2001 at 10:16:58PM -0800, Andrew Morton wrote:
> Being a cautious chap, I think I'll submit that patch, with
> the default setting to "off", so there is no change to default
> kernel behaviour. Then people can run `elvtune -b' to enable it.
>

Hmm...

mikef-linux:/home/mfedyk# elvtune /dev/hda

/dev/hda elevator ID 0
read_latency: 8192
write_latency: 16384
max_bomb_segments: 0

mikef-linux:/home/mfedyk# elvtune -b 2 /dev/hda

/dev/hda elevator ID 0
read_latency: 8192
write_latency: 16384
max_bomb_segments: 0

mikef-linux:/home/mfedyk# elvtune -b 1000 /dev/hda

/dev/hda elevator ID 0
read_latency: 8192
write_latency: 16384
max_bomb_segments: 0

mikef-linux:/home/mfedyk# elvtune -b 1000 /dev/hdc

/dev/hdc elevator ID 1
read_latency: 8192
write_latency: 16384
max_bomb_segments: 0


mikef-linux:/home/mfedyk# uname -r
2.4.17-pre2

What's wrong?

2001-12-01 09:02:38

by Mike Fedyk

[permalink] [raw]
Subject: Re: Is it normal for freezing while...

On Sat, Dec 01, 2001 at 12:26:31AM -0800, Mike Fedyk wrote:
> On Fri, Nov 30, 2001 at 10:16:58PM -0800, Andrew Morton wrote:
> > Being a cautious chap, I think I'll submit that patch, with
> > the default setting to "off", so there is no change to default
> > kernel behaviour. Then people can run `elvtune -b' to enable it.
> >
>
> Hmm...
>
> mikef-linux:/home/mfedyk# elvtune /dev/hda
>
> /dev/hda elevator ID 0
> read_latency: 8192
> write_latency: 16384
> max_bomb_segments: 0
>
....

As pointed out on irc, and in email, Andrew's elevator patch wasn't in
2.4.17-pre2...

False alarm. :)