Running out of application memory

I need some help diagnosing the source of the problem of "running out of application memory"


MacBook Pro Retina, 15-inch, Mid 2015

2.2 GHz Intel Core i7

16Gb ram

256Gb drive, 128Gb free

El Capitan.


I have recently installed Draftsight Cad, SP2 beta. Since then I constantly get the message "running out of application memory". Usually after 5 to 10 mins of using Draftsight.

To make matters worse I am usually finding that Activity monitor is also "not responding".

I have seen other post that suggest a similar problem after upgrading from Maverick to Yosemite. Could this be a similar issue?

The fact that I am using a Beta version may indicate that there is some sort of memory leak.


What steps can I take to try and identify the source of the problem


Thanks

iMac, OS X El Capitan (10.11.2)

Posted on Nov 11, 2016 3:44 PM

Reply
14 replies

Feb 3, 2017 2:41 PM in response to MisterWooley

I have been experiencing exactly the same thing - and its becoming extremely frustrating!


I use DraftSight on a daily basis on my iMac at the office and on my MBP at home, but for some reason, after 10-15 minutes of using the application on my MBP, the "run out of application memory" pops up and I end up having to 'Force Quit' losing all my work from the last save point.


At the office on my iMac, I can use DraftSight all day (literally) without any memory troubles at all. I can also work on multiple drawing files, Word and Excel files, have Safari and Mail running in the background, amongst other applications. On my MBP, I'm frightened to even open the Finder window when using DraftSight.


Several times now, I have given my MBP back to the local Apple seller I purchased on, but each time, its drawn a blank. They seem to touch on an excessively high kernel_task but cannot say why or what the cause could be.


My MBP exceeds the recommended system requirements of DraftSight, and I'm now also running the same version OS on both my iMac and MBP (just to make sure it wasn't an OS issue).


I've used DraftSight for many years on lesser-spec'd Windows laptops (Dell Vostro, Lenovo etc.) and never once had an issue (albeit slower performance). However, I would happily take that now rather than the constant freezing/shutting down! I thought Macs were supposed to be the pinnacle of hardware in the design world...?

Nov 12, 2016 3:50 PM in response to MisterWooley

Try running this program in your normal account , then copy and paste the output in a reply. The program was created by Etresoft, a frequent contributor. Please use copy and paste as screen shots can be hard to read. On the screen with Options, please open Options and check the bottom 2 boxes before running. Click “Share Report” button in the toolbar, select “Copy to Clipboard” and then paste into a reply. This will show what is running on your computer. No personal information is shown.

Etrecheck – System Information

Nov 12, 2016 7:58 PM in response to MisterWooley

running out of application memory

There are 2 reasons for this. A) you do not have enough free disk space to create /var/vm/swapfile(s), BUT since you have 128GB of free disk space, it is NOT that.


B) The other, is that the collections of programs and apps is using more virtual memory that the operating system can manage. Each page of virtual memory requires the operating to have a page table entry to keep track of whether the virtual page is in memory and if so, what physical memory address contains your data, or if the page is in the original file (such as program code), and if so what file and what block of storage contains that page, or if the page has been paged out to a /var/vm/swapfile, and if so which swapfile and what block in that swap file.


If too many programs/apps request too much virtual memory the kernel runs out of memory it can devote to page tables.


Since your Macbook Pro already has its maximum amount of RAM (16GB), you cannot give the operating system more RAM to work with, so you only choice is to reduce the amount of virtual memory being used by your Mac. Quit as many programs as you can when you want to run your virtual memory hog(s) and try not to run them concurrently if there is more than one.


