How to reduce an application RAM memory use on Mojave

Hello,


I am working on a 2015 Mac Mini, bought in 2018, that is not shown on your first selection of hardware to enter this section


I am using AppPolice to have a control over the amount of CPU used my my applications


I cannot find any way to reduce the amount of RAM taken my my applications


I have 16 GB of Ram and Bztransmit is eating 4 to 5 gb of ram.


Bztransmit is the Blackblaze operation name (Blackblaze is a nice backup system uploading datas, making permanent backups. Bztransmit is the operation name on the activity monitor) is frequently taking 5 GB for it's own, so I have to force quit this operation to instantly retrieve free memory and avoid freezing my work.


How can we manually reduce the amount of RAM taken by any application?


Thanks for your support.



Mac mini 2018 or later

Posted on Dec 29, 2018 10:31 AM

Reply
20 replies

Dec 31, 2018 6:13 AM in response to macjack

I got (quickly) a reply from Backblaze, It is helpful!

It is a good explanation why bztransmit need lots of RAM, and I cannot really complain as I have lots of files to backup


This being said, I would love to find a way to select the amount of RAM I can decide to allow or not to a dedicated application


For everybody's info I put it here in full


Zack, Dec 30, 16:37 PST:

Hi there,


Our system is showing you are running MacOS Mojave, Vista is a Windows OS. Our system does operate correctly on that OS. 


The issue is the number of files you have selected for backup. Our program uses a master index file called bzfileids.dat to record and identify every file that is backed up. This file is read into RAM every time bztransmit runs, so it can verify what has been backed up and whether something can be deduplicated. 


On most systems, this index is under 100MB in size. It's about 58MB on my own main machine. Yours is over 3.8GB in size, partially because you have over 10 million files selected for backup. With this many files and a bzfileids.dat file of that size, bztransmit will always take up at least 4GB of RAM on your machine whenever it runs. 


Now, there are several things that contribute to this file being large:


A) If you have ever renamed a Time Machine folder at the top of your hard drive, Backblaze will bloat up trying to back it up. It is absolutely not supported to "back up a back up" and Backblaze can only function properly backing up the originals.


B) Lots of files. If you knew of a folder with hundreds of thousands of small files that didn't change much you could back them up differently or exclude them from Backblaze backups.


C) Renaming top level folders with a lot of files. For example, if your top level folder name is "/my_music" and it contains 100,000 file names in it, then when you rename it "/my_great_music" Backblaze needs to add all of those filenames to that bzfileids.dat file which bloats it up. So the best thing you can do is keep your enormous folders the same over a long period.


D) Shorter Path Names. It would be best if your hundreds of thousands of files are on a disk called "d" instead of "disk_that_contains_files" and the top level folder is called "f" instead of "folder_for_lots_of_files". Etc. The shorter the paths, the smaller the bzfileids.dat file is.


It's possible to shrink the bzfileids.dat in case they've been temporarily bloated by one of the above situations, however it requires reuploading all data to the Backblaze servers. You can follow these steps to do that: 

1. Visit https://secure.backblaze.com/user_signin.htm and sign in to your Backblaze account with your email address and password. 

2. Click on the "Account" link in the upper left hand corner 

3. Select your "old" computer from the list of computers. 

4. Click the "Delete Computer" link next to it. This will delete the backed up data, the bloated bzfileids.dat and free up the paid license. 

5. Click on "Overview" 

6. Click the download link for your operating system in the bottom right corner. 

7. Install Backblaze.


Here's the problem. If you cannot reduce the number of files or path names significantly, then you absolutely are going to encounter this issue again. If you uninstall and reinstall without changing anything, then your backup might start working again, but you will reencounter this problem a little ways down the road.


Regards, 

Zack - Meet me!

Backblaze Best Practices

The Backblaze Team

Dec 30, 2018 8:57 PM in response to 75Vincent

Before asking questions it is advisable to do research. Your first resource should be a thorough reading and comprehension of the local and online documentation that came with the product you are using. This should help you to get the most out of the product, avoid issues before they arise, and to find solutions to issues should they arise. Further, first enquires should be addressed to the vendor of the product as they should know their product and be in the best position to advise.


Every choice involves compromise. Make your choices based on priorities and workflow, what you can live with and what you can’t. The following may or may not be useful or acceptable to you. I don’t use Backblaze, nor am I familiar with the product/service. However, a cursory reading of the documentation might suggest some strategies for limiting resource consumption when you need those resources for other activities:


  • Setup a schedule that doesn’t involve Backblaze continuously indexing your computer. Of the three choices, Continuously, Once Per Day, and Only when I click, only the last choice will limit indexing to when you enable it manually. Any extended period of time when not using the computer such as while sleeping would be a good time. Access scheduling via the Schedule settings.


  • In the documentation is this line: "It is also worth noting that each additional thread above one increases the system resources used by the Backblaze software while uploads are in progress". You might try limiting the number of backup threads used via the Performance settings.


  • Limit which files get indexed, backed up, and uploaded via the Exclusions settings.


  • Check the size of the master index file bzfileids.dat since that file loads into RAM every time bztransmit runs. Do not modify or delete this file for any reason. If abnormally large contact Backblaze support.

Dec 29, 2018 10:59 AM in response to 75Vincent

Firstly, a program intended to reduce CPU usage will not reduce RAM usage. These are two completely different resources. Secondly, you cannot control the amount of RAM used by a program. That is set by the programmer as part of the apps programming. Mojave has its own memory management. If you have a single app using too much RAM then it's a fault of the app or the result of an app's malfunctioning. You should contact the developer about the problem in order to see if there is a solution.


I would suggest you stop using cloud backups such as Back Blaze. They are slow and use a lot of resources. macOS has its own built-in backup software, Time Machine. Attach an external HDD for local backups that are faster and less resource intensive. If you need off-site copies, then make monthly updates for those or use a second HDD to clone the backup drive and store the copy off-site.

Dec 29, 2018 4:15 PM in response to 75Vincent

Why do you want to manage the RAM? Do you think you can do it better than the operating system? What would be the benefit of you managing the RAM? What is it you want to accomplish? Tell us what it is you want to accomplish and maybe we can offer another solution rather than interfering with RAM management. For example if your computer is running slow maybe you are attributing that poor performance to RAM not being allocated correctly. We could offer other solutions to poor performance.

Dec 30, 2018 3:15 PM in response to BobTheFisherman

Sorry, 


this is BobTheFisherman who is looking to me like the door to door vacuum salesperson


1 - He is speaking like someone who obviously never needed any additional ram. 


I want to reduce the amount of RAM taken by Backblaze to have all of my other application running smoothly. I don't mind Backblaze if it is slower.


2 - What are you tying to sell with your "We could offer other solutions to poor performance."  


I admit and I know Backblaze isn't the best one, but it is allowing me to store up to 10 terrabytes for $5 a month. Is there any better value for the money today?

Dec 30, 2018 4:01 PM in response to 75Vincent

I'm not trying to sell you anything, I'm suggesting that we could offer alternative solutions to your problem if you'd care to share what your problem really is. An app using RAM is not your problem. Your system can manage RAM very well yet you appear to have settled on a third party solution for a problem that does not exist. I'm afraid you have already been sold a bill of goods if you think you need a third party app to manage your Mac's RAM.

Good luck.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

How to reduce an application RAM memory use on Mojave

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.