Jump to content
XPEnology Community

High amount of RAM reserved


Xandyr

Recommended Posts

Hello,

 

Installed not long ago DSM 6.2 on my 918+ (AMD 3400g CPU, 16 GB ram) with Jun 1.04 bootloader. However I have some trouble with high amount of reserved RAM memory. 

From what I understand from the FAQ (https://xpenology.com/forum/topic/9394-installation-faq/?tab=comments#comment-83064) this happens sometimes and then you need to do some edits in the grub.cfg file. 

 

However I dont understand the process of doing that in the best and safest way (I want to use the same USB memory as I do now)

1) Turn off the system

2) Remove the USB, plug it into my computer and find the grub.cfg file and then add disable_mtrr_trim

3) Insert the USB and start up the system? 

 

Or the process is more complicated?  Thanks!

 

 

Skärmbild 2021-06-02 222231.png

1.png

Edited by Xandyr
Link to comment
Share on other sites

The strange part of this question is that you edited grub.cfg when you built your system.  So here is the FAQ entry that covers this:

https://xpenology.com/forum/topic/13061-tutorial-install-dsm-62-on-esxi-67/

 

And just for good measure, here is a thread that asks and answers the exact same question, and describes a different access method:

https://xpenology.com/forum/topic/30105-trying-to-edit-grubcnf-on-installed-system-ds918-623-25426

 

Search is quite powerful on this forum.

Link to comment
Share on other sites

58 minutes ago, flyride said:

The strange part of this question is that you edited grub.cfg when you built your system.  So here is the FAQ entry that covers this:

https://xpenology.com/forum/topic/13061-tutorial-install-dsm-62-on-esxi-67/

 

And just for good measure, here is a thread that asks and answers the exact same question, and describes a different access method:

https://xpenology.com/forum/topic/30105-trying-to-edit-grubcnf-on-installed-system-ds918-623-25426

 

Search is quite powerful on this forum.

 

Thanks for the reply. The question is not regarding edit the grub file like I did before installing everything. Now after the installation and now that my server is up and running I just want to make sure what's the process of editing the grub file without messing anything up on my system are. What's steps should I take, can I edit without losing everything, without needing to redo the installation process. 

 

I searched this forum and with Google for days without finding my answer unfortunately. 

 

Edit: and I'm not using EXSi (I see you refer to some links using that) but that maybe doesn't matter?

Edited by Xandyr
Link to comment
Share on other sites

3 hours ago, Xandyr said:

Edit: and I'm not using EXSi (I see you refer to some links using that) but that maybe doesn't matter?

 

Sorry, I grabbed the wrong link - here is the baremetal install but the grub edit procedure is identical regardless of esxi vs. baremetal...

https://xpenology.com/forum/topic/7973-tutorial-installmigrate-dsm-52-to-61x-juns-loader/

 

I don't really understand your question though. How to edit grub.cfg, or whether editing grub.cfg will cause you problems?  Your first post asked how to edit, so I responded with the install links which talk about this, which conveniently you've done before.  I also gave you another link that allows you to edit grub.cfg from within a running system.

 

3 hours ago, Xandyr said:

I searched this forum and with Google for days without finding my answer unfortunately. 

 

I'm really not a search Nazi, and this forum is pretty low-key about search (there is a lot of content here, and much of it pertains to old versions) - but come on, why do people post this.  Not speaking for anyone besides myself with the following... Ask all the questions you like, but statements like this makes me feel like you don't respect the hundreds of hours that were spent on these posts at all. Urgh.

 

Spoiler

Type in "how can i edit grub.cfg" on the search bar and both the baremetal and ESXi install posts come up right under your own thread. Then right below that is "Tutorial: Mount boot stick partitions in Windows (editgrub.cfg, add extra.lzma)" Then tick the option to search "Content Titles only" it narrows down to only two posts - the tutorial and then the explicit procedure to mount synoboot and edit grub.cfg from a working system command line (same content as the second link I provided).

 

3 hours ago, Xandyr said:

can I edit without losing everything, without needing to redo the installation process. 

 

Specifically: editing grub.cfg changes the parameters sent to the boot loader.  It doesn't have anything explicitly to do with an install. If you really try, you can make your system not boot or blow up your arrays, etc. by making unwise changes in grub.cfg.  Just take good notes, be ready to restore prior configurations, etc. if something goesn't go as expected.  As always, you should have a backup of your data elsewhere.

Link to comment
Share on other sites

  • 4 weeks later...
On 6/7/2021 at 11:58 PM, flyride said:

 

Sorry, I grabbed the wrong link - here is the baremetal install but the grub edit procedure is identical regardless of esxi vs. baremetal...

