brndnmtthws / conky

Light-weight system monitor for X, Wayland (sort of), and other things, too
https://conky.cc
GNU General Public License v3.0
7.31k stars 620 forks source link

Conky causes weird CPU usage pattern #341

Closed solitone closed 6 years ago

solitone commented 8 years ago

I've noticed that when conky has been running for some long time (several days), it starts using the CPU in a dodgy manner. Specifically, the load on one of my four CPU threads (I have an i7 processor, with 2 cores and 4 threads) has high cyclical peaks, as you can see in the pic below:

cpumon

I'm pretty sure it's conky that causes this issue, since as soon as I kill conky the CPU usage pattern goes back to normal:

cpumon3

I'm using conky 1.9.0 provided in debian repository, and the theme conky lua downloaded and installed manually.

Here's the detail of my installation:

$ conky -version
Conky 1.9.0 compiled Wed Sep 10 07:11:34 UTC 2014 for Linux 3.2.0-4-amd64 (x86_64)

Compiled in features:

System config file: /etc/conky/conky.conf
Package library path: /usr/lib/conky

 X11:
  * Xdamage extension
  * XDBE (double buffer extension)
  * Xft
  * ARGB visual

 Music detection:
  * Audacious
  * MPD
  * MOC
  * XMMS2

 General:
  * math
  * hddtemp
  * portmon
  * Curl
  * RSS
  * Weather (METAR)
  * Weather (XOAP)
  * wireless
  * support for IBM/Lenovo notebooks
  * nvidia
  * eve-online
  * config-output
  * Imlib2
  * apcupsd
  * iostats
  * ncurses
  * Lua

  Lua bindings:
   * Cairo
   * Imlib2

I'm also attaching my conkyrc. conkyrc.tar.gz

plikhari commented 8 years ago

You should be using the current version - at least 1.10.x. - a whole lot of things have changed - try it. There is no active branch of development for 1.9.x .

solitone commented 8 years ago

Thanks for your reply, plikhari!

I've installed a new package (from jessie-backports), and upgraded to version 1.10.5. After doing some minor correction to my old conkyrc file I managed to start conky, although I'll need to make some further adjustments, as at the moment the look is pretty bad!

conky

Need to check whether a new version of the theme I use is available.

In any case, the main thing is I'll monitor its behaviour in the next few days, and see whether the CPU issue is no longer there.

plikhari commented 8 years ago

Now we are talking :D You are using bargraph.lua perhaps or one of the variants - you just need to adjust the x y cordinates for ram, swap etc and you should be good to go.

solitone commented 8 years ago

Ok, I've adjusted my conkyrc file, and also converted to the new Lua-based configuration format of v. 1.10.0 (I used a convert.lua script I found in the package I installed).

Apparently everything's fine, but I've got to wait some days before I can say there in no longer any CPU issue.

I'll keep you updated. For the time being thanks again!

solitone commented 8 years ago

Hi,

after some days, I got the very same problem I described in my original message, although now I'm on version 1.10.5. So it doesn't seem a version related issue.

Please let me know whether I should post some additional information.

plikhari commented 7 years ago

You know testing for such an issue is a bit awkward as it spans several days and unless you are running conky on a server - it is hard to duplicate. I was hoping that some one who is doing coding would look at this - but there are so many variables that could be happening.

In the absence of a root cause solution - perhaps if you restarted conky every 2 or 3 days - that could just be a cron job solution.

twifty commented 7 years ago

I am also experiencing the same problem running on Ubuntu 16.04. I notice xorg cpu usage running between 20% - 30% when it should be idling. killing all conky immediately solves the issue. The main difference is that on my system, I notice the problem after about 7-8 hours (window switching, scrolling etc... becomes sticky).

If there is any way I can help find the root of the problem, please let me know.

lasers commented 6 years ago

1 years 9 months passed. Can you determine if you're still having this problem today on 1.10.9 or preferably 1.10.10_pre (git)? The older versions are not trustworthy due to too many changes that can be hard to track. Thank you.

lasers commented 6 years ago

@solitone @twifty Can you try the current master? Thanks.

git clone https://github.com/brndnmtthws/conky
cd conky
mkdir -p build
cd build
cmake ..
make -j4  # 4 cores to run in parallel
src/conky -c ~/conky.conf # <-- your config goes here
solitone commented 6 years ago

On 05/09/18 23:29, lasers wrote:

@solitone https://github.com/solitone @twifty https://github.com/twifty Can you try the current master? Thanks.

Sorry, but I no longer have the old system where I experienced the issue reported. Unfortunately I cannot reproduce nor check whether it has been solved with the latest master.

twifty commented 6 years ago

TBH, I stopped using conky shortly after experiencing this problem. If I were to use something similar again, I would want something written in possibly python or nodejs, for which I could write my own plugins. HTML and CSS is much more user friendly than the aged lua.

lasers commented 6 years ago

@solitone @twifty Thanks for the replies.

Right now...

I can't reproduce this behavior on current master with gnome-system-montior tool. Although crazy, my CPUs are deemed to be in consistent with and without conky. I wanted to know one more thing. What window manager/desktop environment did you use? Thanks.

solitone commented 6 years ago

On 06/09/18 15:46, lasers wrote:

I wanted to know one more thing. What window manager/desktop environment did you use? Thanks.

I was on an old version of KDE.

Cheers!

lasers commented 6 years ago

@solitone starts using the CPU in a dodgy manner. Specifically, the load on one of my four CPU threads (I have an i7 processor, with 2 cores and 4 threads) has high cyclical peaks

@twifty notice xorg cpu usage running between 20% - 30% when it should be idling. killing all conky immediately solves the issue.

I can reproduce this bug right away in bspwm. It could had something to do with with desktop environment where it took you hours to reproduce this in kde, xfce, etc... versus taking an instant to reproduce this in bspwm. The latter is largely favored. :-)

Main thing is that both conky and xorg are always high when that happens. I made a gnome-system-monitor screenshot there too for an obvious CPU usage comparison.

Since both of your issues behaves similar to bspwm issue and both of you stopped using conky long time ago too, I'm going to consider this as indirect duplicate of #425 and close this.

Thanks for the report. Keep them coming. :slightly_smiling_face: