Hi Stuart,... Im running 2 cores as Im a miser with my VMS in terms of CPU allocation ... ( I dont like spending time on the bare metal spliting cherries ) (more context switches than work being done) ...
Got my system upgraded... thanks ... and fixed my old /usr/sbin/dig (old..nolonger working) to /usr/bin/dig the initial load seems to be quicker ... and opening a page seems to put more load on rrdcached... process alright the config below seems to get rrdcached working with httpd in OpenBSD. ... the loading of the smokeping detailed graphs still takes a while ... but I will do further dianostics... This is my setup #############httpd.conf####################### server "default" { listen on * port 80 location "/smokeping/smokeping.fcgi*" { fastcgi { socket "/run/smokeping.sock" param RRDCACHED_ADDRESS "unix:/var/www/run/rrd/rrdcached.sock" } root "/" } ################################################### top output below when loading a web page load averages: 2.09, 1.82, 1.07 smoke1 14:36:27 42 processes: 40 idle, 2 on processor up 0 days 00:11:09 CPU0 states: 53.2% user, 0.0% nice, 6.8% sys, 0.2% spin, 2.2% intr, 37.6% idle CPU1 states: 33.1% user, 0.0% nice, 10.6% sys, 1.4% spin, 0.0% intr, 54.9% idle Memory: Real: 208M/1758M act/tot Free: 6160M Cache: 882M Swap: 0K/0K PID USERNAME PRI NICE SIZE RES STATE WAIT TIME CPU COMMAND 57245 _rrdcach 2 0 41M 36M onproc/0 kqread 3:13 30.62% rrdcached 99560 _smokepi 2 0 74M 88M sleep/1 netio 1:01 10.55% perl 73953 _smokepi 2 0 2632K 2660K sleep/0 kqread 0:00 0.20% fping 77717 _smokepi 10 0 42M 20M sleep/0 nanoslp 0:02 0.00% perl 1 root 10 0 644K 628K idle wait 0:01 0.00% init 67291 _smokepi -6 0 42M 20M idle piperd 0:01 0.00% perl 72553 root 3 0 948K 924K idle ttyin 0:00 0.00% ksh 84133 _pflogd 4 0 776K 1620K sleep/0 bpf 0:00 0.00% pflogd 74456 _smtpq 2 0 1656K 3484K idle kqread 0:00 0.00% smtpd 58541 _ntp 2 -20 1408K 3320K sleep/1 kqread 0:00 0.00% ntpd 22630 root 2 0 1204K 4160K idle kqread 0:00 0.00% sshd 20724 www 2 0 1908K 3944K sleep/1 kqread 0:00 0.00% httpd 27618 www 2 0 2256K 4276K idle kqread 0:00 0.00% httpd 81375 _syslogd 2 0 1228K 1524K idle kqread 0:00 0.00% syslogd 77400 _smokepi 18 0 42M 10M idle sigsusp 0:00 0.00% perl 39827 root 28 0 1224K 2512K onproc/1 - 0:00 0.00% top 79586 _smtpd 2 0 1936K 4828K idle kqread 0:00 0.00% smtpd 18799 fireman 2 0 1396K 3340K sleep/0 kqread 0:00 0.00% sshd 20179 www 2 0 1320K 3324K idle kqread 0:00 0.00% httpd 45288 root 18 0 944K 916K idle sigsusp 0:00 0.00% ksh 51902 root 2 0 760K 2548K idle netio 0:00 0.00% syslogd 37356 www 2 0 1332K 3180K idle kqread 0:00 0.00% httpd 82428 root 2 0 1472K 2284K idle kqread 0:00 0.00% httpd 62829 _ntp 2 0 908K 2772K idle kqread 0:00 0.00% ntpd 89278 root 2 0 872K 1524K idle kqread 0:00 0.00% cron 16265 _smtpd 2 0 1652K 3472K idle kqread 0:00 0.00% smtpd 46732 _smtpd 2 0 1456K 3304K idle kqread 0:00 0.00% smtpd 3405 root 2 -20 1264K 1956K idle kqread 0:00 0.00% ntpd 30532 root 2 0 1716K 2164K idle kqread 0:00 0.00% smtpd On Tue, 7 Mar 2023 at 08:36, Stuart Henderson <s...@spacehopper.org> wrote: > On 2023/03/07 07:10, Tom Smyth wrote: > > I m running smokeping fcgi and rrdcached ontop of OpenbSD, to smokeping > > about 150 devces > > the page load times can take 30 seconds to 1 minute, > > is there any way to speed this up. > > > > im running 7.2 OpenBSD on amd64 vm on top of an SSD array > > > > any tips tricks welccome ... > > One quick thing to try is updating to -current, I made some changes to > the rrdtool port which may possibly help a little. > > Check that smokeping is actually using rrdcached (watch top while > opening a page) - the pkg-readme only gives instructions for passing the > required fastcgi variable through for nginx, I don't know how to do that > for httpd (or whether it's actually possible). > > Other than that, rrdtool/rrdcached is just slow on OpenBSD. If it's > anything like mine you'll see high cpu spin % in top while it's busy. > You can try changing the number of cores in the VM - if you've given it > lots of cores try *reducing* it a bit. To pick a number out of the air > I'd suggest probably 4-6. (mine is bare metal and I can't drop the > number short of kernel hacks to set more cores offline). > > You can hide the slowness at the loss of dynamic functionality in the > web interface by pre rendering the html/graphs from a cron job rather > than using the fastcgi (see the pkg-readme). But other than the above > I'm out of ideas to actually make it run faster. > > (If anyone interested in poking at kernel locks would like flamegraphs > from my monitoring box - librenms/smokeping/icinga2/mariadb with lots > of rrdtool/rrdcached - let me know. Spin is pretty brutal.) > > -- Kindest regards, Tom Smyth.