# Ruby multi-CPU threading

**URL:** https://meta.discourse.org/t/ruby-multi-cpu-threading/248433
**Category:** Migration
**Tags:** rails-console, drupal
**Created:** [December 9, 2022, 10:41pm UTC](https://meta.discourse.org/t/ruby-multi-cpu-threading/248433 "2022-12-09T22:41:51Z")
**Posts on this page:** 1
**Showing post:** 8

<div class="post-metadata">

### Author: ![rahim123](https://avatars.discourse-cdn.com/v4/letter/r/df705f/32.png) [@rahim123](https://meta.discourse.org/u/rahim123)
#### Post date: [December 10, 2022, 12:32pm UTC](https://meta.discourse.org/t/ruby-multi-cpu-threading/248433/8 "2022-12-10T12:32:21Z")

</div>

> [@RGJ](#):
>
> run multiple sidekiq instances for rebaking and image processing, it will go faster

Thanks a lot Richard for the reply. So which one(s) of these?

- `UNICORN_WORKERS`
- `UNICORN_SIDEKIQS`
- `DISCOURSE_SIDEKIQ_WORKERS`

> [@RGJ](#):
>
> When your import is totally completed it’s always a good idea to do a backup / restore, it will give you better database performance.

Interesting, haven’t seen this recommendation before. Does that reduce fragmentation or something?

> [@RGJ](#):
>
> Generally an import will not require you to rebake posts afterwards.

Yeah, I was initially going to try to fix some `[QUOTE]` problems and Textile → Markdown conversion with `regexp_replace()` in the Postgres console and then rebake all posts, because the `rake posts:remap` commands were just too slow. But then I [discovered](https://meta.discourse.org/t/postgres-console-edge-case-not-obeying-posix-regexp-rules/247683) that the regexp flavor that Postgres uses is not PCRE compatible, and there are just too many unexpected anomalies to rely on it. So I’m going to try to run the posts through Pandoc during the import process, which should allow me to get the imported site up and running in a presentable state and then fix smaller stuff like emoji keywords with `rake posts:remap` .

---

_[View the full topic](https://meta.discourse.org/t/ruby-multi-cpu-threading/248433)._
