Confused about loading to RAM

Using applications, configuring, problems
Message
Author
Peterm321
Posts: 411
Joined: Thu 29 Jan 2009, 14:09
Location: UK

#21 Post by Peterm321 »

Appreciate the references to pfix=nocopy.

I appreciate that this thread is more or less closed but would like to mention the use of a swap partition. It may be worthwhile trying a swap partition and see if the OS is smart enough to use a LRU type method of swapping older unused memory objects to disk. I have 2GB of memory but the use of a swap partition allows me to mount /tmp via tmpfs with size more than 2GB, it will use the swap to extend tmpfs although tmpfs is memory based. Not sure if media playing or encoding requires the kind of random access that may not be handled well by the swapping mechanism but may be worth a try. Flash based media are not suitable for swapping partitions better use magnetic media for this.

User avatar
Pete
Posts: 660
Joined: Sun 02 Mar 2014, 18:36

#22 Post by Pete »

@Peterm321

Thanks for the idea of using a swap file.
Don't know if the media will like it, but hey, only one way to find out.
Will give it a go.

User avatar
bigpup
Posts: 13886
Joined: Sun 11 Oct 2009, 18:15
Location: S.C. USA

#23 Post by bigpup »

pfix=nocopy

This is a boot option for frugal installs.
Says to not load the Puppy main sfs file into memory.
Basically do not pre-load all the programs into memory.
Only the Puppy core operating system is loaded into memory.

Full installs, because of the way they work, are already doing the same thing.
Full installs only load the Puppy core operating system into memory.
Any programs have to be read from the storage device and loaded into memory, when you select them to run.

No matter how Puppy is installed.
Hope you realize there is a basic Puppy operating system, that gets loaded in memory, for Puppy to work at all.
The things they do not tell you, are usually the clue to solving the problem.
When I was a kid I wanted to be older.... This is not what I expected :shock:
YaPI(any iso installer)

User avatar
Pete
Posts: 660
Joined: Sun 02 Mar 2014, 18:36

#24 Post by Pete »

Hi bigpup

All sorted now.
Did a full install and RAM usage is around 300MB.
The rest of the 2GB is available for rendering.

kuman

Loading sfs into Ram

#25 Post by kuman »

I also noted loading the sfs file into Ram boots the pc up very fast & it runs smootly. The problem's with 1 Gb personal storage free space runs out very fast. I run Lucid 528.
Where do I need to enter pfix=nocopy in the boot menu of Lucid?

User avatar
rufwoof
Posts: 3690
Joined: Mon 24 Feb 2014, 17:47

#26 Post by rufwoof »

Attached is a image of a snapshot using htop, kinfocenter and free taken at similar times on a DebianDog32 frugal booted 2GB RAM system (htop and kinfocenter are dynamic with kinfocenter more or less giving a continual update, htop a update every few seconds ... so the figures in the snapshot all differ).

A point of note is the Disk Cache bar towards the bottom centre. That's with no pfix=ram type bootup. Without pfix=ram the system will more or less copy a puppy into ram anyway, but has the option to reuse that disk cache space for application space if the need so arises. With pfix=ram you more or less lock that amount of 'disk cache' such that other programs can't use that space.
Attachments
m.jpg
(43.37 KiB) Downloaded 137 times

User avatar
greengeek
Posts: 5789
Joined: Tue 20 Jul 2010, 09:34
Location: Republic of Novo Zelande

#27 Post by greengeek »

Pete wrote:Thanks for the idea of using a swap file.
Don't know if the media will like it, but hey, only one way to find out.
Will give it a go.
Having a swap file or swap partition can be valuable as it is usually unpredictable when your normal RAM will suddenly reach the point of being full. If yu do add a swap area make sure that it is created on the storage media that has the fastest throughput.

On some RAM challenged machines I use a usb stick as a swap partition and it works - but read/write speed of a usb stick is laughable compared to internal disk or RAM.

Your best SSD would be a good location for swap.

