Ruby on Rails Thursday, June 22, 2017

On 22 June 2017 at 17:08, David McDonald <> wrote:
> I've started to use wicked_pdf and it works fine. However, when I generate
> a PDF files, usually the CPU will get to ~80+% during the generation of the
> PDF by the wicked_pdf gem. What's the proper way of handling this in my
> application? I've asked around on IRC chat, stack overflow, etc, but I
> haven't been able to acquire a good answer. People have told me to use
> Sidekiq, which I have, but this won't resolve my CPU issue unless I've put
> the job processes onto another machine it would seem. Is there another way
> of handling this using my one server?

Why is the fact that PDF generation can use 80% of the processor a
problem? There will still be 20% available for Rails, or is that not
enough to give you the performance you require? Linux is pretty good
at balancing processes and threads and the processor is there to be
used after all. Provided you have shelved it off into a background
process using something like sidekiq then it may well not be an issue.
Try it and see. if it becomes an issue then you can look at more
complex solutions. My philosophy is always to start off using the
KISS principle.


You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To post to this group, send email to
To view this discussion on the web visit
For more options, visit

No comments:

Post a Comment