On 22 June 2017 at 17:08, David McDonald <daveomcd@gmail.com> 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.
Colin
--
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 rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAL%3D0gLukTdmBapW5mxCNaR9chEE%3D99yAAQ1VWVG4L1F8PqnKDg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment