QuicksearchDisclaimerThe individual owning this blog works for Oracle in Germany. The opinions expressed here are his own, are not necessarily reviewed in advance by anyone but the individual author, and neither Oracle nor any other party necessarily agrees with them.
|
Less known Solaris features: The curious case of the /tmp in SolarisFriday, July 31. 2009Trackbacks
Trackback specific URI for this entry
No Trackbacks
Comments
Display comments as
(Linear | Threaded)
some Linux uses tmpfs for /tmp as well.
On Linux you can use /var/tmp to be on the safe side (or even better use a user specific temp). FHS also requires /var/tmp to persist over boots, whereas /tmp might be cleaned. Linux has an tmpfs mounted under /dev/shm for shared memory segments, one could link to it for /tmp, but it is better to mount two instances, so you can specify different size restrictions. Oracle uses /dev/shm on 32bit also for windowing larger SGAs. One has to make sure the window is mlockable for it. Gruss Bernd
Then the same things are valid vor Linux as well: Donīt use it as a storage for your isos
Bitte
I wish you would stop bashing on Linux or Linux admins -- I knew the difference between the /temporary/ solutions from year one.
When I saw the headline in the feedreader I was happy (new content from Joerg which hopefully extends my knowledge about Solaris or offers a differnt, interesting view). After the first paragraph I think: a grumpy old s*ck*r who can't write articles without bashing anything or anyone for a single month. This is sad. I hope one day you'll find a cure for your cynicism. But in the mean time you might continue to make jokes about Ubuntu Users in front of your fellow grumpy horde. I laugh about the Solaris fanboys who feature a ton of features aside from dtrace and ZFS which is based on GPL-Software which most of the time was created on linux desktops -- nothing to be ashamed of, but why the strong need to stress the differences? I'm interessed in both worlds but to be honestly the Solaris folk seems more and more like a strange mixture of marketing and bitterness too me. Not deserving to be called a "sunny" person. Maybe someday you get inspired by professional cynic Harald Schmidt who stopped making jokes about the pope for only one reason: it's too easy. Have a nice day.
Sorry, i didnīt want to bash Linux or Linux Admins. But as it's default on Solaris and it's not on Linux, many Linux admins simply don't think about this little known fact. And even most Solaris Admins, who know this, learned it the hard tour.
Perhaps i should explain how i got the idea to write this article: I've got a mail from a reader which said "Hey, could you please explain the differences between Linux and Solaris /tmp. I just found an ISO again in a /tmp" You have to handle the /tmp differently in Linux and Solaris. If you don't do it, there are several pitfalls you can fall into. And many people don't know this difference, otherwise the isos in Solaris /tmp are somewhat unexplainable for me. On most Linuxes it's the decision of the admin to switch over to a tmpfs based /tmp, the admin is aware of this situation and uses this accordingly. When such an admin switches over from Linux to Solaris, most would't think about the location of /tmp. I have to admit, that i wouldn't think about the /tmp on harddisk when using Linux und would wondering about the fact, that it isn't on a tmpfs disk, just because i'm accustomed to a different situation. All i wanted to say with this article is: Attention, Solaris /tmp behaves differently than most Linux /tmp. Act accordingly.
There is a reason for making tmpfs a default for /tmp in Solaris and that is that traditionally ufs is very paranoid about making any metadata operations in the filesystem, so file creation and deletion are synchronous - read: slow. On the other hand applications such as a compiler and linker create tons of temporary files in /tmp to pass data between the stages of a compile, and many other programs also use temporary files in $TMPDIR (/tmp if unset).
The immediate solution for this in Solaris was tmpfs, as a kind of stopgap measure, because it was easy to implement - at least easier than optimizing ufs metadata ops. Unfortunately it also was good enough and Sun was busy with ZFS so they never came around to actually fixing ufs and so we still have an 'unusual' /tmp in Solaris.
Yes, Sun engineering has this tendency, i would even say "overparanoid" at some occasions. But i tend to say, that you can't be too paranoid in regard of file systems. I don't know, who coined the phrase, but one of the key differences between Linux and Solaris is : "Solaris is pessimistic in its assumptions, Linux is optimistic in its assumption". Both assumptions are born out of the history of both systems and both have their advantages and disadvantages.
Benjamin,
two things: First I really didn't notice any bashing in the article - in fact, the reasoning was very valid. It's true, that in Linux /tmp is filesystem based and in Solaris virtual memory based, therefore people who have more experience with Linux tend to misunderstand Solaris' /tmp. That's a fact, I don't see why saying that should be considered bashing. Second if you think Solaris users are grumpy, you probably don't visit Linux sites very often, where people constantly talk about some "world domination" and about how Unix (and all other OSes actually) should already die and "get out of the way". Personally I feel, that Solaris users when compared to Linux guys are actually very nice and friendly bunch of people
This matches my experience: I visited a customer a while ago, who asked me "Why do you Solaris? You fragmenting the Unix space" expressed with strong and open hostility.
Thank you for explaining the history/motivation of the article.
I totally agree that there are a lot admins who are unaware of this features -- on both sides I guess. (I inherited my Linux setups from a former Solaris Admin and his assistant who made /var/tmp links to /tmp, sadly without documenting the change and the motivation (It's possible he explained the difference to the users back than and together they decided against it!) I absolutely agree that it is important to explain the differences between Linux and Solaris to interested admins and the reasons (standards being a very good point!) behind it. Btw. I tried to read this article with relaxed emotions but -- sure, could be I wanted it to read that way, but it sounded a bit to generalized towards Linux (funnily enough "standards" being its weakest spot, generally disable that). Because I think I'm between the UNIX/BSD and the Linux camps -- dreaming of a system that was created by cherry picking technologies, undetermined: loving & hating GNU tools, prefering Sol. & BSD quality of documentation -- I though it was reasonable to give feedback. Eventually, I never mistrusted the essence of your article. Read you soon.
the intent and motivation behind tmpfs(7FS) in Solaris ?
really an oldtimer, easy enough: http://www.solarisinternals.com/si/reading/tmpfs.pdf |
+1The LKSF bookThe book with the consolidated Less known Solaris Tutorials is available for download here
Web 2.0Contact
Networking xing.com My photos Buttons![]() This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Germany License
![]() ![]() ![]() Blog AdministrationDonateOkay, okay ... as several people have asked for it ... but you know my opinion.
|