wkhtmltopdf causing load

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
matson-itops
Posts: 133
Joined: Wed Nov 18, 2015 11:19 pm

wkhtmltopdf causing load

Post by matson-itops »

we have a few scheduled reports using wkhtml
however, this makes the load on the server too high, 40 on a 4 core machine.

can you provide advice on how to tweak these reports? limit them to
only certain machines, etc.

we only run about 3 per hr., have about 300 machines monitored, and are using wkhtmltopdf 0.12.1-c22928d
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: wkhtmltopdf causing load

Post by dwhitfield »

I usually suggest people run reports at night, but if that is not an option I would take a look at https://assets.nagios.com/downloads/nag ... ios-XI.pdf

The most important thing in that document is the ramdisk. We don't install the ramdisk by default in case customers don't have enough RAM, but once you have enough RAM, it is basically a requirement.

Also, is the system actually slow? If not, I wouldn't worry about the load #.
matson-itops
Posts: 133
Joined: Wed Nov 18, 2015 11:19 pm

Re: wkhtmltopdf causing load

Post by matson-itops »

sad to report , yes, system is noticeably slow

gui takes a while to load, and command line is sluggish.
I have reviewd the docs and looks like we could try the ram disk

Can you provide an example of a system wiht Ram disk, just as
a reference for sizing? The instructions themselves are pretty clear
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: wkhtmltopdf causing load

Post by dwhitfield »

I'm not sure what you mean. Do you mean how big should the ramdisk be? I'd have to look at our script (and it's near the end of our day so I think it more important to get you an answer than go digging) but I think we suggest 512mb in the script itself. You really just need enough so you can process your performance data. If you don't have 512 mb ram to spare then you really ought to increase your ram.

300 hosts doesn't tell us a lot. How many services do you have on those hosts? (I've seen hosts with 1400 services and of course hosts with no services). I don't need a per host, I just mean the total number of services.

Is your xi a VM or a dedicated machine? If a VM, make sure the VM host is not over-committed. There are all sorts of caveats, but we would generally suggest a physical machine.

The thing about the ramdisk with the reports is this. The bottleneck for the reports is generally io and the ramdisk is really going to free up your io. It's a suggestion we make a lot for general performance issues but it's really targeted specifically at what you're seeing. The great thing about the ramdisk is everything there is transitory so if it's too small just blow it away and make a bigger one.
Locked