[kde-solaris] ... people are running KDE3 on systems with as little as 64MB for daily use.

Rolf Sponsel Rolf.Sponsel at kstr.lth.se
Wed Jan 28 15:35:41 CET 2004


My replies are inlined.

Stefan Teleman wrote:

> Hi! :-)
> 
> My replies are inlined.
> 
> On Wednesday 28 January 2004 05:41, Rolf Sponsel wrote:
> 
>>Please bear with me ;-) this is *not* a flame.
>>I'm just trying to understand this better.
>>
>>
>>Obviously there is something that I
>>haven't understood yet about Solaris. 
> 
> There are many things i don't understand about Solaris either. :-)
> 
That makes us at least two then!? :-)

>> From my understanding, for Solaris 2 (SPARC),
>>the *available memory* is RAM + SWAP (which
>>can be either on a separate partition, or
>>a swap file on any ordinary partition).
> 
> 
> Yes.
> 

Agreed! :-)

> 
>>Additionally, the '/tmp' file system (by
>>default) is allocated from the space of
>>available memory.
> 
> 
> This is what i am not sure about. My understanding is that, on 
> Solaris, if /tmp is not mounted on its separate disk partition, the 
> kernel will create a TMPFS partition 

Agreed! :-)

> on /tmp when mounting swap, at 
> boot time, and mount swap on it -- if this is not true, and i am 
> being bogus, please say so. :-)

Okay then, no offence taken please! ;-)

Well, in this latter part I'd say it's the other way
round, to my understanding. I.e. If no separate disk
partition is mounted on/as '/tmp' then Solaris will
automatically create a TMPFS file system (not partition),
allocated from *available memory* (RAM + SWAP), and
mount it on '/tmp'.

At least that is what I've been used to, and what I
understand (I'm not native english speaking) from
reading about this in the Solaris docs.

Please see (first 4 paragraphs):

http://docs.sun.com/db/doc/817-2874/6migoiaaj?q=swap&a=view


> With this configuration, this 
> explains why, when rebooting Solaris, the files in /tmp are gone, and 
> /tmp is re-created. 

Isn't this what what '/tmp' is all about? I.e. being temporary?
Do you know whether files in an mounted tmp-partition survive a
reboot or not?

> Now, if, during normal usage/running of Solaris, 
> some big files accumulate under /tmp (which is mounted as TMPFS) they 
> will take space out of the swap partition, in fact.

Agreed! :-)

> So, the system 
> may have, initially, started out with plenty of virtual memory, but 
> something (or somethings) got dumped or written to /tmp, or written 
> to, /tmp, and now they are taking a lot of space from swap. So, all 
> of a sudden there's a swap space problem when there didn't use to be 
> one.

Agreed! :-)

And it's possible to set a size limit, option '-o <size>' for
how much the TMPFS can use of the available swap resources.

But, still, this doesn't explain why a set of application,
e.g. KDE, that runs fine with a certain amount of RAM + SWAP
would require explicit increase of SWAP just because of adding
additional RAM (which implicitly increases SWAP by itself).

This doesn't make sense to me. I'm sorry, but the coin doesn't drop. :-(

Let's use KDE as an example. Just because of increasing the amount
of RAM; KDE won't use any more of the '/tmp' resources, would it?

> Best way to avoid it, is to mount /tmp under its own personal 
> disk partition, which is what Marco was suggesting the other day -- 
> my Sun boxes, and many Sun boxes i've seen are configured this way.
> 

Well, I guess, anything that makes you get past
a problem should be fine (at least most of the
time). But, still, one has to ask *why* and try
to find the answer - because there is a rational
answer. Or there, most likely, is a problem some-
where.

In this particular case that would be either in
Solaris, KDE, or in the way KDE is built (or possibly
depending on the Solaris release or architecture).

I don't know which. I'm just sure it doesn't have
anything to do with *magic* :-)

Finally Stefan! I'm sure everbody is really, really
greatful to You for building and providing your KDE
binaries.

> 
>>Now, if one has a set of applications that
>>run fine on, let's say 128MB RAM (alt .5GB)
>>and 384MB SWAP (alt 1.5GB); then I don't
>>understand why that *same* set of applications
>>with the configuration .5GB (alt 2GB) and
>>0MB SWAP (alt 0GB) should *not* run fine.
> 
> 
> It could be the thing above. And it could also very well be that, the 
> swapper makes decisions on how and when to swap based on the size of 
> core RAM. One machine has little RAM, the swapper decides "well, 
> there's probably going to be not a lot of swap, so i better behave".  
> Another machine has a lot of RAM, the swapper decides "lots of RAM, 
> i'm going to swap, to keep as much core free as possible". 
> 
> There's one other aspect: Linux seems to have very different swapping 
> habits than Solaris. My experience has been that Linux tries to avoid 
> swapping at all costs, whereas Solaris tries to keep as much free 
> core as possible, and swaps significantly more than Linux.

As I wrote in an earlier e-mail:

"... the physical memory required to be backed-up
  by "disk-backed" swap space (which also seems to be true
  for the majority of other non-Solaris Unix systems), ..."

And I think this is true for Linux too (but this I really
don't anything about).

Regards / Rolf

> 
> --Stefan
> 
> ------
> 
> 
>>
>>Best Regards / Rolf
>>
>>
>>Ps. I could accept the "magic" fact that one
>>     needs a swap of about 3 times RAM, but I
>>     do not yet understan why. I'm sure it's
>>     explained somewhere, but so far I haven't
>>     managed to find that information/document.
>
> ... DELETED ...

-- 
----
------
--------

Rolf Sponsel

___________________________________________e_n_d___o_f___m_e_s_s_a_g_e_



More information about the kde-solaris mailing list