WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: How can I share the RAM area in a percentage rate!  (Read 4590 times)

Offline xor

  • Hero Member
  • *****
  • Posts: 1268
How can I share the RAM area in a percentage rate!
« on: May 11, 2020, 12:34:58 AM »
How can I share the RAM area in a percentage rate!
50% RDD (Ram disk driver) space
50% hardware physical RAM usage Space
or
10% RDD (Ram disk driver) space
90% hardware physical RAM usage Space
in the form!

(%) percentage rate,
I want to change it manually.
« Last Edit: May 11, 2020, 12:40:44 AM by xor »

Offline xor

  • Hero Member
  • *****
  • Posts: 1268
Re: How can I share the RAM area in a percentage rate!
« Reply #1 on: May 11, 2020, 10:34:38 AM »
can you explain these issues simply !?
question 1 :
How can we change the free space configuration on the system RDD!
question 2:
How can I configure the swap space!?

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11704
Re: How can I share the RAM area in a percentage rate!
« Reply #2 on: May 11, 2020, 11:19:20 AM »
Hi xor
[Manners]
Posts written in a bold font and excessive use of exclamation marks signify shouting. Please don't do that.
Please do not quote posts in their entirety every time you respond.
If you wish to respond to a particular part of a previous post, only quote that part.
[/Manners]

Your Google translation into English is not always clear.
... How can we change the free space configuration on the system RDD! ...
Are you talking about  zswap ? You can disable that with the  nozswap  boot code. Or to resize it, maybe this will help you:
http://forum.tinycorelinux.net/index.php/topic,9250

Offline xor

  • Hero Member
  • *****
  • Posts: 1268
Re: How can I share the RAM area in a percentage rate!
« Reply #3 on: May 11, 2020, 12:10:24 PM »
Hi xor
... How can we change the free space configuration on the system RDD! ...
Are you talking about  zswap ? You can disable that with the  nozswap  boot code. Or to resize it, maybe this will help you:
http://forum.tinycorelinux.net/index.php/topic,9250

can you explain these issues simply?
question 1 :
How can we change the free space configuration in the system RDD!

---

[RAM 4GB] = TCL-RDD (*) 2GB + RAM 1.5GB + SWAP 0.5GB
(RDD: RAM DiSK DRiVER)

if a configuration like this is desired
what are the commands that must be done to reach these values. !?
« Last Edit: May 11, 2020, 12:12:29 PM by xor »

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11704
Re: How can I share the RAM area in a percentage rate!
« Reply #4 on: May 11, 2020, 12:11:41 PM »
Hi xor
... Are you talking about  zswap ? You can disable that with the  nozswap  boot code. Or to resize it, maybe this will help you:
http://forum.tinycorelinux.net/index.php/topic,9250
Ignore the link I posted, it's too old.

By default, Tinycore uses 25% of your RAM for  zswap (swap space in RAM). If you want to change the amount used, try this:

First, boot using the  nozswap  boot code.
Then
Code: [Select]
sudo su
# remove all existing swap
swapoff -a

# Set the size to 50000 K bytes
echo "50000K" > /sys/block/zram0/disksize

# Create the swap file
mkswap /dev/zram0 >/dev/null 2>&1

# Update fstab.
echo "/dev/zram0  swap         swap    defaults,noauto   0       0" >> /etc/fstab # Lets swapoff -a work

# Enable this swap device first so it has priority.
swapon /dev/zram0

# Enable any remaining swap devices.
swapon -a
exit

To see the status of your swap devices:
Code: [Select]
cat /proc/swaps
If this does what you want, then add it to your  /opt/bootsync.sh  file before the line that calls  /opt/bootlocal.sh.  Do not include
the lines that say  sudo su  or  exit.

Offline xor

  • Hero Member
  • *****
  • Posts: 1268
Re: How can I share the RAM area in a percentage rate!
« Reply #5 on: May 11, 2020, 12:21:47 PM »
Hi xor
... Are you talking about  zswap ? You can disable that with the  nozswap  boot code. Or to resize it, maybe this will help you:
http://forum.tinycorelinux.net/index.php/topic,9250
Ignore the link I posted, it's too old.

By default, Tinycore uses 25% of your RAM for  zswap (swap space in RAM). If you want to change the amount used, try this:

First, boot using the  nozswap  boot code.
Then
Code: [Select]
sudo su
# remove all existing swap
swapoff -a

# Set the size to 50000 K bytes
echo "50000K" > /sys/block/zram0/disksize

# Create the swap file
mkswap /dev/zram0 >/dev/null 2>&1

# Update fstab.
echo "/dev/zram0  swap         swap    defaults,noauto   0       0" >> /etc/fstab # Lets swapoff -a work

# Enable this swap device first so it has priority.
swapon /dev/zram0

# Enable any remaining swap devices.
swapon -a
exit

To see the status of your swap devices:
Code: [Select]
cat /proc/swaps
If this does what you want, then add it to your  /opt/bootsync.sh  file before the line that calls  /opt/bootlocal.sh.  Do not include
the lines that say  sudo su  or  exit.

I understood shaping the SWAP space :)
Question: How can I shape the RDD area?

---

[RAM 4GB] = TCL-RDD* 2GB + RAM 1.5GB + SWAP 0.5GB
( RDD* : RAM DiSK DRiVER )

if a configuration like this is desired
what are the commands that must be done to reach these values. !?

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11704
Re: How can I share the RAM area in a percentage rate!
« Reply #6 on: May 11, 2020, 12:59:01 PM »
Hi xor
... Question: How can I shape the RDD area? ...

I don't know what or where the  RDD  is.

Offline xor

  • Hero Member
  • *****
  • Posts: 1268
Re: How can I share the RAM area in a percentage rate!
« Reply #7 on: May 11, 2020, 01:54:11 PM »
Hi xor
... Question: How can I shape the RDD area? ...

I don't know what or where the  RDD  is.

Is it true that I understand!?

Virtual disk space created on RAM,
RAM limits are constantly updated by the system

Is this review a correct one?

« Last Edit: March 27, 2023, 09:36:11 PM by Rich »

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11704
Re: How can I share the RAM area in a percentage rate!
« Reply #8 on: May 11, 2020, 03:33:16 PM »
Hi xor
Yes, the  rootfs  is in RAM.
If you want to know out how its managed, you will have to ask Google, because I don't know.
If you want whether you can control its size, you will have to ask Google, because I don't know.

Offline xor

  • Hero Member
  • *****
  • Posts: 1268
Re: How can I share the RAM area in a percentage rate!
« Reply #9 on: May 12, 2020, 06:21:22 AM »
Hi xor
Yes, the  rootfs  is in RAM.
If you want to know out how its managed, you will have to ask Google, because I don't know.
If you want whether you can control its size, you will have to ask Google, because I don't know.

https://en.wikipedia.org/wiki/Initial_ramdisk
https://en.wikipedia.org/wiki/SquashFS
https://en.wikipedia.org/wiki/Linux_startup_process
https://en.wikipedia.org/wiki/List_of_Linux_distributions_that_run_from_RAM
https://en.wikipedia.org/wiki/Live_CD

Offline mocore

  • Hero Member
  • *****
  • Posts: 667
  • ~.~
Re: How can I share the RAM area in a percentage rate!
« Reply #10 on: January 30, 2021, 02:29:40 PM »

perhaps this link : https://www.kernel.org/doc/Documentation/filesystems/ramfs-rootfs-initramfs.txt

 is relevant , idk tbh , it appears to be related !