https://xpenology.com/forum/topic/7973-tutorial-installmigrate-dsm-52-to-61x-juns-loader/

 

I don't really understand your question though. How to edit grub.cfg, or whether editing grub.cfg will cause you problems?  Your first post asked how to edit, so I responded with the install links which talk about this, which conveniently you've done before.  I also gave you another link that allows you to edit grub.cfg from within a running system.

 

 

I'm really not a search Nazi, and this forum is pretty low-key about search (there is a lot of content here, and much of it pertains to old versions) - but come on, why do people post this.  Not speaking for anyone besides myself with the following... Ask all the questions you like, but statements like this makes me feel like you don't respect the hundreds of hours that were spent on these posts at all. Urgh.

 

  not being a jerk, but search (Reveal hidden contents)

Type in "how can i edit grub.cfg" on the search bar and both the baremetal and ESXi install posts come up right under your own thread. Then right below that is "Tutorial: Mount boot stick partitions in Windows (editgrub.cfg, add extra.lzma)" Then tick the option to search "Content Titles only" it narrows down to only two posts - the tutorial and then the explicit procedure to mount synoboot and edit grub.cfg from a working system command line (same content as the second link I provided).

 

 

Specifically: editing grub.cfg changes the parameters sent to the boot loader.  It doesn't have anything explicitly to do with an install. If you really try, you can make your system not boot or blow up your arrays, etc. by making unwise changes in grub.cfg.  Just take good notes, be ready to restore prior configurations, etc. if something goesn't go as expected.  As always, you should have a backup of your data elsewhere.

 

I just had time to try the editing of the grub.cfg file by turning off the NAS, ejecting the USB and edit the grub.cfg file by same steps as when doing it the first time. So using the OSFMount. I added the command disable_mtrr_trim. Then I burned the new edited synoboot.img to the USB, inserted the USB into my NAS. But still no difference, still same amount of reserved RAM. 

 

Tried to redo the process but now for some reason in Explorer window I see two USB drives whereof E: wants me to format the drive and Win32 Diskmanager wont let me burn anything to either D or E: due to error 5. 

 

 

1.png

2.png

3.png

4.png

Link to comment
Share on other sites

7 hours ago, Xandyr said:

Tried to redo the process but now for some reason in Explorer window I see two USB drives whereof E: wants me to format the drive and Win32 Diskmanager wont let me burn anything to either D or E: due to error 5. 

 

This is normal.  Search on how to clear off the partitions with DISKPART before reburning the loader.

Link to comment
Share on other sites

8 minutes ago, flyride said:

 

This is normal.  Search on how to clear off the partitions with DISKPART before reburning the loader.

Ok will do that.

 

So me not clearing off the partitions before burning the new synoboot.img file have resulted in the command disable_mtrr_trim not working? Since i still see same amount of RAM reserved?

 

Edited by Xandyr
Link to comment
Share on other sites

'fraid not - I haven't any experience with this problem or how to solve it.  I happen to only use Intel, and maybe in part it's an AMD thing?

 

FWIW, disable_mtrr_trim is a Linux boot-time parameter and not explicitly an XPe or DSM feature.

 

It would seem that you can see if the kernel has been flagging it as a problem by searching for "MTRR" in dmesg - i.e. cat /var/log/dmesg | fgrep "MTRR"

Also you can see what boot time parameters actually are being applied by searching dmesg like this: cat /var/log/dmesg | fgrep "Command line: "

 

However, this article implies that some part of MTRR issues are due to an older kernel-specific problem (i.e. 3.10 which is what 3615/3617xs are based on) and may not apply to newer kernels (918+ uses 4.4), but this is random google-fu and extrapolation; YMMV.

Edited by flyride
  • Like 1
Link to comment
Share on other sites

Thanks! Read somewhere they removed one of the RAM sticks to see if the reserved RAM problem exist. Somebody switched places of the RAM sticks and it worked (somehow). 

 

Was thinking of creating a completely new bootable USB with disable_mtrr_trim line from the beginning. 

Link to comment
Share on other sites

  • 1 year later...
3 hours ago, pocopico said:

If you are using TCRP friend you can edit user_config.json and add it to sata or usb boot Linux line. If you are not just edit boot/grub/grub.cfg and add that to the Linux line 

 

You mean Linux line at "menuentry" like this one?

