How much ram does puppy need? Some test results

Using applications, configuring, problems
Message
Author
User avatar
alienjeff
Posts: 2265
Joined: Sat 08 Jul 2006, 20:19
Location: Winsted, CT - USA

#16 Post by alienjeff »

8-bit wrote:It boots slow, but comes up with the desktop and apps available and memory left too according to Free.
So I figure that a true memory needed test is having enough memory to hold the kernel and xwindow manager. The applications can be loaded as needed after that!

So you just might have to rethink your minimum memory requirements for
each version.
We've drifted into the Semantics Zone, I'm afraid ...

Although 214R with a full HD install has loaded and runs on that Compaq, it's going "run" like a sloth. You'll note that there's 1316 free conventional memory and 2152 used of swap memory - which indicates that between the kernel, Xorg and the desktop, you're already into swap. HD thrashing is just moments away.

To say Puppy 214R will load and run on a 133MHz/32M box isn't technically false, but I fear many newcomers are arriving with preconceived notions of "fast" and "speed," which will not be the case with that box.

So it's not a case of HairyWill needing to rethink minimum memory requirements for each version, but is a case of the community needing to more clearly define the terminology used to describe, and in some cases advertise Puppy.

Puppy is offered "as is" with no guarantees written or implied, however the stigma of false or deceptive advertising, however innocent, can still have a detrimental affect on the distro.
[size=84][i]hangout:[/i] ##b0rked on irc.freenode.net
[i]diversion:[/i] [url]http://alienjeff.net[/url] - visit The Fringe
[i]quote:[/i] "The foundation of authority is based upon the consent of the people." - Thomas Hooker[/size]

User avatar
HairyWill
Posts: 2928
Joined: Fri 26 May 2006, 23:29
Location: Southampton, UK

#17 Post by HairyWill »

OK, here is another one that helps to illustrate AJs point. The bottom three curves are MemTotal-MemFree-Buffers-Cache, this is basically the minimum amount of memory required for it to work at all. The top three curves are just MemTotal-MemFree and give an indication of how much memory is allocated. My system has 512MB RAM so the kernel is being lazy about claiming back cache space that might no longer be in use. It is more efficient on processor cycles not to worry about claiming back cache space if it is not needed for something else.

The interesting point about the top curves is that after 70 seconds they show about 70MB of space still allocated to cache even though all the programs have long been killed. This space could be recovered if it was needed. My complete guess is that the space recovered when the programs are killed is clean and stale whereas the cache not recovered is dirty.
[edit]Reconsidering this, it might make more sense for the OS to clean up the dirty cache whilst its processor load is low. Recovering clean cache isn't so critical as it is very cheap to recover when and if it is needed[/edit]

Image

Lots of ram and a slow processor allows cache space to be left allocated just in case it might be needed again (this is the reason for puppy's success, a bit of extra ram is generally cheaper than a faster processor)

Very little ram with a fast processor will involve lots and lots of swapping as cache space gets reclaimed aggressively for a higher priority process. Data may have to be reloaded from disk many times in order for a process to complete. The speed of access to your disk will be important here.

Very little ram and a slow processor results in your processor spending most of the precious few cycles it has swapping stuff to and from disk and getting very hot!

Terminology
Stale cache, no longer needed.
Clean cache has not been written to since it was loaded and can simply be overwritten if it is not being used.
Dirty cache has been written to since it was loaded and cannot simply be thrown away it must be written back to disk (expensive).

A common misconception is that a deficiency in RAM can be completely overcome by creating some swap space, partition or file on disk. The problem with this is that disk space is still on disk and has comparatively low access times. The good side of swap space is that it is cheap to have lots of it so the kernel does not have to spend a lot of time managing it and can be lazy about reclaiming stale space.

It is generally a bad idea to have significantly more swap space than ram. This stops the kernel from being so careful about managing its space allocation and can can result in a lot of cycles being used up swapping stuff to and from disk.

My second year operating systems lecturer would be proud. Some of this stuff has stayed in my head for 6 years. I'm afraid I can't warrant for its accuracy though.
Last edited by HairyWill on Wed 19 Dec 2007, 23:46, edited 1 time in total.
Will
contribute: [url=http://www.puppylinux.org]community website[/url], [url=http://tinyurl.com/6c3nm6]screenshots[/url], [url=http://tinyurl.com/6j2gbz]puplets[/url], [url=http://tinyurl.com/57gykn]wiki[/url], [url=http://tinyurl.com/5dgr83]rss[/url]

User avatar
8-bit
Posts: 3406
Joined: Wed 04 Apr 2007, 03:37
Location: Oregon

#18 Post by 8-bit »

HarryWill,
That was a very good presentation. And this 59 year old dog agrees with you.
AlienJeff, I was just making a point of puppy being able to even boot to desktop on that low memory machine.
I fully agree with the views on memory usage.

And I started using computers back in the days of memory being referenced as to how many kilobytes of memory a computer had.
Also, most if not all computers manufactured are not hardwired to be able to access physical memory amounts beyond a certain point.
The processor support for it is there. But the memory addressing support is not.

Sage
Posts: 5536
Joined: Tue 04 Oct 2005, 08:34
Location: GB

#19 Post by Sage »

Thanks for a most instructive exposition, HW. I think, but couldn't be sure that it verifies what I've been finding, and reporting, by experiment. Obviously, as a non-IT person, I was unable to quantify all this but have constantly warned against implementing too much swap, willy nilly.

Since AMD and Intel processors behave rather differently in detail in respect of microcode as well as physical design, location and deployment of on-chip as well as general cache handling, would you care to speculate on whether there might be any significant difference in their behaviour in practice?
Anecdotally and entirely subjectively, I've always found AMD, post-SktA 'faster', or should that be 'better', in a finger-in-wind kind of way. But I don't care for Intel business practices, either, so am hardly an objective judge!?!

setecio
Posts: 326
Joined: Wed 01 Nov 2006, 12:09
Location: UK

#20 Post by setecio »

Very interesting .... I think I might resize my swap partition. :oops:

I went by windoze recommendation of 1.5 to 3 times RAM, with 224 RAM, I created a swap of 600MB.

So what would be a good Swap size guide for Puppy ?

Would it be in the form of RAM + SWAP = certain figure (300 ? 400? ) with a minimum of 128 ? (I've no idea myself)

User avatar
alienjeff
Posts: 2265
Joined: Sat 08 Jul 2006, 20:19
Location: Winsted, CT - USA

#21 Post by alienjeff »

setecio wrote:So what would be a good Swap size guide for Puppy ?
Heh...another loaded question, albeit innocently so.

Swap size will be dictated by what your computing habits are. The latest trend, if you can call it that, on this forum is 1-2 times your RAM. Try starting with 1X and see how your system responds. If you hear your drive thrashing much of the time, you may need more swap space. Remember that Linux memory management is superior to that of Windows.

Also remember that a frugal install is more than likely to utilize swap more frequently than a full install. Again, your personal computing habits come into play here.
[size=84][i]hangout:[/i] ##b0rked on irc.freenode.net
[i]diversion:[/i] [url]http://alienjeff.net[/url] - visit The Fringe
[i]quote:[/i] "The foundation of authority is based upon the consent of the people." - Thomas Hooker[/size]

Post Reply