Also be aware that linux has a "swappiness" setting which is not normally changed in Puppy. This setting determines how the system defines the point at which it stops using RAM and starts using swap. The puppy setting is quite low and swapping starts at quite low RAM usage. Not ideal in some cases. It may be worth checking out this thread if you want to optimise swapiness:
http://murga-linux.com/puppy/viewtopic. ... b69d590b50

The main value of having swap is to prevent your system hanging or crashing at critical moments. If you don't care about that risk (because all you are doing is watching videos...) then swap may not offer you any benefit - especially if the swapiness is left at the default setting. As a matter of interest you can enter the command "free" in a terminal to see how much RAM is in use at the time that swap starts being used.

It may be that your fastest option is to have no swap at all - but be aware that your system may drop to it's knees and bog down without warning.

User avatar
Pete
Posts: 660
Joined: Sun 02 Mar 2014, 18:36

#28 Post by Pete »

Hi greengeek

Some good info about swap files, thank you.

I've sorted my problem by doing a full install and specifying pfix=nocopy.
Not sure if the nocopy does anything in a full install but it can't hurt.

Playing video files ain't the problem, it's creating them.
If they were just mp4's then no problems, the trouble is that I often get
1280x720 progressive videos from clients in strange frame rates and codecs.

I then have to convert them not only to 25fps but also have to interlace them,
convert to 1920x1080 and apply the bt709 colour space.
They also have to be at a constant bit rate of either 175 or 220 Mb/s to be broadcast compatible.
Also does not help that these videos can have up to 16 sound tracks all at 24 bit 48KHz pcm.
All this is then wrapped into a mxf container with embedded timecode.

As you can imagine all these operations consume huge amounts of ram.

kuman

greengeek

#29 Post by kuman »

The main value of having swap is to prevent your system hanging or crashing at critical moments.
It just happened to me today, so I had to restart, then lost a lot of time to resync FF. I have 4 partitions, is the one with Puppy's save file on the best or better?

User avatar
Pete
Posts: 660
Joined: Sun 02 Mar 2014, 18:36

#30 Post by Pete »

Not sure which partition will be best, I'm sure others will chime in, but got a 480GB SSD to use for my swap file, although not as fast as RAM, it's pretty darn quick.
USB flash drives although very cheap, they are dreadfully slow.

So now I have 2GB RAM, a 1TB 6Gb/s sata drive to save the videos to
and an internal 480GB SSD to set up as my swap file.

gcmartin

SWAP: Which device to use? Should it be a partition or file?

#31 Post by gcmartin »

@Kuman, I am not sure of your system layout as each of us has a different combination of HDD, USB, SSD, microSD, etc for storage.

SWAP is a protector attempting keep your system operational as RAM depletes. I am sure you are aware of the recommended size for SWAP and I always double it for MY purposes. The guidelines should and do work!

If you dont already have a SWAP partition setup, you can EITHER create a SWAP partition on some storage media OR create a SWAPfile mixed in with your data. Both do the same thing as far as your Linux system is concerned but the physical representation of SWAP is different;merely because a SWAP partition ONLY has SWAP data on the partition, while a SWAP file is on a partition that has other data. For me, I have never mixed SWAP/PAGE data with other files. Thus in all cases, I have a partition dedicated to ONLY those missions.

Lastly, every Linux/UNIX I have used over the past few decades auto-discovers SWAP partitions at boot time. BUT, there is ONLY 1 PUP distro that I have used which does not do this; that said, it is the only Linux I've ever used which is designed not to auto-discover. There are some forensic Linux that may/may-not autodiscover, but, I dont do forensics and have no need. All other PUPs I have used auto-discover SWAP.

None of what I have said pertains to your question, as it is merely a preface to your question.

Suggestion allowing you to answer your question
BUT, to offer a suggestion to how YOU can determine what you would feel is an acceptable storage device to use I offer this command:

Code: Select all

hdparm -t --direct /dev/sdX
Note, the "X" in the command; you will change it to a or b or c or ... for any&all storage devices in your PC. Then you can choose to use the one you feel is best for what happens when SWAP is needed on behalf of the running system. Be understanding that SWAP will have system traffic to and from the storage device as SWAP needs are interactive in your system.

Hope this is helpful

Post Reply