FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo User

 
 
LinkBack Thread Tools
 
Old 05-26-2012, 07:46 PM
Jarry
 
Default How can I control size of /run (tmpfs)?

Hi,

after updating baselayout from 2.0.3 to 2.1-r1 /run is mounted
as tmpfs. But I can not find any mount-option for controlling
how much memory is (or could be) used for it.

Filesystem 1K-blocks Used Available Use% Mounted on
tmpfs 8223848 224 8223624 1% /run

I know it does not use 8GB right now, yet I'd like to reduce
it to some lower value, not half of my physical memory.
How can I do it? Can I simply add line in fstab like:

none /run tmpfs size=128m 0 0 ???

Jarry
--
__________________________________________________ _____________
This mailbox accepts e-mails only from selected mailing-lists!
Everything else is considered to be spam and therefore deleted.
 
Old 05-26-2012, 08:01 PM
Dale
 
Default How can I control size of /run (tmpfs)?

Jarry wrote:
> Hi,
>
> after updating baselayout from 2.0.3 to 2.1-r1 /run is mounted
> as tmpfs. But I can not find any mount-option for controlling
> how much memory is (or could be) used for it.
>
> Filesystem 1K-blocks Used Available Use% Mounted on
> tmpfs 8223848 224 8223624 1% /run
>
> I know it does not use 8GB right now, yet I'd like to reduce
> it to some lower value, not half of my physical memory.
> How can I do it? Can I simply add line in fstab like:
>
> none /run tmpfs size=128m 0 0 ???
>
> Jarry


Holy smoke ! Mine is doing the same thing.

tmpfs 7.9G 260K 7.9G 1% /run

But I also have this:

tmpfs 7.9G 0 7.9G 0% /var/tmp/portage

So, between those two, I could run out of ram since I have 16Gbs.

There is now TWO people that needs a answer to this question. Why does
it need that much anyway? It looks to me like a few hundred Mbs, like
Jarry posted, would be plenty. Jeepers creepers. lol

Dale

:-) :-)

--
I am only responsible for what I said ... Not for what you understood or
how you interpreted my words!

Miss the compile output? Hint:
EMERGE_DEFAULT_OPTS="--quiet-build=n"
 
Old 05-26-2012, 08:08 PM
Jarry
 
Default How can I control size of /run (tmpfs)?

On 26-May-12 22:01, Dale wrote:

Jarry wrote:


after updating baselayout from 2.0.3 to 2.1-r1 /run is mounted
as tmpfs. But I can not find any mount-option for controlling
how much memory is (or could be) used for it.

Filesystem 1K-blocks Used Available Use% Mounted on
tmpfs 8223848 224 8223624 1% /run

I know it does not use 8GB right now, yet I'd like to reduce
it to some lower value, not half of my physical memory.
How can I do it? Can I simply add line in fstab like:

none /run tmpfs size=128m 0 0 ???

Jarry


Holy smoke ! Mine is doing the same thing.
tmpfs 7.9G 260K 7.9G 1% /run

But I also have this:
tmpfs 7.9G 0 7.9G 0% /var/tmp/portage

So, between those two, I could run out of ram since I have 16Gbs.

There is now TWO people that needs a answer to this question. Why does
it need that much anyway? It looks to me like a few hundred Mbs, like
Jarry posted, would be plenty. Jeepers creepers. lol

Dale


I suppose default size for tmpfs is half of physical memory,
if it is not configured somewhere else.

BTW, is there any way to turn this great feature off?
What is it good for? I do not see any advantage in having
/run on tmpfs...

Jarry
--
__________________________________________________ _____________
This mailbox accepts e-mails only from selected mailing-lists!
Everything else is considered to be spam and therefore deleted.
 
Old 05-26-2012, 08:28 PM
Dale
 
Default How can I control size of /run (tmpfs)?

Jarry wrote:
> On 26-May-12 22:01, Dale wrote:
>> Jarry wrote:
>>>
>>> after updating baselayout from 2.0.3 to 2.1-r1 /run is mounted
>>> as tmpfs. But I can not find any mount-option for controlling
>>> how much memory is (or could be) used for it.
>>>
>>> Filesystem 1K-blocks Used Available Use% Mounted on
>>> tmpfs 8223848 224 8223624 1% /run
>>>
>>> I know it does not use 8GB right now, yet I'd like to reduce
>>> it to some lower value, not half of my physical memory.
>>> How can I do it? Can I simply add line in fstab like:
>>>
>>> none /run tmpfs size=128m 0 0 ???
>>>
>>> Jarry
>>
>> Holy smoke ! Mine is doing the same thing.
>> tmpfs 7.9G 260K 7.9G 1% /run
>>
>> But I also have this:
>> tmpfs 7.9G 0 7.9G 0% /var/tmp/portage
>>
>> So, between those two, I could run out of ram since I have 16Gbs.
>>
>> There is now TWO people that needs a answer to this question. Why does
>> it need that much anyway? It looks to me like a few hundred Mbs, like
>> Jarry posted, would be plenty. Jeepers creepers. lol
>>
>> Dale
>
> I suppose default size for tmpfs is half of physical memory,
> if it is not configured somewhere else.
>
> BTW, is there any way to turn this great feature off?
> What is it good for? I do not see any advantage in having
> /run on tmpfs...
>
> Jarry


