From: <pcg@goof.com ( Marc) (A.) (Lehmann )>
To: Rik van Riel <riel@conectiva.com.br>
Cc: Daniel Phillips <phillips@bonn-fries.net>,
Roger Larsson <roger.larsson@skelleftea.mail.telia.com>,
linux-kernel@vger.kernel.org
Subject: Re: [resent PATCH] Re: very slow parallel read performance
Date: Sat, 25 Aug 2001 01:23:38 +0200 [thread overview]
Message-ID: <20010825012338.B547@cerebro.laendle> (raw)
In-Reply-To: <20010824201125Z16096-32383+1213@humbolt.nl.linux.org> <Pine.LNX.4.33L.0108241713420.31410-100000@duckman.distro.conectiva>
In-Reply-To: <Pine.LNX.4.33L.0108241713420.31410-100000@duckman.distro.conectiva>
On Fri, Aug 24, 2001 at 05:19:07PM -0300, Rik van Riel <riel@conectiva.com.br> wrote:
> Actually, no. FIFO would be ok if you had ONE readahead
> stream going on, but when you have multiple readahead
Do we all agree that read-ahead is actually the problem? ATM, I serve ~800
files, read()ing them in turn. When I increase the number of threads I
have more reads at the same time in the kernel, but the absolute number of
read() requests decreases.
So if read-ahead is the problem, then there must be some interdependency
between read-aheads for serial requests and read-aheads for concurrent
requests.
For example, I could imagine that read() executes, returns to
userspace and at the same time the kernel thinks "nothing to do, let's
readahead". While, in the concurrent case, there is hardly a time when no
read() is running. But read-ahead does not seem to work that way.
I usually have around 200MB of free memory, this leaves ~200k/handle
(enough for read-ahead). let's see what happens with vmstat. this is after i
kill -STOP httpd:
0 2 0 0 4140 15448 185972 0 0 0 264 1328 88 1 3 96
0 2 0 0 4136 15448 185976 0 0 0 0 793 62 0 3 97
0 2 0 0 4136 15448 185976 0 0 0 0 538 62 0 1 98
0 2 0 0 4128 15448 185984 0 0 0 0 382 62 1 1 98
0 2 0 0 4128 15448 185984 0 0 0 0 312 66 0 1 99
1 1 0 0 3056 15448 185088 0 0 48 132 2465 321 24 28 48
2 1 1 0 3056 15448 186392 0 0 4704 0 3017 925 11 21 68
1 1 2 0 3804 15440 185516 0 0 4708 0 3909 1196 28 38 34
1 1 0 0 3056 15440 186212 0 0 5392 0 4004 1579 21 32 47
1 1 1 0 3064 15436 186220 0 0 6668 0 3676 1273 19 42 39
0 1 1 0 3056 15468 186168 0 0 4488 1424 3889 1342 16 34 50
0 1 2 0 3056 15468 186116 0 0 3372 0 3854 1525 20 34 46
1 1 1 0 3060 15468 186084 0 0 4096 0 4088 1641 21 37 41
0 1 2 0 3056 15468 186044 0 0 6744 0 3679 1415 22 33 45
1 1 1 0 3072 15468 186040 0 0 4700 0 3713 1429 19 32 50
at some point I killall -CONT myhttpd (it seems more than the 2mb/s is
being read, though, although I only server about 2.3mb/s). now let's see
when i dynamically add 15 reader threads:
procs memory swap io system cpu
r b w swpd free buff cache si so bi bo in cs us sy id
1 1 1 0 3056 14636 193104 0 0 5248 0 3531 1428 11 35 53
0 1 2 0 3056 14604 193072 0 0 5936 0 3730 1416 10 33 57
0 1 0 0 3056 14604 193068 0 0 5628 0 4025 1504 16 34 50
# added 15 threads
0 16 0 0 3060 14580 192952 0 0 5412 0 3394 1010 12 31 57
1 16 1 0 3060 14580 192944 0 0 2580 268 2253 636 8 23 69
0 16 0 0 3056 14580 192944 0 0 380 852 1570 488 5 13 82
0 16 0 0 3064 14580 192880 0 0 2652 0 1470 583 6 14 80
0 16 0 0 3056 14560 192888 0 0 2944 0 2068 693 5 23 72
0 16 0 0 3056 14560 192888 0 0 544 0 1732 550 5 15 80
1 16 0 0 3056 14560 192884 0 0 2892 0 1513 741 4 14 82
0 16 1 0 3056 14560 192884 0 0 2236 552 1894 742 5 17 77
1 16 0 0 3056 14560 192880 0 0 1100 128 1699 604 4 15 81
woaw. blocks in decreases a slot. now let's remove the extra threads again:
0 16 1 0 3056 14552 193720 0 0 4944 660 1463 721 3 20 77
0 16 0 0 3056 14552 193648 0 0 1756 136 1451 726 4 18 79
0 16 0 0 3056 14552 193588 0 0 440 0 1221 565 3 13 84
0 16 0 0 3056 14552 193584 0 0 3308 0 1278 632 4 9 88
1 16 0 0 3056 14536 193608 0 0 3040 0 2469 1168 7 21 72
0 16 0 0 3056 14536 193608 0 0 2320 0 1844 730 5 15 80
1 16 1 0 3056 14536 193612 0 0 1660 596 1557 559 12 24 64
# here the server starts rto reap threads. this is a slow and inefficient process
# that take svery long and block the server.
1 16 0 0 3056 14536 193612 0 0 2188 164 831 440 25 30 45
1 16 0 0 3056 14536 193612 0 0 2324 0 506 329 23 30 47
1 16 0 0 3056 14536 193612 0 0 1452 0 460 401 24 30 46
# many similar lines snipped
1 16 0 0 3056 14516 193692 0 0 3932 0 510 621 20 38 42
1 16 0 0 3056 14516 193692 0 0 1744 0 338 369 23 31 46
1 16 0 0 3056 14568 193872 0 0 1292 476 383 392 20 32 48
2 0 2 0 3056 14616 175104 0 0 5748 0 3670 1342 24 37 39
2 1 1 0 3560 14616 174708 0 0 5028 0 3539 989 22 43 35
0 1 0 0 93948 14660 175764 0 0 1604 0 3341 667 10 22 68
1 0 0 0 92244 14844 176212 0 0 524 0 3240 424 12 12 76
0 1 0 0 90532 15212 176404 0 0 200 1524 3308 426 16 14 71
0 1 1 0 84600 15212 179096 0 0 2712 0 2710 669 26 11 63
0 1 2 0 77768 15212 183132 0 0 4012 0 3041 889 19 18 63
0 1 0 0 68724 15212 189440 0 0 6284 0 3110 998 21 21 58
1 1 0 0 58892 15212 195984 0 0 6528 0 3149 975 28 25 47
2 1 0 0 50636 15248 201316 0 0 5316 1368 3321 968 20 28 52
1 1 0 0 38520 15248 210004 0 0 8664 0 3250 910 28 26 46
0 1 1 0 28100 15248 218520 0 0 8508 0 3186 777 20 28 52
1 1 1 0 18848 15248 227028 0 0 8500 0 3090 704 15 26 59
0 1 0 0 10752 15248 233752 0 0 6732 0 3223 774 20 27 53
back to 2.1mb/s, but reading much more.
this certainly looks like overzealus read-ahead, but I should have the
memory available for read-ahead. So is it "just" the use-once-optimization
that throws away read-ahead pages? If yes, then why do I see exactly
the same performance under 2.4.5pre4, which didn't have (AFAIK) the
use-once-opt.?
--
-----==- |
----==-- _ |
---==---(_)__ __ ____ __ Marc Lehmann +--
--==---/ / _ \/ // /\ \/ / pcg@goof.com |e|
-=====/_/_//_/\_,_/ /_/\_\ XX11-RIPE --+
The choice of a GNU generation |
|
next prev parent reply other threads:[~2001-08-24 23:23 UTC|newest]
Thread overview: 123+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-08-23 21:35 Lehmann
2001-08-24 7:35 ` [resent PATCH] " Roger Larsson
2001-08-24 17:43 ` Rik van Riel
2001-08-24 18:28 ` Roger Larsson
2001-08-24 19:02 ` Rik van Riel
2001-08-24 20:37 ` Gérard Roudier
2001-08-24 23:12 ` Rik van Riel
2001-08-25 8:02 ` Gérard Roudier
2001-08-25 9:26 ` Roger Larsson
2001-08-25 11:49 ` Gérard Roudier
2001-08-25 17:56 ` Roger Larsson
2001-08-25 19:13 ` Gérard Roudier
2001-08-25 13:17 ` Rik van Riel
2001-08-24 22:29 ` Daniel Phillips
2001-08-24 23:10 ` Rik van Riel
2001-08-25 0:42 ` Daniel Phillips
2001-08-27 7:08 ` Helge Hafting
2001-08-27 14:31 ` Daniel Phillips
2001-08-27 14:42 ` Alex Bligh - linux-kernel
2001-08-27 15:14 ` Rik van Riel
2001-08-27 16:04 ` Daniel Phillips
[not found] ` <Pine.LNX.4.33L.0108271213370.5646-100000@imladris.rielhome.cone ctiva>
2001-08-27 19:34 ` Alex Bligh - linux-kernel
2001-08-27 20:03 ` Oliver Neukum
2001-08-27 20:19 ` Alex Bligh - linux-kernel
2001-08-27 21:38 ` Oliver.Neukum
2001-08-27 22:26 ` Alex Bligh - linux-kernel
2001-08-27 21:29 ` Daniel Phillips
2001-08-27 16:02 ` Daniel Phillips
2001-08-27 19:36 ` Alex Bligh - linux-kernel
2001-08-27 20:24 ` Daniel Phillips
2001-08-27 16:55 ` David Lang
2001-08-27 18:54 ` Daniel Phillips
2001-08-27 18:37 ` Oliver Neukum
2001-08-27 19:04 ` Daniel Phillips
2001-08-27 19:43 ` Oliver Neukum
2001-08-27 20:37 ` Daniel Phillips
2001-08-27 22:10 ` Oliver.Neukum
2001-08-27 21:44 ` Linus Torvalds
2001-08-27 22:30 ` Daniel Phillips
2001-08-27 23:00 ` Marcelo Tosatti
2001-08-28 3:10 ` Linus Torvalds
2001-08-27 19:55 ` Richard Gooch
2001-08-27 20:09 ` Oliver Neukum
2001-08-27 21:06 ` Daniel Phillips
2001-08-24 20:18 ` Daniel Phillips
2001-08-24 20:19 ` Rik van Riel
2001-08-24 21:11 ` Daniel Phillips
2001-08-24 23:03 ` Rik van Riel
2001-08-25 0:41 ` Daniel Phillips
2001-08-25 1:34 ` Rik van Riel
2001-08-25 15:49 ` Daniel Phillips
2001-08-25 15:50 ` Rik van Riel
2001-08-25 16:28 ` Lehmann
2001-08-25 16:34 ` Rik van Riel
2001-08-25 16:41 ` Lehmann
2001-08-26 16:55 ` Daniel Phillips
2001-08-26 18:39 ` Rik van Riel
2001-08-26 19:46 ` Daniel Phillips
2001-08-26 19:52 ` Rik van Riel
2001-08-26 20:08 ` Daniel Phillips
2001-08-26 22:33 ` Russell King
2001-08-26 23:24 ` Daniel Phillips
2001-08-26 23:24 ` Russell King
2001-08-27 0:07 ` Rik van Riel
2001-08-27 0:02 ` Rik van Riel
2001-08-27 0:42 ` Daniel Phillips
2001-08-25 16:43 ` Daniel Phillips
2001-08-25 19:15 ` Alan Cox
2001-08-25 19:35 ` Lehmann
2001-08-25 20:52 ` Rik van Riel
2001-08-26 1:38 ` Daniel Phillips
2001-08-26 2:49 ` Lehmann
2001-08-26 17:29 ` Daniel Phillips
2001-08-26 17:37 ` Craig I. Hagan
2001-08-26 18:56 ` Rik van Riel
2001-08-26 19:18 ` Lehmann
2001-08-26 21:07 ` Daniel Phillips
2001-08-26 22:12 ` Rik van Riel
2001-08-26 23:24 ` Lehmann
2001-08-26 20:26 ` Gérard Roudier
2001-08-26 21:20 ` Daniel Phillips
2001-08-26 3:32 ` Rik van Riel
2001-08-26 13:22 ` Lehmann
2001-08-26 13:48 ` Rik van Riel
2001-08-26 14:55 ` Lehmann
2001-08-26 15:06 ` Rik van Riel
2001-08-26 15:25 ` Lehmann
2001-08-25 21:33 ` Alan Cox
2001-08-25 23:34 ` Lehmann
2001-08-26 2:02 ` Rik van Riel
2001-08-26 2:57 ` Lehmann
2001-08-26 0:46 ` John Stoffel
2001-08-26 1:07 ` Alan Cox
2001-08-26 3:30 ` Rik van Riel
2001-08-26 3:40 ` Rik van Riel
2001-08-26 5:28 ` Daniel Phillips
2001-08-24 23:23 ` Lehmann [this message]
[not found] ` <200108242344.f7ONi0h21270@mailg.telia.com>
2001-08-25 0:28 ` Lehmann
2001-08-25 3:09 ` Rik van Riel
2001-08-25 9:13 ` Gérard Roudier
2001-08-26 16:54 ` Daniel Phillips
2001-08-26 18:59 ` Victor Yodaiken
2001-08-26 19:38 ` Rik van Riel
2001-08-26 20:05 ` Victor Yodaiken
2001-08-26 20:34 ` Rik van Riel
2001-08-26 20:45 ` Victor Yodaiken
2001-08-26 21:00 ` Alan Cox
2001-08-26 20:42 ` Daniel Phillips
2001-08-26 19:31 ` Lehmann
2001-08-24 19:42 ` Lehmann
2001-08-24 21:42 ` Gérard Roudier
2001-08-25 0:05 ` Craig I. Hagan
2001-08-27 2:03 Rick Hohensee
2001-08-27 2:52 ` Keith Owens
2001-08-28 17:52 ` Kai Henningsen
2001-08-28 21:54 ` Matthew M
2001-08-28 1:08 Dieter Nützel
2001-08-28 0:05 ` Marcelo Tosatti
2001-08-28 1:54 ` Daniel Phillips
2001-08-28 5:01 ` Mike Galbraith
2001-08-28 18:18 ` Andrew Morton
2001-08-28 18:45 ` Hans Reiser
2001-08-28 15:28 Dieter Nützel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20010825012338.B547@cerebro.laendle \
--to=pcg@goof.com \
--cc=linux-kernel@vger.kernel.org \
--cc=phillips@bonn-fries.net \
--cc=riel@conectiva.com.br \
--cc=roger.larsson@skelleftea.mail.telia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®