WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

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

Offline xor

  • Hero Member
  • *****
  • Posts: 719
How can I share the RAM area in a percentage rate!
« on: May 10, 2020, 09:34:58 PM »
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 10, 2020, 09:40:44 PM by xor »

Offline xor

  • Hero Member
  • *****
  • Posts: 719
Re: How can I share the RAM area in a percentage rate!
« Reply #1 on: May 11, 2020, 07: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!?

Online Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 8135
Re: How can I share the RAM area in a percentage rate!
« Reply #2 on: May 11, 2020, 08: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: 719
Re: How can I share the RAM area in a percentage rate!
« Reply #3 on: May 11, 2020, 09:10:24 AM »
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, 09:12:29 AM by xor »

Online Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 8135
Re: How can I share the RAM area in a percentage rate!
« Reply #4 on: May 11, 2020, 09:11:41 AM »
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: 719
Re: How can I share the RAM area in a percentage rate!
« Reply #5 on: May 11, 2020, 09:21:47 AM »
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. !?

Online Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 8135
Re: How can I share the RAM area in a percentage rate!
« Reply #6 on: May 11, 2020, 09:59:01 AM »
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: 719
Re: How can I share the RAM area in a percentage rate!
« Reply #7 on: May 11, 2020, 10:54:11 AM »
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: May 11, 2020, 10:59:22 AM by xor »

Online Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 8135
Re: How can I share the RAM area in a percentage rate!
« Reply #8 on: May 11, 2020, 12: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: 719
Re: How can I share the RAM area in a percentage rate!
« Reply #9 on: May 12, 2020, 03: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