1 Reply
      Latest reply on Mar 2, 2019 8:31 AM by KMT
      geoff12345 Level 1 Level 1 (0 points)

        Using MacOS 10.14.1  (Mojave), Xcode 10.1

         

        Summary:  Certain builds cause extreme memory usage

         

        When performing certain builds on Xcode (for any device, virtual or actual), the memory usage becomes excessive.

         

        In Activity Monitor, these are the stats:  Physical Memory, 16 GB, Memory used 15.62 GB, Cached Files: 385 MB, Swap Used: 1.24 GB, App Memory 640 MB, Wired Memory 13.8 GB, Compressed: 1.17 GB.  The memory for Xcode itself is aboug 400 MB, with aboug 300 MB Compressed.

         

        Memory pressure in the Activity Monitory is red.

         

        This situation is caused by the build action in Xcode.  I have run this without any other apps running, and the result is the same.

         

        Given the fact that memory is swapping, the build takes a very long time and the computer is otherwise unusable. 

         

        When the build finally completes, the system eventually recovers, to this status: Physical Memory: 16 GB, Memory Used: 8.79 GB, Cached Files: 2.87 GB, Swap Used: 913.8 MB, App Memory 2.88 GB, Wired Memory 4.75 GB, Compressed: 1.12 GB

         

        The computer becomes usable at that point.   App memory is very high - SimStreamProcessorService is uing 706 MB, lidb-rpc-server is using 514 MB - I don't know what either of those are. Swap Used is still greater than 0, but it must be mostly filled with XCode so does not affect other processes.

         

        This does not happen with every Xcode build.  A different project, with seemingly more complexity than the problematic project, builds quickly with no memory issues.

         

        I can provide more details about the problematic project if that might help.  It is relativley simple.  It uses the VLC library, which is not used by the project that compiles without a problem, but it has used VLC in the past without this problem.  The project also uses WKWebView and ReplayKit.

         

        Thanks,

        Geoff

        • Re: Xcode build causes memory issue
          KMT Level 9 Level 9 (14,015 points)

               > A different project, with seemingly more complexity than the problematic project, builds quickly with no memory issues.

           

          In that example, I think the general assumption is that Xcode is relying on a fully indexed project vs. one that needs to be re-indexed.

           

          You'd need to test bed examples to confirm, which might prove too laborious to be worth spending time on, however.

           

          If you believe the issue is endemic to just one project, you might want to burn a support ticket w/DTS and let them take a look at it.