Console Output in Web UI (Workbench) CPU load in web browser increases noticeably for fast or long output

    • Offizieller Beitrag

    But I wanted to at least report:

    What are you reporting? That your browser is doing a lot of work because it is refreshing a very long log file very quickly?

    omv 7.0.5-1 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.1.6 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.4


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • This is just some scrolling text. Nothing that should overwhelm a contemporary web browser.

    It seems to also have a mechanism of not keeping the entire log, but throwing older rows out of its buffer (e.g. only keeping the newest 1000 lines).

    Something in that JS implementation of a console window in this Web view is not optimized. That's what I'm reporting.

    Odroid HC2 - Armbian 24 Bookworm - OMV7

    • Offizieller Beitrag

    This is just some scrolling text.

    Really? Because that text is updated from a temporary file in /tmp/. And because the file may change due to how some commands output, the browser window indirectly (through php) reloads the entire file.

    Something in that JS implementation of a console window in this Web view is not optimized. That's what I'm reporting

    OMV uses Angular not some omv-specific framework. What you are reporting is known. Very large jobs are always going to be a problem with this type of client-server architecture. OMV would have to switch (major rewrite) to something like node.js and websockets to avoid this.


    By the way, I even work with some VMware products that are bad at this.

    omv 7.0.5-1 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.1.6 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.4


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • Ok, this limitation is accepted then:

    • If one has constant high frequency console output, then better only watch max 1-3mins, then close the browser window.
    • Then there is currently no way to return to an open session.
    • Returning to Services > USB Backup later only shows the list of existing jobs.
    • You can enter or run another instance.
    • But not re-enter into a running one to observe it.


    One idea (if feasible) to still make the best out of the given framework:

    • The overview shows a "running" text/icon near running backup jobs.
    • Hovering over that running text/icon, shows a hint "show progress", which if clicked takes you into the detail window again, where it re-initiates the log (starting the output that standard-out of the running process produces at this very moment).
    • Then you can reinsure yourself about the progress.
    • Watch 1-2mins again at most not to get the web browser too stressed.
    • Then close the browser window again.


    As written. Just an idea. If too much work it's ok as-is for small to medium console output amounts.

    • Everyone who wants to observe a massive or long output has the workaround to monitor via SSH.

    Odroid HC2 - Armbian 24 Bookworm - OMV7

  • Given your post a second thought:

    Zitat

    Updated from a temporary file in /tmp/.

    And because the file may change due to how some commands output, the browser window indirectly (through php) reloads the entire file.


    That may explains it B/c usually those JS framework (like Angular or React) manages this DOM / shadow DOM really efficiently, and process 10k of objects.


    But the way how that temporary intermediary file is written and loaded may indeed be the problem. Only usbbackup uses that /tmp output file, or all apps which use the console output mechanism in the Web UI?



    Ideal: The temporary file is chunked into intermediary chunks (as common in the video streaming context).

    (That chunks don't need to be own files necessarily. Cam also be in the same file, and just a line-number-pointer makes sure that the correct (=non-overlapping chunks) are loaded.)


    Simplified scheme:

    • chunk1.txt: 12
    • chunk2.txt: 34
    • chunk3.txt: 56
    • ...
    • The JS always loads only the newest chunk, and keeps only N old chunks (so that you can scroll back a little)


    As it is now (maybe) Simplified scheme:

    • tmp.txt at t0: 1234567
    • tmp.txt at t1: 12345678
    • tmp.txt at t2: 123456789
    • tmp.txt at t3: 23456789
    • tmp.txt at t4: 234567890a
    • tmp.txt at t5: 234567890ab


    So the browser loads the same stuff over and over again, and only minimally new stuff and maybe only minimally the old stuff gets removed from tmp.txt. Is this happening?

    Odroid HC2 - Armbian 24 Bookworm - OMV7

  • I wrote "drastically/exponentially" as I only loosely observed this, and not scientifically/methodologically.

    Linear growth of a memory flowing full is also enough to get to a stall finally.


    Sorry if this was over alerting language. Corrected it in the title to "noticeably" and even the annotated screenshot.

  • porg

    Hat den Titel des Themas von „Console Output in Web UI (Workbench) CPU load in web browser increases drastically/exponentially for fast or long output“ zu „Console Output in Web UI (Workbench) CPU load in web browser increases noticeably for fast or long output“ geändert.
  • Everyone who wants to try to reproduce this.


    Run a USB Backup with a significant amount of files (for a test you can create 100k folders / 1M mini files with a loop if needed).


    And observe your web browser as it displays the ongoing console output for it.

    Odroid HC2 - Armbian 24 Bookworm - OMV7

    • Offizieller Beitrag

    Everyone who wants to try to reproduce this.


    Run a USB Backup with a significant amount of files (for a test you can create 100k folders / 1M mini files with a loop if needed).


    And observe your web browser as it displays the ongoing console output for it.

    Why??? the backup serves a purpose, it does what it says on the tin, if you believe you can produce something better by all means give it your best shot. I use this plugin but it runs as a scheduled job I don't need to see the output as I get an email notification when it completes.


    OMV has 2 dev's one looks after OMV core the other the plugins, the software is open source, the forum is all end users helping each other

    • Offizieller Beitrag

    Only usbbackup uses that /tmp output file, or all apps which use the console output mechanism in the Web UI?

    All apps that show console output.

    omv 7.0.5-1 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.1.6 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.4


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • geaves

    • OMV is a voluntary open source project. I expect nothing.
    • If the above is deemed of zero importance, then just drop it. No harm done.
    • I had written "an idea" and "everyone who wants to try to reproduce".
    • In case anyone has interest to improve that particular part. That was all.

    Odroid HC2 - Armbian 24 Bookworm - OMV7

    • Offizieller Beitrag

    OMV is a voluntary open source project. I expect nothing.

    The amount you post is very verbose about the smallest of issues. You will also continue debating these small issues for a long time for expecting nothing.

  • I now receive your message:

    • I should already better pre-filter what I post about as a first measure of respect. Will try to better follow that.
    • Per each new community one joins, you have to get a feeling of what's desired, appreciated and adequate there, and what better be left off.
    • I was a slow learner in that regard here on OMV 😉
    • Now that recent messages were clear in that regard. Getting silent now.

    Odroid HC2 - Armbian 24 Bookworm - OMV7

    • Offizieller Beitrag

    If the above is deemed of zero importance, then just drop it

    It is of no importance, because if it where this would have been brought up before

    I had written "an idea" and "everyone who wants to try to reproduce"

    To what end, to confirm what you have tried which I'm trying to get my head around the relevance of

    In case anyone has interest to improve that particular part

    Who do you think is going to do that ryecoaaron has written that plugin, and to reiterate it does what it says on the tin. If you believe you can improve it from your 'testing' as I said give your best shot.

    • Offizieller Beitrag

    If all affected by this, then maybe an incentive to look at it.

    Most of the plugins that I have written that use it only output 1-100 lines. So, it isn't an issue. Only large rsync jobs cause this.

    omv 7.0.5-1 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.1.6 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.4


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • Independent of the performance issues:


    Would it be possible to start a potentially multi hour script such as USB-backup, close the browser, and hours later return and jump into the log session, which you started?


    This is a valid mainstream use case. You have a NAS to do the heavy lifting, and leave your other devices unaffected. Having to leave i.e. a laptop running, just to observe the process is not very convenient. Would be cool if you could detach and reconnect to the log output of a running job instance.


    What I do for now is trust it blindly (closing the web browser) and when coming back later observe it indirectly: USB HDD LED flickering, Shell: /var/log/rsync.log or iotop to see whether high I/O or fatrace to see filesystem activity. To know whether USB Backup completed and I can detach my HDD safely.

    Odroid HC2 - Armbian 24 Bookworm - OMV7

    2 Mal editiert, zuletzt von porg ()

    • Offizieller Beitrag

    Would it be possible to start a potentially multi hour script such as USB-backup, close the browser, and hours later return and jump into the log session, which you started?

    No. You could find the file in /tmp if the job was still running. Normally there is little need to watch it. You can have it email you the results.

    omv 7.0.5-1 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.1.6 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.4


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • What file is supposed to be in /tmp during a running sync?

    What I found is that during a running sync theres /srv/LONG-UID and as soon the job is done it is not there anymore.

    Odroid HC2 - Armbian 24 Bookworm - OMV7

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!