macOS is not swapping memory well

Originator:SaagarJha28
Number:rdar://33390728 Date Originated:18-Jul-2017 05:27 PM
Status:Open Resolved:
Product:macOS + SDK (Performance (slow, hung)) Product Version:macOS High Sierra 10.13 Beta (17A306f)
Classification:Crash/Hang/Data Loss Reproducible:
 
Area:
Performance (slow, hung)

Summary:
macOS doesn't seem to swap memory very well when a lot of applications are open. Often, it will swap in large amounts of data and overload the RAM and cause slowdowns and freezes. Attached is a sysdiagnose of this happening in a milder case (I couldn't get a sysdiagnose to complete if it's more severe since it freezes the computer).

Steps to Reproduce:
1. Open a lot of apps and windows so that macOS starts swapping out.
2. Work for a while.
3. Wait for kernel_task to pull from the swap, saturate all available RAM, and hang the computer.

Expected Results:
Swapping in is done only when necessary and at appropriate times.

Observed Results:
Swapping gigabytes of data in is done for seemingly no reason and causes the computer to lag or freeze.

Version:
macOS High Sierra 10.13 Beta (17A306f)

Notes:


Configuration:
MacBook Pro (Retina, 13-inch, Early 2015) running macOS High Sierra 10.13 Beta (17A306f)

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!