Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Script running slow in a Docker container. Any tips to speed it up?

    My colleagues and I are using Stata 17 Basic Edition in a Docker container running Debian Linux (2.5 GM of RAM on Heroku; 5 GM of RAM when running it locally), and we are experiencing pretty slow execution compared to when I run the same scripts on my Windows computer (also with Stata 17 BE, but 16 GM of RAM).

    A sequence of seven scripts takes about half a minute to run on my computer, compared to about three minutes in the Docker container (regardless of whether it's on Heroku or locally).

    The datasets that we are importing and processing are small - below 5Mb. I don't know about the number of cores that we have when running this on Heroku, but I should be able to find out of that's relevant (I believe it doesn't matter for Stata BE).

    Does anyone know whether there is something we can do to speed things up? Would more RAM help?

    This hardware requirements page mentions RAM as a key factor, but relative to the size of datasets we seem to be fine. I'm myself not familiar with Docker, but I guess we could test this by creating a Docker container with more RAM...

  • #2
    some docker issues are described in https://pythonspeed.com/articles/docker-performance-overhead/

    See -help timer- and -help profiler- for timing of your Stata code to describe what parts of the code/type of operations are most different.

    Comment


    • #3
      Thank you Bjarte, we'll try what the article describes. I knew 'timer' but not 'profiler', thanks!

      Comment

      Working...
      X