I had no idea it was doing this either until your post. I got the same
questions as you do. Why is it there? Why so much is allocated to it?
Where can we change the settings for this questionable "feature"?

I'm hoping someone will come along and answer both our questions. I'm
really hoping for a place we can change the settings. I don't mind it
being there so much if it is useful. I would like to know its purpose
tho.

Dale

:-) :-)

--
I am only responsible for what I said ... Not for what you understood or
how you interpreted my words!

Miss the compile output? Hint:
EMERGE_DEFAULT_OPTS="--quiet-build=n"
 
Old 05-26-2012, 08:33 PM
Michael Mol
 
Default How can I control size of /run (tmpfs)?

On Sat, May 26, 2012 at 8:08 PM, Jarry <mr.jarry@gmail.com> wrote:
> On 26-May-12 22:01, Dale wrote:
>
>> Jarry wrote:
>>>
>>>
>>> after updating baselayout from 2.0.3 to 2.1-r1 /run is mounted
>>> as tmpfs. But I can not find any mount-option for controlling
>>> how much memory is (or could be) used for it.
>>>
>>> Filesystem * * 1K-blocks * *Used Available Use% Mounted on
>>> tmpfs * * * * * *8223848 * * 224 8223624 * 1% /run
>>>
>>> I know it does not use 8GB right now, yet I'd like to reduce
>>> it to some lower value, not half of my physical memory.
>>> How can I do it? Can I simply add line in fstab like:
>>>
>>> none /run tmpfs size=128m 0 0 * * * * ???
>>>
>>> Jarry
>>
>>
>> Holy smoke ! *Mine is doing the same thing.
>> tmpfs * * * * * * * * * 7.9G *260K *7.9G * 1% /run
>>
>> But I also have this:
>> tmpfs * * * * * * * * * 7.9G * * 0 *7.9G * 0% /var/tmp/portage
>>
>> So, between those two, I could run out of ram since I have 16Gbs.
>>
>> There is now TWO people that needs a answer to this question. *Why does
>> it need that much anyway? *It looks to me like a few hundred Mbs, like
>> Jarry posted, would be plenty. *Jeepers creepers. *lol
>>
>> Dale
>
>
> I suppose default size for tmpfs is half of physical memory,
> if it is not configured somewhere else.
>
> BTW, is there any way to turn this great feature off?
> What is it good for? I do not see any advantage in having
> /run on tmpfs...

If /var/run is described in /etc/fstab, then you can use mount options
to control the maximum size of the tmpfs.

http://www.kernel.org/doc/Documentation/filesystems/tmpfs.txt

--
:wq
 
Old 05-26-2012, 08:40 PM
Neil Bothwick
 
Default How can I control size of /run (tmpfs)?

On Sat, 26 May 2012 22:08:48 +0200, Jarry wrote:

> I suppose default size for tmpfs is half of physical memory,
> if it is not configured somewhere else.

It is, but that is the default maximum size, a tmpfs filesystem uses
only as much memory as its contents require.

> BTW, is there any way to turn this great feature off?
> What is it good for? I do not see any advantage in having
> /run on tmpfs...

It makes sure that /run is available and writeable early in the boot
process, whereas /var/run may not be and / may be mounted ro.


--
Neil Bothwick

Of all the people I've met you're certainly one of them
 
Old 05-26-2012, 08:43 PM
Michael Mol
 
Default How can I control size of /run (tmpfs)?

On Sat, May 26, 2012 at 8:28 PM, Dale <rdalek1967@gmail.com> wrote:

[snip]

> I had no idea it was doing this either until your post. *I got the same
> questions as you do. *Why is it there?

