* linux readahead setting?
@ 2001-11-13 15:21 Roy Sigurd Karlsbakk
2001-11-13 15:55 ` Rik van Riel
2001-11-14 0:37 ` [PATCH] " Roger Larsson
0 siblings, 2 replies; 11+ messages in thread
From: Roy Sigurd Karlsbakk @ 2001-11-13 15:21 UTC (permalink / raw)
To: linux-kernel
Hi
I heard linux does <= 32 page readahead from block devices
(scsi/ide/que?). Is there a way to double this? I want to read 256kB
chunks from the SCSI drives, as to get the best speed. These numbers are
based on some testing and information I've got from Compaq's storage guys.
roy
--
Roy Sigurd Karlsbakk, MCSE, MCNE, CLS, LCA
Computers are like air conditioners.
They stop working when you open Windows.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: linux readahead setting?
2001-11-13 15:21 linux readahead setting? Roy Sigurd Karlsbakk
@ 2001-11-13 15:55 ` Rik van Riel
2001-11-13 17:16 ` Erik Tews
2001-11-14 0:37 ` [PATCH] " Roger Larsson
1 sibling, 1 reply; 11+ messages in thread
From: Rik van Riel @ 2001-11-13 15:55 UTC (permalink / raw)
To: Roy Sigurd Karlsbakk; +Cc: linux-kernel
On Tue, 13 Nov 2001, Roy Sigurd Karlsbakk wrote:
> I heard linux does <= 32 page readahead from block devices
> (scsi/ide/que?). Is there a way to double this? I want to read 256kB
> chunks from the SCSI drives, as to get the best speed. These numbers are
> based on some testing and information I've got from Compaq's storage guys.
The -ac kernels have a way to tune this dynamically,
I guess we might want to push this change into 2.4
later on...
regards,
Rik
--
DMCA, SSSCA, W3C? Who cares? http://thefreeworld.net/
http://www.surriel.com/ http://distro.conectiva.com/
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: linux readahead setting?
2001-11-13 15:55 ` Rik van Riel
@ 2001-11-13 17:16 ` Erik Tews
2001-11-13 21:01 ` Erik Tews
0 siblings, 1 reply; 11+ messages in thread
From: Erik Tews @ 2001-11-13 17:16 UTC (permalink / raw)
To: linux-kernel
On Tue, Nov 13, 2001 at 01:55:42PM -0200, Rik van Riel wrote:
> On Tue, 13 Nov 2001, Roy Sigurd Karlsbakk wrote:
>
> > I heard linux does <= 32 page readahead from block devices
> > (scsi/ide/que?). Is there a way to double this? I want to read 256kB
> > chunks from the SCSI drives, as to get the best speed. These numbers are
> > based on some testing and information I've got from Compaq's storage guys.
>
> The -ac kernels have a way to tune this dynamically,
> I guess we might want to push this change into 2.4
> later on...
I got an other question related to this. I got a System with 7
Filesystems on LVM. One Filesystem contains only one file, a 10 GB
disk-image which is exported via ftp. Sometimes, 15 clients are
downloading the file at the same time. What would be theoretical the
best way to tune these downloads. It would be wise if linux would try to
read the file in big blocks to minimize seeking on the disk. The file is
usually only downloaded in one piece. So if a ftpd-process access the
file, I can be very sure that it will read the whole file. The best
would be if data is requested from the file if linux would read a block
of 256k data from the file before serving the next request from an other
process.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: linux readahead setting?
2001-11-13 17:16 ` Erik Tews
@ 2001-11-13 21:01 ` Erik Tews
2001-11-14 20:26 ` Mike Fedyk
0 siblings, 1 reply; 11+ messages in thread
From: Erik Tews @ 2001-11-13 21:01 UTC (permalink / raw)
To: linux-kernel
Thanks, for all the answers via pm, but I would like to explain a litte
bit more what I am looking for. I got this filesystem on lvm, and I want
my harddisk if there a several processes accessing the disk-image to go
to the position of process one, read 256k of data, go to the position of
process two, read 256k of data, go again to the position of the nex
process, read 256k of data and so one to minimize movement of the
harddisk-readhead.
And of course my problem is, that I want that only on this filesystem
(it is a reiserfs-filesystem) or logical volum. Not on the other
filesystems on this harddisk which contain normal data or swapspace
(this behaviour could cause a really ugly performance for swapspace)
The system is currently able to fully satisfy a 100 mbit
ethernetconnection, but I would like how I can get some extra
performance in such situations.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH] Re: linux readahead setting?
2001-11-13 15:21 linux readahead setting? Roy Sigurd Karlsbakk
2001-11-13 15:55 ` Rik van Riel
@ 2001-11-14 0:37 ` Roger Larsson
2001-11-14 10:33 ` Guest section DW
` (2 more replies)
1 sibling, 3 replies; 11+ messages in thread
From: Roger Larsson @ 2001-11-14 0:37 UTC (permalink / raw)
To: Roy Sigurd Karlsbakk, linux-kernel; +Cc: Andre Hedrick
[-- Attachment #1: Type: text/plain, Size: 877 bytes --]
On Tuesday 13 November 2001 16:21, Roy Sigurd Karlsbakk wrote:
> Hi
>
> I heard linux does <= 32 page readahead from block devices
> (scsi/ide/que?). Is there a way to double this? I want to read 256kB
> chunks from the SCSI drives, as to get the best speed. These numbers are
> based on some testing and information I've got from Compaq's storage guys.
>
> roy
Note that the interface to /proc/ide/hdX/settings still is buggy...
i.e you should be able to do (in pages):
echo "file_readahead:64" > /proc/ide/hdX/settings
but the result will be a readahead of 128*1024 PAGES... and that
is too much... (even 1024 PAGES is too much)
(after patch, in kB)
echo "file_readahead:256" > /proc/ide/hdX/settings
It is likely that there are more settings in the ide subsystem that is
has this fault... (Andre, I keep repeating myself...)
/RogerL
--
Roger Larsson
Skellefteå
Sweden
[-- Attachment #2: patch-2.4.11-pre2-ide_settings --]
[-- Type: text/x-diff, Size: 1468 bytes --]
*******************************************
Patch prepared by: roger.larsson@norran.net
Name of file: /home/roger/patches/patch-2.4.11-pre2-ide_settings
--- linux/drivers/ide/ide-disk.c.orig Tue Oct 2 01:05:41 2001
+++ linux/drivers/ide/ide-disk.c Thu Oct 4 21:15:36 2001
@@ -690,7 +690,7 @@
ide_add_setting(drive, "multcount", id ? SETTING_RW : SETTING_READ, HDIO_GET_MULTCOUNT, HDIO_SET_MULTCOUNT, TYPE_BYTE, 0, id ? id->max_multsect : 0, 1, 2, &drive->mult_count, set_multcount);
ide_add_setting(drive, "nowerr", SETTING_RW, HDIO_GET_NOWERR, HDIO_SET_NOWERR, TYPE_BYTE, 0, 1, 1, 1, &drive->nowerr, set_nowerr);
ide_add_setting(drive, "breada_readahead", SETTING_RW, BLKRAGET, BLKRASET, TYPE_INT, 0, 255, 1, 2, &read_ahead[major], NULL);
- ide_add_setting(drive, "file_readahead", SETTING_RW, BLKFRAGET, BLKFRASET, TYPE_INTA, 0, INT_MAX, 1, 1024, &max_readahead[major][minor], NULL);
+ ide_add_setting(drive, "file_readahead", SETTING_RW, BLKFRAGET, BLKFRASET, TYPE_INTA, 0, 4096, PAGE_SIZE, 1024, &max_readahead[major][minor], NULL);
ide_add_setting(drive, "max_kb_per_request", SETTING_RW, BLKSECTGET, BLKSECTSET, TYPE_INTA, 1, 255, 1, 2, &max_sectors[major][minor], NULL);
ide_add_setting(drive, "lun", SETTING_RW, -1, -1, TYPE_INT, 0, 7, 1, 1, &drive->lun, NULL);
ide_add_setting(drive, "failures", SETTING_RW, -1, -1, TYPE_INT, 0, 65535, 1, 1, &drive->failures, NULL);
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] Re: linux readahead setting?
2001-11-14 0:37 ` [PATCH] " Roger Larsson
@ 2001-11-14 10:33 ` Guest section DW
2001-11-14 11:04 ` Roy Sigurd Karlsbakk
2001-11-14 18:31 ` Andre Hedrick
2 siblings, 0 replies; 11+ messages in thread
From: Guest section DW @ 2001-11-14 10:33 UTC (permalink / raw)
To: Roger Larsson, Roy Sigurd Karlsbakk, linux-kernel; +Cc: Andre Hedrick
> On Tuesday 13 November 2001 16:21, Roy Sigurd Karlsbakk wrote:
>> I heard linux does <= 32 page readahead from block devices
>> (scsi/ide/que?). Is there a way to double this?
Use blockdev --setra N /dev/foo for your favorite number N.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] Re: linux readahead setting?
2001-11-14 0:37 ` [PATCH] " Roger Larsson
2001-11-14 10:33 ` Guest section DW
@ 2001-11-14 11:04 ` Roy Sigurd Karlsbakk
2001-11-14 18:31 ` Andre Hedrick
2 siblings, 0 replies; 11+ messages in thread
From: Roy Sigurd Karlsbakk @ 2001-11-14 11:04 UTC (permalink / raw)
To: Roger Larsson; +Cc: linux-kernel, Andre Hedrick
> Note that the interface to /proc/ide/hdX/settings still is buggy...
>
> i.e you should be able to do (in pages):
> echo "file_readahead:64" > /proc/ide/hdX/settings
> but the result will be a readahead of 128*1024 PAGES... and that
> is too much... (even 1024 PAGES is too much)
>
> (after patch, in kB)
> echo "file_readahead:256" > /proc/ide/hdX/settings
>
> It is likely that there are more settings in the ide subsystem that is
> has this fault... (Andre, I keep repeating myself...)
er...
I'm running Compaq RAID controllers... Not IDE...
--
Roy Sigurd Karlsbakk, MCSE, MCNE, CLS, LCA
Computers are like air conditioners.
They stop working when you open Windows.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] Re: linux readahead setting?
2001-11-14 0:37 ` [PATCH] " Roger Larsson
2001-11-14 10:33 ` Guest section DW
2001-11-14 11:04 ` Roy Sigurd Karlsbakk
@ 2001-11-14 18:31 ` Andre Hedrick
2 siblings, 0 replies; 11+ messages in thread
From: Andre Hedrick @ 2001-11-14 18:31 UTC (permalink / raw)
To: Roger Larsson; +Cc: Roy Sigurd Karlsbakk, linux-kernel
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=X-UNKNOWN, Size: 1482 bytes --]
On Wed, 14 Nov 2001, Roger Larsson wrote:
> On Tuesday 13 November 2001 16:21, Roy Sigurd Karlsbakk wrote:
> > Hi
> >
> > I heard linux does <= 32 page readahead from block devices
> > (scsi/ide/que?). Is there a way to double this? I want to read 256kB
> > chunks from the SCSI drives, as to get the best speed. These numbers are
> > based on some testing and information I've got from Compaq's storage guys.
> >
> > roy
>
> Note that the interface to /proc/ide/hdX/settings still is buggy...
>
> i.e you should be able to do (in pages):
> echo "file_readahead:64" > /proc/ide/hdX/settings
> but the result will be a readahead of 128*1024 PAGES... and that
> is too much... (even 1024 PAGES is too much)
>
> (after patch, in kB)
> echo "file_readahead:256" > /proc/ide/hdX/settings
>
> It is likely that there are more settings in the ide subsystem that is
> has this fault... (Andre, I keep repeating myself...)
>
> /RogerL
> --
> Roger Larsson
> Skellefteå
> Sweden
It is hard to reply when your ISP rotates/changes its total block of
assigned IP address, while still not being able to update or fix dns
records at netsol to operate correctly.
And if you set the value of any given settings value large than its top
boundary it would most likely wrap. Right now it appears that a readahead
patch that I was looking may have borked performance.
Regards,
Andre Hedrick
CEO/President, LAD Storage Consulting Group
Linux ATA Development
Linux Disk Certification Project
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: linux readahead setting?
2001-11-13 21:01 ` Erik Tews
@ 2001-11-14 20:26 ` Mike Fedyk
2001-11-14 20:41 ` Erik Tews
0 siblings, 1 reply; 11+ messages in thread
From: Mike Fedyk @ 2001-11-14 20:26 UTC (permalink / raw)
To: Erik Tews; +Cc: linux-kernel
On Tue, Nov 13, 2001 at 10:01:39PM +0100, Erik Tews wrote:
> Thanks, for all the answers via pm, but I would like to explain a litte
> bit more what I am looking for. I got this filesystem on lvm, and I want
> my harddisk if there a several processes accessing the disk-image to go
> to the position of process one, read 256k of data, go to the position of
> process two, read 256k of data, go again to the position of the nex
> process, read 256k of data and so one to minimize movement of the
> harddisk-readhead.
>
At which level do you want the read ahead?
If you read ahead at the block level, you may not get data for the file you
want because of fragmentation. This is especially true with long running
Reiser file systems.
If you read ahead at the FS level, you could get even more seeking because
of fragmentation.
Also, you need enough memory to let the kernel hold the read ahead data long
enough to be used.
Mike
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: linux readahead setting?
2001-11-14 20:26 ` Mike Fedyk
@ 2001-11-14 20:41 ` Erik Tews
2001-11-14 20:47 ` Mike Fedyk
0 siblings, 1 reply; 11+ messages in thread
From: Erik Tews @ 2001-11-14 20:41 UTC (permalink / raw)
To: linux-kernel
On Wed, Nov 14, 2001 at 12:26:20PM -0800, Mike Fedyk wrote:
> On Tue, Nov 13, 2001 at 10:01:39PM +0100, Erik Tews wrote:
> > Thanks, for all the answers via pm, but I would like to explain a litte
> > bit more what I am looking for. I got this filesystem on lvm, and I want
> > my harddisk if there a several processes accessing the disk-image to go
> > to the position of process one, read 256k of data, go to the position of
> > process two, read 256k of data, go again to the position of the nex
> > process, read 256k of data and so one to minimize movement of the
> > harddisk-readhead.
>
> At which level do you want the read ahead?
>
> If you read ahead at the block level, you may not get data for the file you
> want because of fragmentation. This is especially true with long running
> Reiser file systems.
I think fragmentation will be no problem, because this filesystem
contains only one file.
Readahead should be done on filesystem or block-level. Not on disklevel.
I can tune that with lvm, but I was not sure if a bigger readahead-value
is that what I want.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: linux readahead setting?
2001-11-14 20:41 ` Erik Tews
@ 2001-11-14 20:47 ` Mike Fedyk
0 siblings, 0 replies; 11+ messages in thread
From: Mike Fedyk @ 2001-11-14 20:47 UTC (permalink / raw)
To: Erik Tews; +Cc: linux-kernel
On Wed, Nov 14, 2001 at 09:41:22PM +0100, Erik Tews wrote:
> On Wed, Nov 14, 2001 at 12:26:20PM -0800, Mike Fedyk wrote:
> > At which level do you want the read ahead?
> >
> > If you read ahead at the block level, you may not get data for the file you
> > want because of fragmentation. This is especially true with long running
> > Reiser file systems.
>
> I think fragmentation will be no problem, because this filesystem
> contains only one file.
>
> Readahead should be done on filesystem or block-level. Not on disklevel.
> I can tune that with lvm, but I was not sure if a bigger readahead-value
> is that what I want.
Block and disk are conceptually the same in this instance because neither of
them know if the read ahead is going to get the next blocks for the file
being read or not...
In most cases, block=disk, except for lvm and raid...
Mike
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2001-11-14 20:48 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-11-13 15:21 linux readahead setting? Roy Sigurd Karlsbakk
2001-11-13 15:55 ` Rik van Riel
2001-11-13 17:16 ` Erik Tews
2001-11-13 21:01 ` Erik Tews
2001-11-14 20:26 ` Mike Fedyk
2001-11-14 20:41 ` Erik Tews
2001-11-14 20:47 ` Mike Fedyk
2001-11-14 0:37 ` [PATCH] " Roger Larsson
2001-11-14 10:33 ` Guest section DW
2001-11-14 11:04 ` Roy Sigurd Karlsbakk
2001-11-14 18:31 ` Andre Hedrick
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox