From: Hugh Dickins <hugh@veritas.com>
To: Tomasz Chmielewski <mangoo@wpkg.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
Mika Lawando <rzryyvzy@trashmail.net>
Subject: Re: What is the limit size of tmpfs /dev/shm ?
Date: Wed, 6 Feb 2008 15:29:32 +0000 (GMT) [thread overview]
Message-ID: <Pine.LNX.4.64.0802061517380.8470@blonde.site> (raw)
In-Reply-To: <47A9CA0E.3030507@wpkg.org>
On Wed, 6 Feb 2008, Tomasz Chmielewski wrote:
> > Hello Kernel Users,
> >
> > is there a size limit for tmpfs for the /dev/shm filesystem?
There shouldn't be any artificial size limit on the /dev/shm filesystem,
it's an "internal" mount, and those are unlimited by default. Which is
not to say that you magically receive unlimited memory along with it!
The practical limit would be somewhere round about the total size of
your swap plus, ooh, finger in the air, 75% of your RAM - though that
all depends on what else you'd be wanting to use RAM+swap for.
> > Normally its default size is set to 2 GB.
Hmm, where did that number come from, maybe I'm forgetting something.
The user-visible mounts are limited by default to half of ram, so if
you've 4GB of ram, then 2GB would be the default for those tmpfs mounts.
> > Is it possible to create a 2 TB (Terrabyte) filesystem with tmpfs?
Yes.
> > Or is there a maximum size defined in the linux kernel?
>
> Depends on your arch.
>
> If it's 32 bit, it's limited to 16TB:
>
> # mount -o size=16383G -t tmpfs tmpfs /mnt/2
> # df -h
> (...)
> tmpfs 16T 0 16T 0% /mnt/2
>
> # umount /mnt/2
>
> # mount -o size=16385G -t tmpfs tmpfs /mnt/2
> # df -h
> (...)
> tmpfs 1.0G 0 1.0G 0% /mnt/2
>
> So 16384G would mean the same as 0.
Hah! Nice investigation. That's more of a bug than anything,
though not one I feel urgently compelled to fix.
> If you're 64 bit, you need to have really loads of storage and/or RAM to
> accumulate 16EB:
>
> # mount -t tmpfs -o size=171798691839G tmpfs /mnt/2
> # df -h
> (...)
> tmpfs 16E 0 16E 0% /mnt/2
Mika, you answered:
> Nice, I will try this out.
> I have not the money for 16E of memory of RAM! :-) lol
> Already to provide 1 TB it would cost at least for the memory about 20 000
> EUR + the server costs which support this.
Don't forget that tmpfs overflows into swap, so you could save money
by adding adding more swap and cutting down on the RAM: though of
course that will perform very poorly once it's actually using the
swap, probably not the direction you want to go in.
Hugh
next prev parent reply other threads:[~2008-02-06 15:30 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-06 14:54 Tomasz Chmielewski
2008-02-06 15:06 ` rzryyvzy
2008-02-06 15:29 ` Hugh Dickins [this message]
2008-02-06 19:27 ` H. Peter Anvin
2008-02-06 19:48 ` Hugh Dickins
2008-02-06 19:53 ` H. Peter Anvin
2008-02-06 21:58 ` Hugh Dickins
2008-02-06 22:01 ` H. Peter Anvin
2008-02-06 22:40 ` Hugh Dickins
-- strict thread matches above, loose matches on Subject: below --
2008-02-06 13:54 Mika Lawando
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=Pine.LNX.4.64.0802061517380.8470@blonde.site \
--to=hugh@veritas.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mangoo@wpkg.org \
--cc=rzryyvzy@trashmail.net \
/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®