public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Is /dev/shm needed?
@ 2001-12-16 22:02 RaúlNúñez de Arenas Coronado
  2001-12-16 22:30 ` Robert Love
  0 siblings, 1 reply; 21+ messages in thread
From: RaúlNúñez de Arenas Coronado @ 2001-12-16 22:02 UTC (permalink / raw)
  To: Linux-kernel

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 462 bytes --]

    Hello all :))

    I don't know if /dev/shm (mounted with shmfs or the newer tmpfs)
is needed for proper SYSV IPC operation with newer (2.4.16 and newer)
kernel. Anyone can help?

    Moreover: I want to move my /tmp from disk to tmpfs for speed (I
make a lot of compiling, so I think it would help). Is this a good
idea? If so, what size can be appropriate for a small system that is
not permanently running?

    Thanks a lot for the answers :))

    Raúl

^ permalink raw reply	[flat|nested] 21+ messages in thread
* Re: Is /dev/shm needed?
@ 2001-12-16 23:15 RaúlNúñez de Arenas Coronado
  2001-12-16 23:12 ` Robert Love
  2001-12-17  8:19 ` Christoph Rohland
  0 siblings, 2 replies; 21+ messages in thread
From: RaúlNúñez de Arenas Coronado @ 2001-12-16 23:15 UTC (permalink / raw)
  To: raul, rml; +Cc: linux-kernel

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 511 bytes --]

    Hello Robert :)

>It is not needed.  /dev/shm mounted with tmpfs is only needed for POSIX
>shared memory, which is still fairly rare.

    That this means that I can mount more than one 'tmpfs' just like
if it's a *real* filesystem? I wasn't sure, since it's implemented
thru the page cache.

>It is dynamic, so you don't need to specify a size.

    Yes, I knew, I meant the maximum size. I don't want half of the
RAM occupied just by a programming mistake ;)))

    Thanks a lot for your help :)
    Raúl

^ permalink raw reply	[flat|nested] 21+ messages in thread
* Re: Is /dev/shm needed?
@ 2001-12-16 23:36 RaúlNúñez de Arenas Coronado
  0 siblings, 0 replies; 21+ messages in thread
From: RaúlNúñez de Arenas Coronado @ 2001-12-16 23:36 UTC (permalink / raw)
  To: raul, rml; +Cc: linux-kernel

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 738 bytes --]

    Hi Robert :))

>> if it's a *real* filesystem? I wasn't sure, since it's implemented
>> thru the page cache.
>Yes, you can mount as many as you like.

    Ok, then :)))) I'm testing /tmp over tmpfs right now. I don't
notice a great improvement in speed. I have plenty of RAM for my box,
and I think that, just as you said, when I'm compiling the contents
of the /tmp are always cached, no matter if using tmpfs or not.

    I'll try with higher loads and more processes trying to fill up
/tmp ;))

>See Documentation/filesystems/tmpfs.txt for more information.

    I'm afraid my 2.4.16 doesn't come with that file :((( My fault,
probably, although I don't remember touching the docs :???

    Thanks a lot for your help :)

    Raúl

^ permalink raw reply	[flat|nested] 21+ messages in thread
* Re: Is /dev/shm needed?
@ 2001-12-16 23:37 RaúlNúñez de Arenas Coronado
  2001-12-16 23:47 ` Adam Schrotenboer
  2001-12-17 15:50 ` Luigi Genoni
  0 siblings, 2 replies; 21+ messages in thread
From: RaúlNúñez de Arenas Coronado @ 2001-12-16 23:37 UTC (permalink / raw)
  To: adam, raul, rml; +Cc: linux-kernel

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 503 bytes --]

    Hello Adam :))

>> have lots of memory to spare, give it a try.  Mount /tmp or all of /var
>> in tmpfs.
>Unfortunately, some(many?) distros are b0rken in re /var/. There is
>stuff put there that is needed across boots (for example, mandrake
>puts the DNS master files in /var/named.)

    Moreover, didn't the LHS say that /var/tmp is supposed to be
maintained across reboots? I'm not sure about this, but anyway /var
is supposed to hold temporary data, not boot-throwable data, isn't
it?

    Raúl

^ permalink raw reply	[flat|nested] 21+ messages in thread
* Re: Is /dev/shm needed?
@ 2001-12-17  4:14 Jason Rivard
  0 siblings, 0 replies; 21+ messages in thread
From: Jason Rivard @ 2001-12-17  4:14 UTC (permalink / raw)
  To: linux-kernel

I delete all files in /tmp on reboot +
I delete all of <user>'s files in /tmp if <user> has no running
processes when <user> logs out.

>>> "H. Peter Anvin" <hpa@zytor.com> 12/16/01 09:26PM >>>
Followup to:  <E16Fl8j-0000nA-00@phalynx>
By author:    Ryan Cumming <bodnar42@phalynx.dhs.org>
In newsgroup: linux.dev.kernel
>
> On December 16, 2001 15:47, Adam Schrotenboer wrote:
> > I may be wrong about /tmp as well, but I have come to think that it
is data
> > that ought be discarded after logout, and have sometimes considered
writing
> > a script for it in the login/logout scripts.
> 
> System daemons can legally use /tmp, and they may not apprechiate
having 
> their files removed from underneath them everytime someone telnets
in. ;)
> 

Not to mention when you kill a secondary session.  It's bogus.
However, discarding /tmp on *REBOOT* is legitimate.

	 -hpa
-- 
<hpa@transmeta.com> at work, <hpa@zytor.com> in private!
"Unix gives you enough rope to shoot yourself in the foot."
http://www.zytor.com/~hpa/puzzle.txt	<amsp@zytor.com>
-
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/

^ permalink raw reply	[flat|nested] 21+ messages in thread
* Re: Is /dev/shm needed?
@ 2001-12-17  8:41 RaúlNúñez de Arenas Coronado
  2001-12-17  8:34 ` Christoph Rohland
  0 siblings, 1 reply; 21+ messages in thread
