Jump to content

reduce ram usage


jumbo125

Recommended Posts

Hello experts

 

I'm a newbie and use my ofroid as server (mysql, iobroker, go2rtc)

This need a lot of ram. So i try to reduce all service which i don't need.

I disabled the gui (desktop) and ise only ssh.

I use zram to be faster.

Is there any other service which i can deactivate?

Link to comment
Share on other sites

On 8/4/2023 at 10:31 AM, jumbo125 said:

I'm a newbie and use my ofroid as server


Stock CLI image is already fully optimised, comes with configured ZRAM, everything is ready for you. Nothing more, that would have any noticeable effect, could be done. This is one of the core advantages of Armbian. If you have a fast storage you and your processes get OOM (killed due to lack of memory) then try to add swap file. If that doesn't work out, consider HW with more memory ...  BTW, 2Gb that comes with C2 is plenty of memory for what you plan to do unless you will have "millions of records" in your database.

Link to comment
Share on other sites

People rarely talk about it, but it's pretty common to replace stock libc memory allocator with jemalloc or alternatives.

 

Stock libc allocator really doesn't like to free the memory and require special handling (calling malloc_trim() from time to time), which most applications doesn't do. Most of the time this seems like a memory leak of the application itself, while in reality this is a combination of not-very-memory-friendly stock malloc libc implementation and memory fragmentation.

 

Using jemalloc is usually as easy as LD_PRELOAD'ing it. This could be done in systemd service drop-in.

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

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.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines