Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Fri 20 Jul 2018, 14:45
All times are UTC - 4
 Forum index » Advanced Topics » Cutting edge
Ideal ratio between size of pupsave and size of RAM?
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 2 of 3 [35 Posts]   Goto page: Previous 1, 2, 3 Next
Author Message
hamoudoudou


Joined: 24 Jul 2014
Posts: 1317
Location: rabat

PostPosted: Mon 16 Apr 2018, 14:38    Post subject: just to clarify how Ram is loaded at boot  

just to clarify how Ram is loaded at boot
pup2underdog.png
 Description   Pupsave is loaded before main SFS
 Filesize   24.42 KB
 Viewed   312 Time(s)

pup2underdog.png


Last edited by hamoudoudou on Fri 20 Apr 2018, 16:38; edited 2 times in total
Back to top
View user's profile Send private message 
gyro

Joined: 28 Oct 2008
Posts: 1528
Location: Brisbane, Australia

PostPosted: Mon 16 Apr 2018, 19:23    Post subject: Re: just to clarify how Ram is loaded at boot  

hamoudoudou wrote:
just to clarify how Ram is loaded at boot
Sorry, the diagram shows the structure of the aufs/unionfs stack that gets mounted in an underdog Puppy.
It does not show which elements actually reside in ram.

But please don't take my word for it. Read the source, it's found in "/initrd/init".

gyro
Back to top
View user's profile Send private message 
bigpup


Joined: 11 Oct 2009
Posts: 10716
Location: Charleston S.C. USA

PostPosted: Mon 16 Apr 2018, 23:51    Post subject:  

Simply watch the boot process messages.
They tell you what gets loaded and when.

_________________
I have found, in trying to help people, that 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 Shocked
Back to top
View user's profile Send private message 
hamoudoudou


Joined: 24 Jul 2014
Posts: 1317
Location: rabat

PostPosted: Wed 18 Apr 2018, 22:37    Post subject: it runs full in RAM.  

The Puppy Linux Trade mark is to be fast because it runs full in RAM.
"Puppy Linux is yet another Linux distribution. What's different here is that Puppy is extraordinarily small, yet quite full-featured. Puppy boots into a ramdisk and, unlike live CD distributions that have to keep pulling stuff off the CD, it loads into RAM. " Xenialpup 7.5, Distrowatch

Searching and asking at boot which pupsaves to load, then immediately loading one of them. We are used to that... and that is the reason why a Puppy must be tiny..
Sure you can run without pupsave, and load on the fly SFS just needed for the session.. by a click on it.. easy.
If the 'click on it' process is too easy, sure experts can write scripts, (re-write the script hidden behind GUI's, located in sbin).
SFS.jpg
 Description   unload them before shutdown.. keep on the fly
 Filesize   54.6 KB
 Viewed   227 Time(s)

SFS.jpg

Back to top
View user's profile Send private message 
gyro

Joined: 28 Oct 2008
Posts: 1528
Location: Brisbane, Australia

PostPosted: Thu 19 Apr 2018, 00:46    Post subject:  

@hamoudoudou,
Unfortunately the "Loading" you refer to in your image means that the savefile/savefolder is being loaded into the aufs stack.
Not that it is being copied into ram.

I recognise only 1 authority as to what the "init" script does, the source code of the "init" script.

gyro
Back to top
View user's profile Send private message 
bigpup


Joined: 11 Oct 2009
Posts: 10716
Location: Charleston S.C. USA

PostPosted: Thu 19 Apr 2018, 04:01    Post subject:  

hamoudoudou

Also, that image you posted is not showing a normal boot up.
It is showing a boot up, doing a update of the Puppy OS version.
Totally different boot process from a normal boot up.

_________________
I have found, in trying to help people, that 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 Shocked
Back to top
View user's profile Send private message 
hamoudoudou


Joined: 24 Jul 2014
Posts: 1317
Location: rabat

PostPosted: Thu 19 Apr 2018, 13:10    Post subject: we are so used with these scripts...  

this screensot perhaps fits better to show that pupsave is loaded before main SFS i hope... Screenshot from you tube tutorials
pupsave.jpg
 Description   we are so used with these scripts...
 Filesize   52.62 KB
 Viewed   180 Time(s)

pupsave.jpg

Back to top
View user's profile Send private message 
bigpup


Joined: 11 Oct 2009
Posts: 10716
Location: Charleston S.C. USA

PostPosted: Thu 19 Apr 2018, 23:36    Post subject:  

That is the way Puppy 4.3.1 did it.


Newer versions of Puppy load/mount the Save last.

Example:
Xenialpup 7.5 loads in this order.
Xenialpup.sfs into ram.
zdrv_xenialpup.sfs into ram.
xenialpupsave loaded

Again, saves are not loaded into ram, only mounted.

_________________
I have found, in trying to help people, that 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 Shocked
Back to top
View user's profile Send private message 
hamoudoudou


Joined: 24 Jul 2014
Posts: 1317
Location: rabat

PostPosted: Fri 20 Apr 2018, 02:39    Post subject: PUPmode13  

i agree about how xenialpup loads.. and that is new..
About DVD-rw and sessions saved on it that is a fact that you can remove DVD during session, all is loaded in RAM
pendrive : Pupmode13

I Never use Hard Drive Sorry
The default mode for hard drive running is PUPMODE=12. In this mode, all writes are immediately passed through onto the save file image. Thus, there will be frequent writes as you keep modifying data/develop temp files, etc...
[/b]
PUPmode13.jpg
 Description   System is fully loaded in RAM
 Filesize   53.42 KB
 Viewed   137 Time(s)

PUPmode13.jpg

Back to top
View user's profile Send private message 
hamoudoudou


Joined: 24 Jul 2014
Posts: 1317
Location: rabat

PostPosted: Fri 20 Apr 2018, 02:41    Post subject: Pendrive removed as a DVD would be removed.  

Pendrive removed as a DVD would be removed. No external stuff , all in RAM.. No drive no pendrive, and all my apps added in pupsave are here, ready to run.. no pupsave, pendrive is not plugged.
If i was not sure one hour ago, now i am sure (and certain) that pupsave is in RAM.

[root@pupjibaro ~] $ lsusb

unplug

Last edited by hamoudoudou on Mon 23 Apr 2018, 22:52; edited 1 time in total
Back to top
View user's profile Send private message 
hamoudoudou


Joined: 24 Jul 2014
Posts: 1317
Location: rabat

PostPosted: Fri 20 Apr 2018, 04:38    Post subject: pupave now loads end of queue  

that is true that in latest Puppies, and Pupjibaro Strech too, pupsave loads After ISO contained sfs, zdrv, ydrv.. and so on). why do they change order ?
Back to top
View user's profile Send private message 
musher0