This includes web browsers, especially if there are multiple tabs opened, 3rd party daemons, agents, and kernel extensions (which EtreCheck will show you), file sharing utilities such as Dropbox.com, etc... I do not have anything against these things (well I'm not fond of anti-virus, Mac cleaners, or memory cleaners), but if you have a virtual memory hog you need to work with, then you need to minimize competing virtual memory uses while you use the virtual memory hog.

Nov 13, 2016 11:32 AM in response to Eric Root

Eric, Thanks for reply. Report attached

EtreCheck version: 3.1.2 (334)

Report generated 2016-11-13 18:55:36

Download EtreCheck from https://etrecheck.com

Runtime 1:25

Performance: Excellent


Click the [Support] links for help with non-Apple products.

Click the [Details] links for more information about that line.


Problem: Beachballing

Description:

Running out of application memory


Hardware Information:

MacBook Pro (Retina, 15-inch, Mid 2015)

[Technical Specifications] - [User Guide] - [Warranty & Service]

MacBook Pro - model: MacBookPro11,4

1 2.2 GHz Intel Core i7 (i7-4770HQ) CPU: 4-core

16 GB RAM Not upgradeable

BANK 0/DIMM0

8 GB DDR3 1600 MHz ok

BANK 1/DIMM0

8 GB DDR3 1600 MHz ok

Bluetooth: Good - Handoff/Airdrop2 supported

Wireless: en0: 802.11 a/b/g/n/ac

Battery: Health = Normal - Cycle count = 103


Video Information:

Intel Iris Pro

Color LCD 2880 x 1800


System Software:

OS X El Capitan 10.11.6 (15G1108) - Time since boot: about 2 days


Disk Information:

APPLE SSD SM0256G disk0 : (251 GB) (Solid State - TRIM: Yes)

[Show SMART report]

EFI (disk0s1) <not mounted> : 210 MB

Recovery HD (disk0s3) <not mounted> [Recovery]: 650 MB

Macintosh HD (disk1) / [Startup]: 249.78 GB (123.46 GB free)

Encrypted AES-XTS Unlocked

Core Storage: disk0s2 250.14 GB Online


USB Information:

Apple Inc. Apple Internal Keyboard / Trackpad

Broadcom Corp. Bluetooth USB Host Controller

Logitech USB Receiver


Thunderbolt Information:

Apple Inc. thunderbolt_bus


Configuration files:

/etc/sudoers, File size 2339 but expected 2299

/etc/hosts - Count: 2


Gatekeeper:

Anywhere


Unknown Files:

/Library/LaunchDaemons/info.filesmanager.Files.PrivilegedIOHelperV2.plist

/Library/PrivilegedHelperTools/info.filesmanager.Files.PrivilegedIOHelperV2

One unknown file found. [Check files]


Kernel Extensions:

/Applications/MacX Video Converter Pro.app

[not loaded] com.macxdvd.driver.goodSysAudioCapture (1.0 - SDK 10.10 - 2016-09-13) [Support]


/Applications/Parallels Desktop.app

[not loaded] com.parallels.kext.hypervisor (12.1.0 41489 - SDK 10.9 - 2016-11-12) [Support]

[not loaded] com.parallels.kext.netbridge (12.1.0 41489 - SDK 10.9 - 2016-11-12) [Support]

[not loaded] com.parallels.kext.usbconnect (12.1.0 41489 - SDK 10.9 - 2016-11-12) [Support]

[not loaded] com.parallels.kext.vnic (12.1.0 41489 - SDK 10.9 - 2016-11-12) [Support]


/Library/Application Support/VirtualBox

[loaded] org.virtualbox.kext.VBoxDrv (5.1.8 - 2016-10-20) [Support]

[loaded] org.virtualbox.kext.VBoxNetAdp (5.1.8 - 2016-10-20) [Support]

[loaded] org.virtualbox.kext.VBoxNetFlt (5.1.8 - 2016-10-20) [Support]

[loaded] org.virtualbox.kext.VBoxUSB (5.1.8 - 2016-10-20) [Support]


System Launch Agents:

[not loaded] 7 Apple tasks

[loaded] 152 Apple tasks

[running] 71 Apple tasks

[killed] 9 Apple tasks

9 processes killed due to insufficient RAM


System Launch Daemons:

[not loaded] 45 Apple tasks

[loaded] 153 Apple tasks

[running] 87 Apple tasks

[killed] 6 Apple tasks

6 processes killed due to insufficient RAM


Launch Agents:

[loaded] com.oracle.java.Java-Updater.plist (2016-10-22) [Support]


Launch Daemons:

[loaded] com.adobe.fpsaud.plist (2016-10-26) [Support]

[loaded] com.bombich.ccchelper.plist (2016-10-17) [Support]

[loaded] com.daisydiskapp.DaisyDiskAdminHelper.plist (2016-04-08) [Support]

[loaded] com.macpaw.CleanMyMac3.Agent.plist (2016-10-16) [Support]

[loaded] com.oracle.java.Helper-Tool.plist (2016-10-09) [Support]

[running] com.oracle.oss.mysql.mysqld.plist (2016-09-28) [Support]

[running] info.filesmanager.Files.PrivilegedIOHelperV2.plist (2016-09-19) [Support]

[not loaded] org.virtualbox.startup.plist (2016-10-20) [Support]


User Launch Agents:

[loaded] com.macpaw.CleanMyMac3.Scheduler.plist (2016-11-04)

[running] com.nchsoftware.expressinvoice.agent.plist (2016-11-04) [Support]

[not loaded] org.virtualbox.vboxwebsrv.plist (2016-10-20) [Support]


User Login Items:

iTunesHelper Application (/Applications/iTunes.app/Contents/MacOS/iTunesHelper.app)

CleanMyMac 3 Menu Application (/Applications/CleanMyMac 3.app/Contents/MacOS/CleanMyMac 3 Menu.app)

XMenu Application (/Applications/XMenu.app)

Parallels Toolbox Application (/Applications/Parallels Toolbox.app)


Internet Plug-ins:

Silverlight: 5.1.50901.0 - SDK 10.6 (2016-11-05) [Support]

FlashPlayer-10.6: 23.0.0.207 - SDK 10.9 (2016-11-08) [Support]

QuickTime Plugin: 7.7.3 (2016-10-30)

Flash Player: 23.0.0.207 - SDK 10.9 (2016-11-08) [Support]

JavaAppletPlugin: Java 8 Update 111 build 14 (2016-10-22) Check version

Default Browser: 601 - SDK 10.11 (2016-08-03)


Safari Extensions:

chumsearch - me (2016-10-27)

Open in Internet Explorer - Parallels - http://www.parallels.com (2016-11-12)


3rd Party Preference Panes:

Flash Player (2016-10-26) [Support]

Java (2016-10-22) [Support]

MySQL (2016-09-28) [Support]


Time Machine:

Time Machine not configured!


Top Processes by CPU:

9% WindowServer

3% fontd

3% kernel_task

1% fs_usage

1% grep


Top Processes by Memory:

1.03 GB kernel_task

459 MB softwareupdated

229 MB com.apple.WebKit.WebContent(3)

213 MB fs_usage

213 MB Mail


Virtual Memory Information:

11.28 GB Available RAM

5.77 GB Free RAM

4.72 GB Used RAM

5.51 GB Cached files

18 MB Swap Used


Diagnostics Information:

Nov 11, 2016, 10:32:08 PM Self test - passed

Nov 11, 2016, 12:04:25 AM ~/Library/Logs/DiagnosticReports/MySQLWorkbench_2016-11-11-000425_[redacted].cr ash

com.oracle.mysql.workbench - /Applications/MySQLWorkbench.app/Contents/MacOS/MySQLWorkbench


Files deleted by EtreCheck:

Nov 13, 2016, 06:50:09 PM - /Library/LaunchDaemons/com.Software-Updater.agent.plist

Nov 13, 2016, 06:51:18 PM - /Library/LaunchDaemons/com.SurfBuyer.agent.plist

Interesting. A few points to note. Some adware, been removed. The n processes killed due to insufficient ram are a puzzle. My MacBook has maximum RAM possible and I have done very little in terms of installing software. Yes, I have VirtualBox (a definite CPO hog), Parallels and MySQL (a potential CPU hog I have read). VirtualBox is not being used at present but seems to have some stuff loaded.

In have always assumed that the myriad processes running are all needed or Apple would not have run them but how do I determine which are not necessary and then how to stop/remove?

I suspect DraftSight CAD has some sort of problem. After loading Activity Monitor shows memory used between 4-5 GB. After a few minutes of editing that figure jumps up to over 15GB and then usually Beachballing.

Nov 13, 2016 11:42 AM in response to BobHarris

Bob, Thanks for your reply/explanation. Two questions though.

I always thought that the point of virtual memory was that it would be swapped in/out of disk provided that there was available disk space. Thus the MacBook would likely slow down but not stop completely (which is what appears to happen).

Secondly It may seem like a daft question but how do I identify a virtual memory hog? Activity monitor shows memory for processes but none appear to be particularly large.

Nov 13, 2016 11:45 AM in response to MisterWooley

You have installed "cleanmymac" - that is very likely related to your present problem.

NEVER install these things that claim to "clean" your mac from "junk" - they ought to be considered malware.

You should thoroughly uninstall it (you have to use the provided uninstaller to do it). But even then it may not be fixed as there is no way of knowing what damage this program may have already done.

Nov 14, 2016 1:11 AM in response to MisterWooley

MisterWooley wrote:


Bob, Thanks for your reply/explanation. Two questions though.

I always thought that the point of virtual memory was that it would be swapped in/out of disk provided that there was available disk space. Thus the MacBook would likely slow down but not stop completely (which is what appears to happen).

Secondly It may seem like a daft question but how do I identify a virtual memory hog? Activity monitor shows memory for processes but none appear to be particularly large.

Activity Monitor used to have a virtual memory column, but they did away with it a few operating system release ago.


You can still see virtual memory usage for a process via Activity Monitor. Select process (app), and use Activity Monitor -> View -> Inspect Process -> Memory (or select process, Command-I (command-eye), or select process and click on the ℹ (info) button in the Activity Monitor upper left edge of the window)

User uploaded file

The above is for Safari on my Mac. You will notice that the physical memory being used in 392.9MB, but the virtual memory being used is 4.31GB.


Every 4K of that 4.31GB needs an entry in the operating system page tables to keep track of where that 4K lives. That is 1,129,840 (million) page table entries. Now repeat that for every process, and eventually you are consuming a lot of physical RAM just to manage the page tables.


for example if a page table entry takes 128 bits (16 bytes), that 1,128,840 page table entries would consume 18,077,440 (about 17MB of RAM).


So wash/rinse/repeat for every process listed in Activity Monitor -> View -> All Processes, and you will find that the amount of virtual memory being used is huge.


And if it is not clear yet. The amount of virtual memory exceeds the physical amount of RAM by orders of magnitudes. Any you need a "Buried Treasure Map" to find all the bits, for all the applications, and where they have been stored. That is what the page tables do.


At what point do you want to give all the RAM to the operating system so it can manage page tables and none of the RAM to applications, so you end up spending all your time moving pages to/from storage attempting to use the hand-full of pages not being taken up by virtual memory page tables?


Just to give you an idea of how much virtual memory can be used, I ran the following command from a Terminal session

ps -o rss,vsz,time,ucomm -ax

And then added up all the RSS and VSZ entries. My Mac was using 13GB of physical RAM (RSS) and 880GB of virtual memory (VSZ). NOTE: A lot of the virtual memory I'm showing is double/triple/quad/... counted, as shared library/framework code only has one set of page tables that every process gets to share, but my counting method does not take that into account, as my counting method is rather simple minded. Also all the program code is stored in the programs executable file. It NEVER gets paged to the swapfile(s). Only user modified data gets paged to the swapfile(s), so I do not have humongous swapfile(s) being created.


As Shrek would say:

Shrek: Ogres are like onions.

Donkey: They stink?

Shrek: Yes. No.

Donkey: Oh, they make you cry.

Shrek: No.

Donkey: Oh, you leave em out in the sun, they get all brown, start sproutin’ little white hairs.

Shrek: No. Layers. Onions have layers. Ogres have layers. Onions have layers. You get it? We both have layers.

Donkey: Oh, you both have layers. Oh. You know, not everybody like onions.

Fully understanding virtual memory is like an onion 😢


And to keep it interesting, every operating system has slightly different approach to its implementation, so of that because of the CPU's virtual memory hardware, and some of it because that is how the operating system was written.


I worked on my first virtual memory hardware back in the 1975 timeframe (I was writing a virtual memory hardware diagnostic program for manufacturing testing). A lot has changed, but some core principles have remained unchanged.

Nov 14, 2016 1:36 AM in response to BobHarris

Well Bob, Hugely helpful in understanding the potential for running out of virtual memory. I almost wish I hadn't asked😀. Although I have had a lifetime of using Windows, software dev and hardware support I am just a novice with Mac. So far I rarely dip into stuff beyond the app UI, and thats how I like it. I love my Macs but the transition to the Mac way has not always been easy for me.


Just out of curiosity I ran the command "ps -o rss,vsz,time,ucomm -ax" on my iMac with surprising results. Approx 8GB physical ram and 105GB virtual ram and thats on an iMac with only 8GB RAM yet I have never seen the out of application memory message although on occasions it does run slow, particularly after upgrading to Sierra and I do far more on my iMac than on my MacBook Pro.


I think the next step is to install Draftsight CAD on my iMac and see if that results in the same memory issues.


Thank you so much for your contribution. It is evident that I still have a whole bunch of stuff to learn.

Nov 14, 2016 5:35 AM in response to MisterWooley

The good news is that there is a good chance your iMac can support up to 32GB of RAM (depending on which generation iMac i is). A lot more room for page tables 🙂


Just out of curiosity I ran the command "ps -o rss,vsz,time,ucomm -ax" on my iMac with surprising results. Approx 8GB physical ram and 105GB virtual ram and thats on an iMac with only 8GB RAM yet I have never seen the out of application memory message

As i said the 'ps' output is rather crude, and does not take into account libraries and application frameworks that can be shared between applications.


And it takes a lot of virtual memory usage to get into trouble. Generally it has been caused by an application that has a virtual memory leak (asks the operating system for some address space, does its thing, then forgets to tell the OS it is down with the address space, and then when it has another task to perform, it asks for some more, gets it, uses it, then forgets to give i back, etc...).


Or someone is working on really large files, video production, very large image editing, or as in your case CAD. But in those cases it has to be a really large project, or the user is trying to work on multiple huge data files, or is using multiple virtual memory hogs at once. They are pushing it.


Generally speaking, mere mortals do not run into this.

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.

Running out of application memory

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