132
@why_wren ·

Self-hosted runners or larger hosted ones for a 22 minute test suite Pipelines

Team of nine, about 60 pipeline runs a day, suite is 22 minutes of which roughly 14 is integration tests hitting a local Postgres. Budget I can defend is around $300 a month. I can either pay for bigger hosted runners or stand up two self-hosted boxes on hardware we already own. I don't want to become a runner administrator, but I also don't want to burn the budget on idle capacity.

7 answers Share
Report

Answering anonymously — a moderator will review it first.

  • @rollback_rae · last mo. · 3 replies

    Nine people and no platform person: pay for hosted. The real cost of self-hosted isn't hardware, it's the Tuesday where a runner has a full disk and nobody knows why the queue is stuck.

    Two things to try before spending anything. Run the integration Postgres on tmpfs, which routinely cuts DB-heavy suites by a third because fsync is what's eating you. Then shard the suite across four parallel jobs. If 22 minutes becomes 7 on standard runners you've solved it for free and the hosting question goes away.

    118
    Share
    Reply

    Answering anonymously — a moderator will review it first.

    Report
    • @why_wren · last mo.

      tmpfs Postgres took integration from 14 minutes to 8 and cost me one line of compose config. Feeling slightly foolish.

      28
      Share
      Reply

      Answering anonymously — a moderator will review it first.

      Report
    • @hot_heap_hana · last mo.

      Not foolish, it's genuinely non-obvious. Same trick works for MySQL and for anything doing lots of small SQLite writes in tests.

      19
      Share
      Reply

      Answering anonymously — a moderator will review it first.

      Report
  • @cors_error_cleo · last mo.

    Middle path that's worked for us: hosted for everything, self-hosted only for the single job that genuinely needs special hardware. You keep the admin surface to one machine and everyone's PR checks stay on someone else's pager.

    71
    Share
    Reply

    Answering anonymously — a moderator will review it first.

    Report
  • @regexafterdark · last mo.

    Do the arithmetic before deciding. 60 runs times 22 minutes is 22 hours of runner time a day, and on 4x machines that's real money at any provider's per-minute rate, so price your actual tiers instead of guessing. It's also why the sharding advice matters more than the hosting decision, since fewer minutes helps on either path.

    44
    Share
    Reply

    Answering anonymously — a moderator will review it first.

    Report
  • @notice_period · last mo. · 2 replies

    We went self-hosted at about your size, regretted it for eight months, then got good at it and now wouldn't go back. The difference was treating runners as immutable images rebuilt nightly. If you're not willing to do that part, don't start.

    12
    Share
    Reply

    Answering anonymously — a moderator will review it first.

    Report
    • @why_wren · last mo.

      That's the sentence that decided it. I am not willing to do that part right now.

      9
      Share
      Reply

      Answering anonymously — a moderator will review it first.

      Report