linux /zImage withefi earlyprintk syno_hw_version=DS3622xs console=ttyS0,115200n8 netif_num=1 pid=xxxx earlycon=uart8250,io,0x3f8,115200n8 syno_port_thaw=1 mac1=XXXXXXXXXX sn=SSSSSSSSSS vid=0xAAAA elevator=elevator loglevel=15 HddHotplug=0 DiskIdxMap=0A00 syno_hdd_detect=0 vender_format_version=2 syno_hdd_powerup_seq=0 log_buf_len=32M root=/dev/md0 SataPortMap=58

  • Like 1
Link to comment
Share on other sites

7 hours ago, Trabalhador Anonimo said:

 

You mean Linux line at "menuentry" like this one?

linux /zImage withefi earlyprintk syno_hw_version=DS3622xs console=ttyS0,115200n8 netif_num=1 pid=xxxx earlycon=uart8250,io,0x3f8,115200n8 syno_port_thaw=1 mac1=XXXXXXXXXX sn=SSSSSSSSSS vid=0xAAAA elevator=elevator loglevel=15 HddHotplug=0 DiskIdxMap=0A00 syno_hdd_detect=0 vender_format_version=2 syno_hdd_powerup_seq=0 log_buf_len=32M root=/dev/md0 SataPortMap=58

 

Yes disable_mtrr_trim is a linux kernel cmdline option.

  • Like 1
Link to comment
Share on other sites

In my case, I can test the AMD Ryzen 2200G and the old AMD G-T44R processor with bare metal.


When using an AMD processor in M SHELL for TCRP, the disable_mtrr_trim=1 boot option is automatically added.


According to users, there are reports that disable_mtrr_trim=1 works instead of disable_mtrr_trim, so we set this up and test it.


In the case of HP N36L/N40L/N54L, there are reports that that option works effectively.


But it doesn't seem to work on other processors.


I know it has the effect of reducing the reserved space shown at the front of the captured image.


My processor concluded that this option was not valid as the before and after states gave the same result.

 

The Linux developer repo of torvalds describes the disable_mtrr_trim option and options related to mtrr clean as follows.

 

https://github.com/torvalds/linux/blob/master/Documentation/admin-guide/kernel-parameters.txt#L1080

 

    disable_mtrr_trim [X86, Intel and AMD only]
            By default the kernel will trim any uncacheable
            memory out of your available memory pool based on
            MTRR settings.  This parameter disables that behavior,
            possibly causing your machine to run very slowly.

 

 

[AMD G-T44R with disable_mtrr_trim]

 

1193401321_2023-03-306_17_57.thumb.png.e864c54eb4c4eb548d21d7f4e6c7698c.png

 

1654236427_2023-03-306_27_29.thumb.png.c785b51b7cd9c3d4c199eae5bc624ad4.png

 

[AMD Ryzen 2200G with disable_mtrr_trim=1]

 

435937613_2023-03-304_04_31.thumb.png.509934a5902d221066c092519821c46e.png

 

 

 

flyride mentioned to check
MTRR in dmesg shows the same message as below in any situation.
It is the same whether or not the disable_mtrr_trim option is applied.
And the same message on unrelated intel processors.

 

 

2043343895_2023-03-306_37_03.thumb.png.6e213e2799c929aedb7354238d4769fa.png

 

Edited by Peter Suh
Link to comment
Share on other sites

21 minutes ago, Trabalhador Anonimo said:

it worked like charmed with disable_mtrr_trim (only, no null or =1) on "linux" line of grub.cfg

image.thumb.png.09d771d83b9987cf60844e04881a88b6.png

 

Before disable_mtrr_trim

image.thumb.png.c63af0b79b05cfaa6a7b70ecad5974db.png

Now lets see if the box does not get too slow.

 

What are your bare metal system specs?
I found out that it is 16GB in the capture.
Is it AMD Ryzen?

 

MB: M5A78L-M LX/BR

CPU: Athlon 2 X4

RAM: 12GB

HDD: 3x 1TB + 1x 2TB

Onboard NIC: Realtek® 8111E

 

Is it your's?

Edited by Peter Suh
Link to comment
Share on other sites

12 hours ago, Peter Suh said:

 

What are your bare metal system specs?
I found out that it is 16GB in the capture.
Is it AMD Ryzen?

 

MB: M5A78L-M LX/BR

CPU: Athlon 2 X4

RAM: 12GB

HDD: 3x 1TB + 1x 2TB

Onboard NIC: Realtek® 8111E

 

Is it your's?

 

This is me, but I made some changes on memory, upgrade to 16Gb, and NIC, I set a new card with 2 ports: Dell Broadcom Bcm95720a Dual Port 1gb Pci.

VMM did not work.

Edited by Trabalhador Anonimo
  • Thanks 1
Link to comment
Share on other sites

  • 2 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...