The righthand frame is REALLY slow to load
Occasionally it even times out if the system is rally busy. Usually it loads ok, but it typically takes 12 to 20 seconds to load. What is it doing that is taking so long?
I found the cause of the delay. The code to display the drive temperatures on the main page calls smartctl with a -a option. This takes about 3.5 seconds per drive and I have 4 drives. I changed this to -A and this seems to give me all the needed information and only takes about 1.5 seconds per drive. It certainly still gives the temperatures which is what is needed for the home page.
Well, changing the -a to -A does seem to reduce the information slightly on the drive SMART status page, I think the home status page needs to call smartctl with a -A but the SMART status page needs to call it with -a, unfortunately I have not been able to figure out how to get it to do that yet. :( The SMART status page info is still pretty complete for my purposes though using the -A so I will leave my system like this until there is a better fix.
Does it still show the temperature when you use the -a flag?
@iliaross have you see this issue before?
The release version uses -a, my modified version uses -A which is quicker. still shows the temperature. I have another version that generates the page using a cron job and outputs the pre-generated page. It's really fast but the data lags from a minute to 5 minutes behind.
Interestingly enough if you configure the page to just display a static web page using the config it still delays in order to generate all the stats before it displays the static page. I had to replace right.cgi with a version that just displays the static HTML to get it to speed up. :(
FYI: Here is the time executing smartctl with the current -a option. It has to do this 4 times because I have 4 physical drives in a raid array.
time smartctl -d cciss,0 -a /dev/cciss/c0d0
smartctl 6.2 2013-07-26 r3841 [x86_64-linux-3.19.4-1.g51ddeac-desktop] (SUSE RPM) Copyright (C) 2002-13, Bruce Allen, Christian Franke, www.smartmontools.org
/dev/cciss/c0d0 [cciss_disk_00] [SCSI]: Device open changed type from 'sat,auto+cciss' to 'cciss' === START OF INFORMATION SECTION === Vendor: HP Product: EH0146FBQDC Revision: HPD3 User Capacity: 146,815,737,856 bytes [146 GB] Logical block size: 512 bytes Rotation Rate: 15000 rpm Form Factor: 2.5 inches Logical Unit id: 0x5000c50067a3dc33 Serial number: 6XM2GYQC0000B339MM1D Device type: disk Transport protocol: SAS Local Time is: Sun Jan 26 12:55:35 2025 EST SMART support is: Available - device has SMART capability. SMART support is: Enabled Temperature Warning: Enabled
=== START OF READ SMART DATA SECTION === SMART Health Status: OK
Current Drive Temperature: 31 C Drive Trip Temperature: 65 C
Manufactured in week 14 of year 2013 Specified cycle count over device lifetime: 10000 Accumulated start-stop cycles: 382 Elements in grown defect list: 68
Vendor (Seagate) cache information Blocks sent to initiator = 2293559761 Blocks received from initiator = 3028111570 Blocks read from cache and sent to initiator = 4229618207 Number of read and write commands whose size <= segment size = 4290150821 Number of read and write commands whose size > segment size = 0
Vendor (Seagate/Hitachi) factory information number of hours powered up = 15700.35 number of minutes until next internal SMART test = 31
Error counter log: Errors Corrected by Total Correction Gigabytes Total ECC rereads/ errors algorithm processed uncorrected fast | delayed rewrites corrected invocations [10^9 bytes] errors read: 0 1 0 1 0 3099361.846 0 write: 0 0 0 0 0 10628.548 0 verify: 0 0 0 0 0 0.000 1
Non-medium error count: 118
No self-tests have been logged
real 0m3.594s user 0m0.019s sys 0m0.004s
With the faster -A option I get this
time smartctl -d cciss,0 -A /dev/cciss/c0d0
smartctl 6.2 2013-07-26 r3841 [x86_64-linux-3.19.4-1.g51ddeac-desktop] (SUSE RPM) Copyright (C) 2002-13, Bruce Allen, Christian Franke, www.smartmontools.org
/dev/cciss/c0d0 [cciss_disk_00] [SCSI]: Device open changed type from 'sat,auto+cciss' to 'cciss' === START OF READ SMART DATA SECTION === Current Drive Temperature: 31 C Drive Trip Temperature: 65 C
Manufactured in week 14 of year 2013 Specified cycle count over device lifetime: 10000 Accumulated start-stop cycles: 382 Elements in grown defect list: 68
Vendor (Seagate) cache information Blocks sent to initiator = 2294108473 Blocks received from initiator = 3028129813 Blocks read from cache and sent to initiator = 4229623249 Number of read and write commands whose size <= segment size = 4290152173 Number of read and write commands whose size > segment size = 0
Vendor (Seagate/Hitachi) factory information number of hours powered up = 15700.52 number of minutes until next internal SMART test = 21
real 0m1.550s user 0m0.016s sys 0m0.004s
I have determined this issue only occurs with the "Framed" theme, the "Authentic" theme loads fairly quickly.
I have determined this issue only occurs with the "Framed" theme, the "Authentic" theme loads fairly quickly.
Great! The reason for this is that Authentic performs some pretty complex operations to speed things up. Essentially, it displays a cached version of the dashboard page while checking for updates in the background and updates the page within a couple of seconds without reloading the page.
@iliaross have you see this issue before?
Well, no, not really. It could happen on a drive that's about to fail. And, based on the SMART command output, using the cciss driver might cause a delay too, or perhaps the user has their drives in standby mode. I'm not sure, but I don't think it's something we need to address.
It would be nice if the Framed theme also did complex operations to speed things up and displayed a cached version of the dashboard page while checking for updates in the background.
Quote: Have you see this issue before?
It was caused in my case by:
- Using the "Framed" theme
- Having a system that has a hardware raid controller with multiple physical disks
I have switched to using the "Authentic" theme at least for now. It would seem that the "Framed" theme needs optimizations to speed things up and it needs to operate like the "Authentic" theme and display a cached version of the dashboard page while checking for updates in the background.
It would seem that the "Framed" theme needs optimizations to speed things up and it needs to operate like the "Authentic" theme and display a cached version of the dashboard page while checking for updates in the background.
Sadly, this won’t be possible to implement. The framed theme is designed to be as simple and straightforward as possible.
Sadly, this won’t be possible to implement. The framed theme is designed to be as simple and straightforward as possible.
Actually background status collection should still be supplying the data needed by the framed theme, so it doesn't need to run smartctl in the foreground.
@abcbarryn You might want to check that it's enabled at Webmin -> Webmin Configuration -> Background Status Collection.
Regarding: background status collection It was off by default and that did the trick! Having that off didn't seem to slow down the "Authentic" theme at all, but it really effects the loading time for the "Framed" theme.