public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* dynamic swap prioritizing
@ 2001-10-09 22:01 Xuan Baldauf
  2001-10-10  1:43 ` Rik van Riel
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Xuan Baldauf @ 2001-10-09 22:01 UTC (permalink / raw)
  To: linux-kernel

Hello,

I have a linux box with 3 harddisks of different
characteristics (size, seek time, throughput), each capable
of holding a swap partition. Sometimes, one harddisk is
driven heavily (e.g. database application), sometimes, the
other harddisk is busy.

I imagine following optimization:
- all swap partitions have the same priority from the start
on
- runtime statistics are gathered covering response time
(time from page request to availability)
- the fastest drive is used first (or maybe in striping mode
parallely woth the second-fastest drive)
- because the fastest drive will be more busy, its response
times will rise, reaching equality with other drives
- at that point, other drives are also considered for
swapout
- that system regularily adapts its decisions based on
recent statistics ("recent" is a tuning parameter)

Such an algorithm also would properly prioritize
network-swap and video-memory-swap, reducing time and cost
of a manual priority configuration (and statistics
gathering).

Does the linux kernel already implement such an
optimization? Is it planned?

Xuân.



^ permalink raw reply	[flat|nested] 11+ messages in thread
* Re: dynamic swap prioritizing
@ 2001-10-10 15:23 Venkatesh Ramamurthy
  2001-10-10 15:55 ` 'adilger@turbolabs.com'
  0 siblings, 1 reply; 11+ messages in thread
From: Venkatesh Ramamurthy @ 2001-10-10 15:23 UTC (permalink / raw)
  To: 'adilger@turbolabs.com', 'xuan--lkml@baldauf.org'
  Cc: 'linux-kernel@vger.kernel.org'

> If this is to be generally useful, it would be good to find things
> like max sequential read speed, max sequential write speed, and max
> seek time (at least). Estimates for max sequential read speed and
> seek time could be found at boot time for each disk relatively
> easily, but write speed may have to be found only at runtime (or
> it could all be fed in to the kernel from user space from benchmarks
> run previously).

Maybe we can find out the statistics for the first time (or when swap is
created) and store this information in the swap partition itself. This would
allow us to compute time consuming statistics only once. Also we need to
create new fields in the swap structure for this purpose.



^ permalink raw reply	[flat|nested] 11+ messages in thread
* RE: dynamic swap prioritizing
@ 2001-10-10 16:47 Venkatesh Ramamurthy
  0 siblings, 0 replies; 11+ messages in thread
From: Venkatesh Ramamurthy @ 2001-10-10 16:47 UTC (permalink / raw)
  To: 'adilger@turbolabs.com', Venkatesh Ramamurthy
  Cc: 'xuan--lkml@baldauf.org',
	'linux-kernel@vger.kernel.org'

	> I'd rather just have the statistic data in a regular file for ALL
disks,
	> and then send it to the kernel via ioctl or write to a special
file that
	> the kernel will read from.  I don't think it is critical to have
this
	> data right at boot time, since it would only be used for
optimizing I/O
	> access and would not be required for a disk to actually work.

	My idea of putting this info on swap was that when the disk is moved
from one system to another system, the statistics stays with the swap
itself. If the swap disk(partition) is put in a different system which has
different configuration(that which would affect the performance info on the
disk), then we can recompute the statistics, otherwise there is no need to
rerun the utility every time the swap disk is moved. 
	Also the kernel would be smart enough to know about the swap
performance without the need for an utility to invoked, to set the
parameters through IOCTL.



^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2001-10-12 15:22 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-10-09 22:01 dynamic swap prioritizing Xuan Baldauf
2001-10-10  1:43 ` Rik van Riel
2001-10-10  3:35 ` Andreas Dilger
2001-10-10  8:38 ` Helge Hafting
  -- strict thread matches above, loose matches on Subject: below --
2001-10-10 15:23 Venkatesh Ramamurthy
2001-10-10 15:55 ` 'adilger@turbolabs.com'
2001-10-10 17:14   ` Richard B. Johnson
2001-10-12  0:45   ` Xuan Baldauf
2001-10-12  3:32     ` 'adilger@turbolabs.com'
2001-10-12 15:22       ` Xuan Baldauf
2001-10-10 16:47 Venkatesh Ramamurthy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox