Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

100% CPU (constant high cpu) in v1.1.1 #2856

Closed
microlancer opened this issue May 30, 2019 · 17 comments
Closed

100% CPU (constant high cpu) in v1.1.1 #2856

microlancer opened this issue May 30, 2019 · 17 comments

Comments

@microlancer
Copy link

Not sure if related to #294 or #555 but I'm seeing 100% cpu for hours and hours without end. I'm running v1.1.1 and I have one trade open.

Screenshot from 2019-05-30 07-34-23

I'm seeing the "Synchronizing DAO" activity bar spinning forever as well, not sure if it's related.

This 100% CPU is really heating up my hardware, and fans are going max speed all day.

@ghost
Copy link

ghost commented May 30, 2019

My experience is that if the sync doesn't realize in 2/3 minutes, then the best is to restart the appli.

If restarting doesn't help, please have a look at the concerned part of the concerned logfile, and upload it here.
So it could provide some info about what is occuring.

@ripcurlx
Copy link
Member

We are planning to release a new version (1.1.2) next week which should help with the DAO sync issue. Fingers crossed, that it will also fix your problem.

@sqrrm
Copy link
Member

sqrrm commented Jun 25, 2019

@thorie7912 Did you see an improvement with the new release? If so, please close this issue.

@microlancer
Copy link
Author

I did not see an improvement. It's running now and still at 100% CPU. v1.1.2

@a123b
Copy link
Contributor

a123b commented Jun 25, 2019

I've encountered this too in v1.1.2 while trading BSQ. When it happens and you go to the BSQ wallet's transaction list, the whole app gets incredibly laggy until you switch to another screen (green bar animation gets very choppy, if you click on something it can take a few seconds for something to happen etc.)

If the sync doesn't finish within 1-2 minutes of starting the app, it will never finish and you have to restart the app. Don't know if it was a coincidence, but every time it happened to me I had started Bisq with limited heap size (-Xmx512M). Without that memory limit, I never faced this problem.

@sqrrm
Copy link
Member

sqrrm commented Jun 25, 2019

Bisq is fairly greedy with memory, best to give more if possible.

I thought the DAO syncing issue would've been resolved but apparently it's still a problem.

@ghost
Copy link

ghost commented Jun 26, 2019

@thorie7912 ,
What is your OS ? and how much RAM has your computer ?
Maybe with not enough RAM the computer uses all of its time to swap to the disk.

@microlancer
Copy link
Author

I monitor my ram/swap usage often, and I have 16 GB with usage ~40-50% most of the time. It should be enough. I'm running Ubuntu 18.04.

@ghost
Copy link

ghost commented Jun 26, 2019

@thorie7912 ,
You may have a look at your sys log files.
In linux it's at /var/log. You can only look in admin mode.
There you may get some information on why Bisq eats so much CPU.

@a123b
Copy link
Contributor

a123b commented Jun 26, 2019

I doubt you'll find anything related to high CPU usage of a Java app in the system logs...
Running Bisq with a CPU profiler would probably be very helpful.

@microlancer
Copy link
Author

Any tips on how to run a CPU profiler? I recall doing some jvm-debug stuff a long time ago.

@a123b
Copy link
Contributor

a123b commented Jun 26, 2019

I just tried attaching to Bisq in VisualVM just for fun. @thorie7912 here's how I did it:

  • Start VisualVM and Bisq
  • Select Local/bisq.desktop.app.BisqAppMain in VisualVM
  • Switch to the Profiler tab
  • Replace the Profile classes list on the right with bisq.core.**
  • Add ,com.google.**, org.spongycastle.** to the Exclude outgoing calls list below
  • Click the Profile: CPU button and let it run for a few minutes
  • Click the Collected data: Snapshot button and then right click -> Save As... the snapshot in the list on the left to export it

I attached the CPU profiler right after starting Bisq, before I entered the wallet password. After a while I switched to the BSQ wallet transactions list where the app eventually became completely unresponsive while using 100% CPU. I stopped the profiling then, but the app was still unresponsive. Then I decided to profile another minute of this hanging state.
Here are the saved snapshots: bisq-cpu-profiling-snapshots-a123b.zip

Some observations:

  • Almost all of the time is spent in DaoStateService.getTx(String).
  • On startup, most of the getTx calls seem to come from BondRepository.update(), which was called 288 times in my case. I don't think this has anything to do with the issue, but it seems pretty inefficient.
  • When the app starts to hang in the BSQ transaction list, it seems to call BsqWalletService.getValueSentToMeForTransaction(Transaction), BsqWalletService.getValueSentFromMeForTransaction(Transaction) and DaoFacade.hasTxBurntFee(String) in an endless loop. Looking at the code, this seems to be in the constructor of BsqTxListItem. So the question would be why did the app get stuck creating BsqTxListItems in an endless loop?

@stale
Copy link

stale bot commented Sep 24, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the was:dropped label Sep 24, 2019
@stale
Copy link

stale bot commented Oct 1, 2019

This issue has been automatically closed because of inactivity. Feel free to reopen it if you think it is still relevant.

@stale stale bot closed this as completed Oct 1, 2019
@spogulis
Copy link

The issue is still relevant. Downloaded a new installation of Bisq on new hardware and, while the DAO is synchronizing, hardware usage is as following:
CPU - 20 to 40%
RAM - ~4GB of 16
Network - pretty much maxed out at 25 MB/s.

It bogs down the whole system (i7, 1060GTX), so this should be looked into.

@da-kami
Copy link

da-kami commented Nov 10, 2020

Similar problems here. Running on macOS Catalina
CPU between 100% and 125% (on Quadcore)

It shows:

image

Due to CPU usage UI lags heavily, almost not usable.

@ripcurlx
Copy link
Member

@da-kami Do you see the same CPU usage after the DAO finished synchronizing as well?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants