From: Peter Zaitsev <pz@spylog.ru>
To: linux-kernel@vger.kernel.org
Subject: MMAP issues
Date: Tue, 27 Nov 2001 19:46:07 +0300 [thread overview]
Message-ID: <183721898675.20011127194607@spylog.ru> (raw)
Hello ,
I'm trying to write a program which uses mmap agressively to mmap
files (really it's used as fail safe memory allocator to store data
if application failed)
I'm using the latest kernel 2.4.16.
I've found a couple of problems.
1) I can mmap only about 64K files (4K size ones) and I can't find there the limit
is triggered. I can open huge number of files (tried 500K) or I can
map ammoniums pages even lager number. May be this limit is
compiled in kernel somehow so may be changed ?
The error code returned is 12 - Can not allocate memory
2) I see the speed dramatically degrades over time with mapping
segments:
zetta:/home/pz/mmap # ./a.out
10000 Time: 7
20000 Time: 22
30000 Time: 38
40000 Time: 61
50000 Time: 78
60000 Time: 90
First 10000 of mmaps took only 7 second there mapping 10000 of
files after 50000 took 90 seconds. I used the same file associated
with many file descriptors to avoid disk related speed issues. Map
ammoniums in the same case are runned much faster and with almost no
speed penalty as well as open calls. So the question is if this
thing may be tuned somehow - hash increase or something.
3) It looks like the speed degrades over the program runs:
1st
10000 Time: 7
20000 Time: 22
30000 Time: 38
40000 Time: 61
50000 Time: 78
60000 Time: 90
2nd
10000 Time: 7
20000 Time: 28
30000 Time: 49
40000 Time: 71
50000 Time: 92
60000 Time: 104
3rd
10000 Time: 9
20000 Time: 31
30000 Time: 52
40000 Time: 68
50000 Time: 87
60000 Time: 107
--
Best regards,
Peter mailto:pz@spylog.ru
next reply other threads:[~2001-11-27 16:45 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <3C03D108.E3FADE95@zip.com.au>
2001-11-27 16:46 ` Peter Zaitsev [this message]
2001-11-27 17:54 ` Re[2]: " Peter Zaitsev
2001-11-27 22:36 ` Jeff Epler
2001-11-28 9:44 ` Re[2]: " Peter Zaitsev
2002-05-08 23:02 mmap issues David Stroupe
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=183721898675.20011127194607@spylog.ru \
--to=pz@spylog.ru \
--cc=linux-kernel@vger.kernel.org \
/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®