Joined: 04 Jan 2009
Posts: 12418
Location: Gatineau (Qc), Canada

PostPosted: Fri 20 Apr 2018, 05:10    Post subject:  

gyro wrote:
Here's a clue:
Enter "df" as a command in a console.
Look for "tmpfs" in the first column and then it's mount point in the last column.
This is typically "/initrd/mnt/tmpfs"
Now have a look at the files in that directory.
You should see a directory called "tmp", as well as all the sfs's that have been "copied to ram", identical to the corresponding files on disk.

So how much ram does a 1GiB sfs use when it is "copied to ram"?
Answer, 1GiB.

Don't be worried too much by the "size" column in the output from "df", because a "tmpfs" consumes ram dynamically, the "size" is just the maximum it is allowed to grow to.

Neither a savefile nor a savefolder is ever copied into ram, they are always accessed directly on disk.
That is why there are no partitions mounted in a running pupmode=5 Puppy, but the partition containing the savefile/savefolder is always mounted in a running pupmmode=12 Puppy.

If you have concerns about your ram size, ensure that you have a swap partition that is equal to the pyhsical size of your ram.

And if you have concerns about savefile size, use a savefolder.

gyro

Hi gyro, hi 8Geee. And hello to all.

The following are a series of "thoughts" on both your considerations,
using my present xenialPup-706 setup. I hope it makes sense. Any
comment will be appreciated.

I must add that my grub "paragraph" for this xenialPup-706 uses the
pfix=nocopy setting. (As 8Geee mentioned.)

BFN.
Code:
[~]>df -h /initrd/pup* | awk '$1 ~ /dev/ || $0 ~ /Use/'

# I used /initrd/pup* only because if I use /initrd/* I also get results
# for /dev_save (aka /mnt/home), and that is on disk, not in RAM.

# We skip the "unionfs" line because it has the same numbers as
# /dev/loop3, it is a "double" of /dev/loop3. We don't want to calculate
# those contents twice.

# We keep the "Use" line because we want to see the header.
#
Filesystem      Size  Used Avail Use% Mounted on

/dev/loop2      122M  122M     0 100% /initrd/pup_a
/dev/loop11      89M   89M     0 100% /initrd/pup_ro10
/dev/loop0      235M  235M     0 100% /initrd/pup_ro2
/dev/loop4      152M  152M     0 100% /initrd/pup_ro3
/dev/loop5      3,7M  3,7M     0 100% /initrd/pup_ro4
/dev/loop6       13M   13M     0 100% /initrd/pup_ro5
/dev/loop7       57M   57M     0 100% /initrd/pup_ro6
/dev/loop8       17M   17M     0 100% /initrd/pup_ro7
/dev/loop9      110M  110M     0 100% /initrd/pup_ro8
/dev/loop10      24M   24M     0 100% /initrd/pup_ro9
/dev/loop3      756M  259M  498M  35% /initrd/pup_rw
/dev/loop1       31M   31M     0 100% /initrd/pup_z

