The high cpu usage seems to *relate to the size of the DB*.

I tried with my schema and a new sqlite db - no problems

I migrated my mysql DB to sqlite and got the same problems, if not worse - 
elapsed time 18 minutes clock (10 min cpu user, 2 min sys)  to run a 
default Seasons report and it failed to create the index.html file.

Another time it took 10 minutes, created an index.html, but only generated 
a single png file.

I'm out of ideas.

On Tuesday 26 December 2023 at 12:42:59 pm UTC+10 Cameron D wrote:

> Back to the reports themselves.
> I am running the GW1000 system without any reports, and will probably end 
> up running cron jobs to occasionally update the reports.
>
>
>    - I created an empty folder and pointed the config file there.
>    - This is a heavily customised Seasons report, because it is basically 
>    indoor air/living quality only.
>    - I ran    weectl report run SeasonsReport 
>     --config=/etc/weewx/ewitt.conf
>    - then  ls -lrt --full-time to show the increment in file creation 
>    times.
>    - my customised report has 5 daily, 4 weekly, 3 monthly and 5 yearly 
>    plots, so not a particular burdon.
>
> The results show the report  files are generated in short bursts, then a 
> gap, then a few more, etc.  The sequence is...
>
>    - start at 2:14.6 seconds
>    - 14.8 s NOAA folder populated by 14.8 seconds
>    - 2.5 s later index.html, followed statistics
>    - 0.9 s gap to  telemetry, tabular &  celestial, which were within 
>    0.02 s
>    - 40 s gap to rss.xml ,
>    - 0.04 sec gap to the start of the PNG files daybarom and daytempdew
>    - 13s gap to dayhumidity, dayPM, dayco2, weekbarom and weektempdew 
>    (all within 0.25s)
>    - 21s gap to weekPM, weekco2, monthbarom, monthtempdew (all within 0.2 
>    s)
>    - 10.3 s gap to monthco2, yearbarom, and the remaining 4 year 
>    summaries. (within 0.1s)
>    - 10.2s gap to seasons.js, css, font and favicon.ico (all at identical 
>    times - to the nanosecond!)
>
>
>
> On Monday 25 December 2023 at 7:41:15 pm UTC+10 Cameron D wrote:
>
>> A bit more info on the reports.
>>
>>    1. I disabled any reports from the GW1000 and cpu usage dropped to 
>>    zero.
>>    2. I set the WMR300 to just use the Seasons skin as-shipped, but 
>>    there was no improvement.
>>    3. I changed wmr300 config to write to a new empty directory (with 
>>    suitable ownership and permissions) and things got much worse:
>>
>>
>>    - NOAA dir was created and populated.
>>    - A set of PNG files and inxex.html were written as expected.
>>    - the reports now timeout every minute, rather than every 2 minutes.
>>    - various support files are never copied across - seasons.css and js; 
>>    background, icons, font, lang folders do not exist (not sure whether some 
>>    are hangovers from prev versions.)
>>    - Most files are not updated when expected.
>>
>>
>>  For example, I deleted all day*.png files and, at the next update, noted 
>> the following:
>>    
>>    - the barometer and tempdew were the only images to reappear. 
>>    -  rss.xml was updated
>>    - html files celestial, tabular and telemetry were 1 minute old
>>    - statistics.html was 2 minutes old
>>    - index.html was 4 min old
>>    - NOAA had not been updated for 7 min
>>    - other files were older - css and js files were dated from when I 
>>    copied them over manually.
>>    - the files that do get updated within a report period are often 
>>    dated within 0.1 seconds of each other, but sometimes are seconds apart.
>>
>>
>> On Monday 25 December 2023 at 5:34:29 pm UTC+10 Cameron D wrote:
>>
>>
>> *Reports not completing:*
>> Both systems report via customised Seasons skins, and they *appear *to 
>> be giving reasonable updates to the reports. The WMR300 merges data from 
>> both databases and has a separate issue that I will report in detail later. 
>> The gw100 seems to give updated reports, including sensible plots and 
>> current conditions every 2 minutes.
>> They sample at 1 minute intervals and  every 2 minutes *both *systems 
>> independently report:
>> *INFO weewx.engine: Launch of report thread aborted: existing report 
>> thread still running*
>>
>> *Both instances are each consuming 60 to 100% cpu permanently.*
>>
>> When I stop (allow it to die) and restart, there is not much cpu activity 
>> for the first minute, so I would guess it is tied into thje report 
>> generation.
>>
>> I'll have a go with the default skin...
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-development/b05efd6e-f8a9-4d02-9a46-ebeb894d2f5dn%40googlegroups.com.

Reply via email to