Skip to content

salt-cloud being strangely slow #34776

Description

@alexykot

Description of the problem

I'm comparing salt-cloud and terraform as tools to manage our infrastructure at GCE. We use salt stack to manage VM instance configurations, so I would naturally prefer to use salt-cloud as an integral part of the stack and phase out terraform as a legacy thing.

However my use case is critical on VM deployment time because we offer PaaS solution with VMs deployed on customer request, so need to deliver ready VMs on a click of a button within seconds.

And what puzzles me is why salt-cloud takes so long to deploy basic machines.

I have created neck-to-neck simple test with deploying three VMs based on default GCE CentOS7 image using both terraform and salt-cloud (both in parallel mode). And the time difference is stunning - where terraform needs around 30 seconds to deploy requested machines (which is similar to time needed to deploy same instances through GCE GUI), salt-cloud takes around 220 seconds to deploy exactly same machines under same account in the same zone. Especially strange is that first 130 seconds salt-cloud does not start deploying and does seemingly nothing at all, and only after around 130 seconds pass it shows message deploying VMs and those VMs appear in GUI as in deployment.

Is there something obvious that I'm missing about salt-cloud that makes it so slow? Can it be sped up somehow? I would prefer to user full salt stack, but with this issue it is not possible in my use case.

Setup

I'm using salt-cloud v2016.3.1 versus terraform v0.6.16, both most recent versions available at a time of test. The master instance that executes this provisioning sits in the same GCE DC, but in a different subnet on a different GCE account. Same instance is used to execute salt-cloud and terraform tests.

Notes

I've measured time from start till end of hosts bootstrap. Salt-cloud tells you in console when initial machine bootstrap is over and it moves on to provisioning, i.e. minion installation, master-minion connection and certificates, further provision according to salt states etc. So that is excluded from the timeline I've explained above.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    QuestionThe issue is more of a question rather than a bug or a feature requeststale

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions