Uploaded image for project: 'Swift'
  1. Swift
  2. SR-10613

High memory usage when compiling dependencies with SPM on Linux

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Medium
    • Resolution: Unresolved
    • Component/s: Compiler
    • Labels:
    • Environment:

      Ubuntu 16.04

      Swift 5.0.1

      Description

      I'm observing a very high memory usage when compiling SPM dependencies on Linux with Swift 5 that I wasn't able to observe with Swift 4. This is causing problems on CI.

      One example where this happens is the Kitura repository.

      Steps to reproduce:

      - Run "docker run -it --entrypoint /bin/bash swift:5.0.1-xenial"
      - Run "docker stats" in another window
      - Inside the container run "apt install openssl libssl-dev libcurl4-openssl-dev"
      - Then run "git clone https://github.com/IBM-Swift/Kitura.git && cd Kitura"
      - Then run "swift build" and observe the output of "docker stats"

      I'm not sure if this somehow depends on the host machine, but on my Mac, docker stats will show a memory increase to up to about 1.3GB before going down.

      Repeating the previous steps with the swift:4.2.4 base image instead doesn't show the same memory behaviour (here memory stays consistently far below 1GB).

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              Tainnor Pierpaolo Frasa
            • Votes:
              2 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated: