lkml.org 
[lkml]   [2002]   [Feb]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subject[RFC] kiobuf problems with 2.4.17
Date
Hi,

We are having problems with kiobufs on 2.4.17 while running
database benchmarks (on RAW). Issue here is we get one kiobuf
per device open. Since database processes does lots of opens
we end up allocating lots of kiobufs. So we run out of memory
and start swapping.

These benchmarks ran fine on 2.4.6, since it has only kiobuf
per device.

I have few ideas and need your suggestions/comments on fixing
this issue.

1) Have one kiobuf per process instead of open. Since a process
cannot do more than one IO at any time, why not maintain
one kiobuf per process instead file open ? (With the exception
of asyncio).

This way we can save a lot, if process does lots of opens.
What am I missing here ?


2) Reduce the size of kiobuf.

(i) Currently kiobuf has:

struct buffer_head * bh[KIO_MAX_SECTORS];

Why not make it

struct buffer_head * bh;

and them chainup in alloc_kiovec(). We can save almost 4K doing this.

(ii) kiobuf also has:

unsigned long blocks[KIO_MAX_SECTORS];

We don't really need this for RAW IO. Why not make it

unsigned long *blocks;

and NOT allocate it for RAW (for O_DIRECT and other usages we can
allocated it). This will save another 4K for RAW.

I made a patch to do (2) and it works fine.

Please let me know.

Thanks,
Badari
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:18    [W:0.077 / U:0.180 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site