# We ask awk to sum up the "Used" field above, and this is what we get:

[~]>df -h /initrd/pup* | awk '$1 ~ /dev/ {sum += $3} END {print sum}' 
1112,7M

3915M is our RAM total:
[~]>free -m
             total       used       free     shared    buffers     cached
Mem:          3915       3655        259          4        194       1527
-/+ buffers/cache:       1933       1982
Swap:         4499         21       4478

# So we are safe, we have enough RAM to accommodate all the various
# components of the Puppy.
[~]>echo "scale=3;3915-1112.7" | bc
2802.3M # This is the RAM that's free to use.

Needless to say, this type of study has to be done by the user before
(s)he tries to squash the pupsave file into an adrv sfs. If we get a
negative result from the bc line above, we do not do it.

Code:
# Now if I compare the size of the "/dev/loops" with their sfs-file
# counterparts on disk, I get:
110M   aOO-4.1.5_x86_fr.sfs
17M   Emul_DOS_Toutou-0.2_021.sfs*
26M   gnumeric-1.12.9-i486-1rl.sfs*
57M   jre-8u144-linux-i586.sfs
24M   light-49.0.linux-i686_6.sfs
10M   mpv-0.27-xenialPup7.sfs
13M   PupLin_PDF-0.1.sfs
89M   slimjet-18.0.2.0-i686.sfs
3,6M   tcltk-8.6.6_6.sfs

The sizes basically jive. Except, by doing this comparison, it becomes
obvious that the sfs's are only mounted in RAM, not developed in RAM to
their full size. Probably the effect of the "nocopy" parameter in the GRUB
entry, yes?

_________________
musher0
~~~~~~~~~~
Siempre será canción nueva... (V. Jara, Manifiesto)

Last edited by musher0 on Fri 20 Apr 2018, 22:32; edited 2 times in total
Back to top
View user's profile Send private message 
musher0


Joined: 04 Jan 2009
Posts: 12418
Location: Gatineau (Qc), Canada

PostPosted: Fri 20 Apr 2018, 05:25    Post subject: Re: Pendrive removed as a DVD would be removed.  

hamoudoudou wrote:
Pendrive removed as a DVD would be removed. No external stuff , all in RAM.. No drive no pendrive, and all my apps added in pupsave are here, ready to run.. no pupsave, pendrive is not plugged.
If i was not sure one hour ago, now i am sure (and certain) that pupsave is in RAM.

[root@pupjibaro ~] $ lsusb
Bus 002 Device 004: ID 0bda:0129 Realtek Semiconductor Corp. RTS5129 Card Reader Controller
Bus 002 Device 003: ID 0bda:8178 Realtek Semiconductor Corp. RTL8192CU 802.11n WLAN Adapter
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 125: ID 04f2:0939 Chicony Electronics Co., Ltd
Bus 001 Device 003: ID 1a40:0101 Terminus Technology Inc. Hub
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
[root@pupjibaro ~] $

Hi.

A remark if I may.

Your list above was created with the lsusb utility. It lists -- as it should --
your active USB devices.

But it means nothing regarding the pupsave and the various sfs files that
may be mounted in RAM under /initrd/pup*.

IHTH.

_________________
musher0
~~~~~~~~~~
Siempre será canción nueva... (V. Jara, Manifiesto)
Back to top
View user's profile Send private message 
bigpup


Joined: 11 Oct 2009
Posts: 10716
Location: Charleston S.C. USA

PostPosted: Fri 20 Apr 2018, 16:03    Post subject:  

Now you are getting into what pupmode it is running in.
The save is used differently in each pupmode.

_________________
I have found, in trying to help people, that 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 Shocked
Back to top
View user's profile Send private message 
musher0


Joined: 04 Jan 2009
Posts: 12418
Location: Gatineau (Qc), Canada

PostPosted: Fri 20 Apr 2018, 16:51    Post subject:  

Hi bigpup.

Which is why I am more comfortable doing it "by hand", with one-liners such
as the ones above, on a "Pup-by-Pup" basis, instead of using the more
theoretical (IMO) pupmode approach. To each his own, I guess.

TWYL.

_________________
musher0
~~~~~~~~~~
Siempre será canción nueva... (V. Jara, Manifiesto)
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 2 of 3 [35 Posts]   Goto page: Previous 1, 2, 3 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Cutting edge
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0547s ][ Queries: 15 (0.0065s) ][ GZIP on ]