tmpfs is frequently used in places where data doesn't need to persist
across reboots. /var/run meets this description, because it usually
contains files that have PID numbers for running daemons. (i.e. an
init script spawns acpid, saves the PID of that instance into a file
under /var/run, and consults that file on future runs to see if the
daemon it's responsible for is running).

It also appears to be where udev keeps its current understanding of
the running host machine.

> *Why so much is allocated to it?

It's not, really. That's a *maximum* theoretical size, which is only
reached if files are placed there.
 
Old 05-26-2012, 08:44 PM
Alex Schuster
 
Default How can I control size of /run (tmpfs)?

Dale writes:

> Jarry wrote:
>> On 26-May-12 22:01, Dale wrote:
>>> Jarry wrote:
>>>>
>>>> after updating baselayout from 2.0.3 to 2.1-r1 /run is mounted
>>>> as tmpfs. But I can not find any mount-option for controlling
>>>> how much memory is (or could be) used for it.
>>>>
>>>> Filesystem 1K-blocks Used Available Use% Mounted on
>>>> tmpfs 8223848 224 8223624 1% /run
>>>>
>>>> I know it does not use 8GB right now, yet I'd like to reduce
>>>> it to some lower value, not half of my physical memory.
>>>> How can I do it? Can I simply add line in fstab like:
>>>>
>>>> none /run tmpfs size=128m 0 0 ???

Just try it I don't know if this would work, probably yes. But you
can change it later with mount -o remount,size=128m /run

>>> Holy smoke ! Mine is doing the same thing.
>>> tmpfs 7.9G 260K 7.9G 1% /run
>>>
>>> But I also have this:
>>> tmpfs 7.9G 0 7.9G 0% /var/tmp/portage

Now have a look at /dev/shm...

>>> So, between those two, I could run out of ram since I have 16Gbs.

But only if you copy stuff to /run yourself, otherwise this will never
happen.

>>> There is now TWO people that needs a answer to this question. Why does
>>> it need that much anyway? It looks to me like a few hundred Mbs, like
>>> Jarry posted, would be plenty. Jeepers creepers. lol

It doesn't need it, it's just the maximum sitze, which it will never reach.


>> I suppose default size for tmpfs is half of physical memory,
>> if it is not configured somewhere else.
>>
>> BTW, is there any way to turn this great feature off?
>> What is it good for? I do not see any advantage in having
>> /run on tmpfs...

In case of power failure or lockup, the contents are lost, and will not
cause confusion on the next reboot when /run is still populated by
stuff. Just an idea, I do not know if it would really matter.
But it does no harm, so why not juest keep it like it is.


> I had no idea it was doing this either until your post. I got the same
> questions as you do. Why is it there? Why so much is allocated to it?
> Where can we change the settings for this questionable "feature"?
>
> I'm hoping someone will come along and answer both our questions. I'm
> really hoping for a place we can change the settings. I don't mind it
> being there so much if it is useful. I would like to know its purpose
> tho.

I don't know the details, but I'd think it does not matter. There will
nothing be put into /run that uses a lot of memory, so it will never
actually use its default size of half of your RAM.

Wonko
 
Old 05-26-2012, 09:02 PM
Michael Hampicke
 
Default How can I control size of /run (tmpfs)?

Am 26.05.2012 22:28, schrieb Dale:
> Jarry wrote:
>> On 26-May-12 22:01, Dale wrote:
>>> Jarry wrote:
>>>>
>>>> after updating baselayout from 2.0.3 to 2.1-r1 /run is mounted
>>>> as tmpfs. But I can not find any mount-option for controlling
>>>> how much memory is (or could be) used for it.
>>>>
>>>> Filesystem 1K-blocks Used Available Use% Mounted on
>>>> tmpfs 8223848 224 8223624 1% /run
>>>>
>>>> I know it does not use 8GB right now, yet I'd like to reduce
>>>> it to some lower value, not half of my physical memory.
>>>> How can I do it? Can I simply add line in fstab like:
>>>>
>>>> none /run tmpfs size=128m 0 0 ???
>>>>
>>>> Jarry
>>>
>>> Holy smoke ! Mine is doing the same thing.
>>> tmpfs 7.9G 260K 7.9G 1% /run
>>>
>>> But I also have this:
>>> tmpfs 7.9G 0 7.9G 0% /var/tmp/portage
>>>
>>> So, between those two, I could run out of ram since I have 16Gbs.
>>>
>>> There is now TWO people that needs a answer to this question. Why does
>>> it need that much anyway? It looks to me like a few hundred Mbs, like
>>> Jarry posted, would be plenty. Jeepers creepers. lol
>>>
>>> Dale
>>
>> I suppose default size for tmpfs is half of physical memory,
>> if it is not configured somewhere else.
>>
>> BTW, is there any way to turn this great feature off?
>> What is it good for? I do not see any advantage in having
>> /run on tmpfs...
>>
>> Jarry
>
>
> I had no idea it was doing this either until your post. I got the same
> questions as you do. Why is it there? Why so much is allocated to it?
> Where can we change the settings for this questionable "feature"?
>
> I'm hoping someone will come along and answer both our questions. I'm
> really hoping for a place we can change the settings. I don't mind it
> being there so much if it is useful. I would like to know its purpose
> tho.

As Michael Mol already said, tmpfs for the run dir is not a bad thing,
it, it does not eat all your ram
I however have a different question: Why do we need a new /run when we
already have /var/run. There's no mention of /run in the FHS either.
I only see udev stuff under /run - So it's another crazy udev thing?
 
Old 05-26-2012, 09:20 PM
Michael Mol
 
Default How can I control size of /run (tmpfs)?

On Sat, May 26, 2012 at 9:02 PM, Michael Hampicke <gentoo-user@hadt.biz> wrote:

[snip]

> As Michael Mol already said, tmpfs for the run dir is not a bad thing,
> it, it does not eat all your ram
> I however have a different question: Why do we need a new /run when we
> already have /var/run. There's no mention of /run in the FHS either.
> I only see udev stuff under /run - So it's another crazy udev thing?

Neil had the best response to that, IMO:


"It makes sure that /run is available and writeable early in the boot
process, whereas /var/run may not be and / may be mounted ro."

--
:wq
 

Thread Tools




All times are GMT. The time now is 08:49 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org