ONLYOFFICE / DesktopEditors

An office suite that combines text, spreadsheet and presentation editors allowing to create, view and edit local documents
https://www.onlyoffice.com
Other
2.77k stars 320 forks source link

High CPU usage for idle Document, much more than idle Spreadsheet or Presentation #1000

Open jbuencuerpo opened 2 years ago

jbuencuerpo commented 2 years ago

This issue is unique.

Operating System

Linux (DEB package)

Version information

7.1.1.57

Expected Behavior

Low idle CPU usage when no editing a word document.

Actual Behavior

High cpu (10-15% per document) just with an open blank document, and it increases with every document open.

Reproduction Steps

  1. Open OnlyOffice
  2. Open a blank document, check CPU usage
  3. Wait in case there are spikes
  4. Open a second one etc...

Additional information

I have try different resolutions, and disable the plugins without any differences

ShockwaveNN commented 2 years ago

Hi, could you describe how do you measure this

High cpu (10-15% per document) just with an open blank document, and it increases with every document open.

image

I've opened 4 docs and in peak it's looking like this

jbuencuerpo commented 2 years ago

I have used htop or gnome-system-monitor. It is 10-15% per core. I have 4 cores in this machine, but in any case the idle for a presentation or a xls is close to 1-2% so more what I would expect. I have tested X11 and Wayland. I have also tested on other laptop (also with Pop_OS 22.04, but I guess is not the culprit) with high cpu percentage (15-20%) per document. Screenshot from 2022-08-16 18-10-24

ShockwaveNN commented 2 years ago

So, I've opened 10 tabs of desktopeditors and see a picture like this:

image

Looking ok I guess, around 2% per doc

Not sure how we can descrese it or reproduce it

In same time htop showing numbers like this:

image

But I'm not sure how to interpret them, and why they so differ from gnome-system-monitor values

jbuencuerpo commented 2 years ago

I guess you have 8x or similar cores, and it is dividing, check in gnome-system-monitor preferences.

image

ShockwaveNN commented 2 years ago

Thanks, I can confirm that

Spreadsheet Editor and Presentation editor in idle took around 2-5% of CPU

But DocEditor took around 15%

Not sure that we can optimize it, but I've created issue 58571 in our private issue tracker

jbuencuerpo commented 2 years ago

Ok, thanks I will patiently wait for news then. 15% per-document is huge in my opinion, not sure if with the server is the same hit. Thanks in any case

ShockwaveNN commented 2 years ago

15% per-document is huge in my opinion

Agree with you, but not sure that we'll be able to find root cause of this problem without much trouble

not sure if with the server is the same hit

I'm no good at measuring CPU usage at all and without you, I don't think I can detect DesktopEditor high CPU usage, but if you got free time you can checkout personal.onlyoffice.com or other instance of DocumentServer and also compare, I think you're got more experience when me

zenfas commented 2 years ago

Confirm very hight CPU usage on my Windows PC

jbuencuerpo commented 1 year ago

I have just tested with the new version 7.3, and it stills has high CPU usage.

Jorgemgm commented 1 year ago

On Proxmox we installed the Nextcloud on one container and the OnlyOffice 7.4 Document server on another container.

We can't understand why OnlyOffice 7.4 only use one vCPU:

For OnlyOffice 7.4 we configured the RAM on postgresql.conf.

How we can configure the use of the other vCPU on OnlyOffice 7.4?

trofim24 commented 1 year ago

@jbuencuerpo this repo/this issue is about Desktop version. Your question is about DocumentServer.

Turab commented 1 month ago

I confirm this on OnlyOffice 7.x series and all of 8.x (of which I am using now is 8.1.1.27) on Windows 11.

editors_helper.exe spends %100 CPU on always the same specific cores. When I check the task manager, I see that CPU load is around %15-20 but when I check the cores, always the cores 8 and 10 are at %100 until I kill editors_helper.exe. If I don't, it heats and the CPU fan goes full blow for hours, even if there are no open documents or any OnlyOffice editor running.

Interesting to see this bug is persisting for more than 3 years as of now.