From: RaúlNúñez de Arenas Coronado @ 2001-12-17  8:41 UTC (permalink / raw)
  To: cr, raul; +Cc: linux-kernel, rml

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 552 bytes --]

    Hi Christoph :)

>>     Yes, I knew, I meant the maximum size. I don't want half of the
>> RAM occupied just by a programming mistake ;)))
>What I like most about /tmp in tmpfs is the ability to resize on the
>fly
[...]
>When one of these gets full I can either stop the affending job or
>increase the limit

    That's one of my doubts: if the available RAM decreases then the
buffer (disk) cache will do too. So, if I have /tmp mounted with
tmpfs, the contents here will be cached no matter the available RAM,
or am I completely wrong?

    Raúl

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

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

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-12-16 22:02 Is /dev/shm needed? RaúlNúñez de Arenas Coronado
2001-12-16 22:30 ` Robert Love
2001-12-16 23:13   ` Adam Schrotenboer
2001-12-16 23:26     ` J Sloan
2001-12-16 23:27   ` Alexander Viro
2001-12-17  9:03     ` Jurgen Botz
  -- strict thread matches above, loose matches on Subject: below --
2001-12-16 23:15 RaúlNúñez de Arenas Coronado
2001-12-16 23:12 ` Robert Love
2001-12-16 23:31   ` Pierfrancesco Caci
2001-12-17  8:36     ` ncw
2001-12-17  8:19 ` Christoph Rohland
2001-12-16 23:36 RaúlNúñez de Arenas Coronado
2001-12-16 23:37 RaúlNúñez de Arenas Coronado
2001-12-16 23:47 ` Adam Schrotenboer
2001-12-16 23:56   ` Ryan Cumming
2001-12-17  0:17     ` Adam Schrotenboer
2001-12-17  2:26     ` H. Peter Anvin
2001-12-17 15:50 ` Luigi Genoni
2001-12-17  4:14 Jason Rivard
2001-12-17  8:41 RaúlNúñez de Arenas Coronado
2001-12-17  8:34 ` Christoph Rohland

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