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

Memory Usage keeps increasing #341

Open
fluffylea opened this issue Jul 14, 2024 · 6 comments
Open

Memory Usage keeps increasing #341

fluffylea opened this issue Jul 14, 2024 · 6 comments
Labels
bug Something isn't working

Comments

@fluffylea
Copy link

fluffylea commented Jul 14, 2024

Description

Every time i switch wallpaper using swww img, there is a line of log output, and the memory usage of the program goes up.

Steps to reproduce

  • Invoke swww-daemon in a way that allows monitoring the log output
  • Switch between two wallpapers a couple of times with
    swww img Pictures/Reef.png and swww img Pictures/Reef-blurred.png
  • Watch log output of the daemon print it uses more ram and observe it actually using more ram:
     130ms [INFO]  (transition) BumpPool with: 1 buffers. Size: 12000Kb
    2465ms [INFO]  (transition) BumpPool with: 1 buffers. Size: 12000Kb
    2499ms [INFO]  (transition) BumpPool with: 2 buffers. Size: 24000Kb
[...]
  218619ms [INFO]  (transition) BumpPool with: 80 buffers. Size: 960000Kb
  220693ms [INFO]  (transition) BumpPool with: 81 buffers. Size: 972000Kb
  221725ms [INFO]  (transition) BumpPool with: 82 buffers. Size: 984000Kb
  223091ms [INFO]  (transition) BumpPool with: 83 buffers. Size: 996000Kb
  224279ms [INFO]  (transition) BumpPool with: 84 buffers. Size: 1008000Kb

Expected Behaviour

The Memory used by previous iterations of the wallpaper being free'd again.

Actual Behaviour

The Memory usage keeps going up with every wallpaper change.

Version

Current main, commit 2da1f57e6b0dbc2d6b62cb940a426486710cf14e

Interesting observations

On v0.9.4, it functions "correctly" with it freeing the memory after the animation
On v0.9.5, the virtual memory keeps increasing, but the resident set size goes back after the animation
On current main, both keep going up until it crashes

@LGFae
Copy link
Owner

LGFae commented Jul 21, 2024

Try using swww-daemon --format xrgb to initialize the daemon. See if it fixes it. You can test it simply by checking whether the log is still printing all those messages.

Alternatively, are you using fractional scale? If yes, can you please check if this still happens without any scaling?

@LGFae LGFae added the bug Something isn't working label Jul 21, 2024
@eaxly
Copy link

eaxly commented Aug 24, 2024

Hello there! I am having the same issue on a 1920x1080, no fractional scaling monitor. Even when using swww-daemon --format xrgb, this still happens, when switching wallpapers.

@LGFae
Copy link
Owner

LGFae commented Aug 24, 2024

@eaxly are you on the latest git version?

@jdvmat
Copy link

jdvmat commented Aug 26, 2024

Hi, when using the git version (0.9.5-masterV2) in debian unstable with sway, I don't have the issue for swww-daemon --format xrgb with transition-type=none. In this case changing between (heavy) gifs keeps the memory low (<50Mb), which is really impressive :)

If --format xrgb is not specified then --format rgb is used and the memory keeps increasing steadely when changing images fast, although in this case the increment is slow. When using transition-type=simple I have the same issue as documented in this thread (memory increases rapidly until using whole RAM).

I didn't test 0.9.4 and 0.9.5 since in those releases I'm suffering #357

@eaxly
Copy link

eaxly commented Aug 31, 2024

@eaxly are you on the latest git version?

I am now using a different monitor with 3840x2160 res and 1.5 scaling on hyprland, and the issue doesn't seem to persist, at least when initializing swww with swww --format xrgb. When I set a larger gif as wallpaper swww uses some 66Mb all the way to around 200Mb, depending on the wallpaper (some of the wallpapers I use are pretty large, so this is expected i guess). But when switching to some static image, swww memory usage drops down to <3Mb. It could very well be that on the old monitor I wasn't using the latest git version of swww, but right now, I no longer have this issue.

@eaxly
Copy link

eaxly commented Aug 31, 2024

Also, I forgot to add that no matter the transition-type of swww, Memory usage stays the same for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants