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

Very high memory usage, hanging startup and sluggishness #481

Open
unleashit opened this issue Mar 14, 2025 · 29 comments
Open

Very high memory usage, hanging startup and sluggishness #481

unleashit opened this issue Mar 14, 2025 · 29 comments

Comments

@unleashit
Copy link

Amazing software, but I'm having some issues. Startup is taking around 30-60 seconds, and connections are very slow as well. Memory usage is almost 3gb just after starting, and goes higher from there.

Image

Here are my connections:

Image

I don't see anything off in the logs, but I can attach them if requested. This is a Windows 10 machine with connections to local WSL2 (running Docker) and several remote servers via SSH (also running Docker).

I'm not sure how xpipe handles connections and if the delays/high RAM use might be because it's trying to open and keep all the connections alive or if the problem is something else. I found at least one other issue relating to performance, but I'm opening a new one since that one was fixed and closed.

@crschnick
Copy link
Member

crschnick commented Mar 14, 2025

Just to confirm, you are on the latest version? This was an issue in the past, but should have been fixed.

If you are on the latest version, you can go to Settings -> Troubleshoot -> Heap dump and send me the heap dump file somehow privately. That dump contains the whole memory contents of XPipe.

@unleashit
Copy link
Author

Hey, sorry I left that out. Yes, it is the latest version 15.4. I tried doing the heat dump but it errored out:

Heat dump error ```bash java.io.IOException: Merged heap dump is incomplete at com.sun.management.internal.HotSpotDiagnostic.dumpHeap0(Native Method) at com.sun.management.internal.HotSpotDiagnostic.dumpHeap(HotSpotDiagnostic.java:70) at jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) at java.lang.reflect.Method.invoke(Method.java:580) at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:64) at jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) at java.lang.reflect.Method.invoke(Method.java:580) at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:97) at com.sun.jmx.mbeanserver.ConvertingMethod.invokeWithOpenReturn(ConvertingMethod.java:193) at com.sun.jmx.mbeanserver.ConvertingMethod.invokeWithOpenReturn(ConvertingMethod.java:175) at com.sun.jmx.mbeanserver.MXBeanIntrospector.invokeM2(MXBeanIntrospector.java:115) at com.sun.jmx.mbeanserver.MXBeanIntrospector.invokeM2(MXBeanIntrospector.java:52) at com.sun.jmx.mbeanserver.MBeanIntrospector.invokeM(MBeanIntrospector.java:236) at com.sun.jmx.mbeanserver.PerInterface.invoke(PerInterface.java:138) at com.sun.jmx.mbeanserver.MBeanSupport.invoke(MBeanSupport.java:252) at javax.management.StandardMBean.invoke(StandardMBean.java:405) at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:803) at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:802) at com.sun.jmx.mbeanserver.MXBeanProxy$InvokeHandler.invoke(MXBeanProxy.java:150) at com.sun.jmx.mbeanserver.MXBeanProxy.invoke(MXBeanProxy.java:167) at javax.management.MBeanServerInvocationHandler.invoke(MBeanServerInvocationHandler.java:258) at jdk.proxy1.$Proxy23.dumpHeap(Unknown Source) at io.xpipe.app.prefs.TroubleshootCategory.heapDump(TroubleshootCategory.java:173) at io.xpipe.app.prefs.TroubleshootCategory.lambda$create$11(TroubleshootCategory.java:158) at io.xpipe.app.comp.base.TileButtonComp.lambda$createBase$0(TileButtonComp.java:63) at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:86) at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:232) at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:189) at com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59) at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58) at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114) at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56) at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114) at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56) at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114) at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56) at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114) at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56) at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114) at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56) at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114) at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74) at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:49) at javafx.event.Event.fireEvent(Event.java:199) at javafx.scene.Node.fireEvent(Node.java:8963) at javafx.scene.control.Button.fire(Button.java:203) at com.sun.javafx.scene.control.behavior.ButtonBehavior.mouseReleased(ButtonBehavior.java:207) at com.sun.javafx.scene.control.inputmap.InputMap.handle(InputMap.java:274) at com.sun.javafx.event.CompositeEventHandler$NormalEventHandlerRecord.handleBubblingEvent(CompositeEventHandler.java:247) at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:80) at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:232) at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:189) at com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59) at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58) at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114) at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56) at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114) at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56) at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114) at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56) at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114) at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56) at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114) at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56) at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114) at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74) at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:54) at javafx.event.Event.fireEvent(Event.java:199) at javafx.scene.Scene$MouseHandler.process(Scene.java:3987) at javafx.scene.Scene.processMouseEvent(Scene.java:1893) at javafx.scene.Scene$ScenePeerListener.mouseEvent(Scene.java:2711) at com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:411) at com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:301) at java.security.AccessController.doPrivileged(AccessController.java:400) at com.sun.javafx.tk.quantum.GlassViewEventHandler.lambda$handleMouseEvent$2(GlassViewEventHandler.java:450) at com.sun.javafx.tk.quantum.QuantumToolkit.runWithoutRenderLock(QuantumToolkit.java:430) at com.sun.javafx.tk.quantum.GlassViewEventHandler.handleMouseEvent(GlassViewEventHandler.java:449) at com.sun.glass.ui.View.handleMouseEvent(View.java:560) at com.sun.glass.ui.View.notifyMouse(View.java:946) at com.sun.glass.ui.win.WinApplication._runLoop(Native Method) at com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:184) at java.lang.Thread.run(Thread.java:1570) ```

Let me know if there's anything else I can do to troubleshoot. Otherwise, I'll do a fresh reinstall and see if it helps.

@crschnick
Copy link
Member

That is a weird error, can you try again? It either ran out of memory or disk space when writing the file. Writing a file with 2GB might be error prone.

@crschnick
Copy link
Member

I don't think you have to reinstall it. Maybe restarting it and hoping that the heap dump it will be a little bit smaller on startup might make it work

@crschnick
Copy link
Member

If you want to somehow experiment a bit with what causes these performance issues, you can try out https://github.com/xpipe-io/xpipe-ptb as a separate version. That way you don't have to touch your normal connections and can start fresh.

@unleashit
Copy link
Author

unleashit commented Mar 14, 2025

Closed the app, ran again, then repeated after clearing the cache. Still getting an error. I think its the same, but just in case:

Error
java.io.IOException: Merged heap dump is incomplete
at com.sun.management.internal.HotSpotDiagnostic.dumpHeap0(Native Method)
at com.sun.management.internal.HotSpotDiagnostic.dumpHeap(HotSpotDiagnostic.java:70)
at jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
at java.lang.reflect.Method.invoke(Method.java:580)
at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:64)
at jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
at java.lang.reflect.Method.invoke(Method.java:580)
at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:97)
at com.sun.jmx.mbeanserver.ConvertingMethod.invokeWithOpenReturn(ConvertingMethod.java:193)
at com.sun.jmx.mbeanserver.ConvertingMethod.invokeWithOpenReturn(ConvertingMethod.java:175)
at com.sun.jmx.mbeanserver.MXBeanIntrospector.invokeM2(MXBeanIntrospector.java:115)
at com.sun.jmx.mbeanserver.MXBeanIntrospector.invokeM2(MXBeanIntrospector.java:52)
at com.sun.jmx.mbeanserver.MBeanIntrospector.invokeM(MBeanIntrospector.java:236)
at com.sun.jmx.mbeanserver.PerInterface.invoke(PerInterface.java:138)
at com.sun.jmx.mbeanserver.MBeanSupport.invoke(MBeanSupport.java:252)
at javax.management.StandardMBean.invoke(StandardMBean.java:405)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:803)
at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:802)
at com.sun.jmx.mbeanserver.MXBeanProxy$InvokeHandler.invoke(MXBeanProxy.java:150)
at com.sun.jmx.mbeanserver.MXBeanProxy.invoke(MXBeanProxy.java:167)
at javax.management.MBeanServerInvocationHandler.invoke(MBeanServerInvocationHandler.java:258)
at jdk.proxy1.$Proxy19.dumpHeap(Unknown Source)
at io.xpipe.app.prefs.TroubleshootCategory.heapDump(TroubleshootCategory.java:173)
at io.xpipe.app.prefs.TroubleshootCategory.lambda$create$11(TroubleshootCategory.java:158)
at io.xpipe.app.comp.base.TileButtonComp.lambda$createBase$0(TileButtonComp.java:63)
at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:86)
at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:232)
at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:189)
at com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59)
at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)
at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:49)
at javafx.event.Event.fireEvent(Event.java:199)
at javafx.scene.Node.fireEvent(Node.java:8963)
at javafx.scene.control.Button.fire(Button.java:203)
at com.sun.javafx.scene.control.behavior.ButtonBehavior.mouseReleased(ButtonBehavior.java:207)
at com.sun.javafx.scene.control.inputmap.InputMap.handle(InputMap.java:274)
at com.sun.javafx.event.CompositeEventHandler$NormalEventHandlerRecord.handleBubblingEvent(CompositeEventHandler.java:247)
at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:80)
at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:232)
at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:189)
at com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59)
at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)
at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:54)
at javafx.event.Event.fireEvent(Event.java:199)
at javafx.scene.Scene$MouseHandler.process(Scene.java:3987)
at javafx.scene.Scene.processMouseEvent(Scene.java:1893)
at javafx.scene.Scene$ScenePeerListener.mouseEvent(Scene.java:2711)
at com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:411)
at com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:301)
at java.security.AccessController.doPrivileged(AccessController.java:400)
at com.sun.javafx.tk.quantum.GlassViewEventHandler.lambda$handleMouseEvent$2(GlassViewEventHandler.java:450)
at com.sun.javafx.tk.quantum.QuantumToolkit.runWithoutRenderLock(QuantumToolkit.java:430)
at com.sun.javafx.tk.quantum.GlassViewEventHandler.handleMouseEvent(GlassViewEventHandler.java:449)
at com.sun.glass.ui.View.handleMouseEvent(View.java:560)
at com.sun.glass.ui.View.notifyMouse(View.java:946)
at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:184)
at java.lang.Thread.run(Thread.java:1570)

I sent in the report w log files attached in case that somehow helps...

Sure, I'll try again with a 2nd instance tomorrow as soon as I have time.

EDIT: I just tried again and watch the process manager. Plenty of memory left. This laptop only has 16gb, but it never got about 60%. Also plenty of HDD.

@crschnick
Copy link
Member

Thanks for the log, I see the slowdowns in the timestamps, but not the cause.

Do you have an AntiVirus that might interfere or slow down XPipe? I think that has happened in the past with something like malwarebytes pro

About the heap dump failing, that is very odd. Searching for that error message literally does not bring up any hits apart from the JDK source code. So that is an incredibly rare error. How large is the heap dump file that is generated on the desktop?

@crschnick
Copy link
Member

You can also try to go to Settings -> Troubleshoot -> Launch in debug mode and share the debug log privately. That should contain much more log information, maybe showing the exact point where the slowdown occurs

@unleashit
Copy link
Author

Ok, so I dug a bit more and figured out from starting with a fresh install that my RAM usage really ramps up as soon as I add nested connections. A fresh install of the WIndows portable version and after auto discovery of connections uses about 800mb. After removing the automatically found ssh config and re adding under Powershell (the connections didn't work when under the top level parent CMD for some reason), it was around 1gb. Next I ran the auto discovery on a couple of servers that have docker, and it went straight up to 2gb.

I was able to get a memory dump out of the new install but it's about 1.3 gigs. If it would help to send it, let me know your preferred way to receive big files.

From the original install, I submitted a report with the debug logs (also sent a probably unrelated error).

Hope that helps!

@unleashit
Copy link
Author

Forgot to mention that I did have Malwarebytes installed (no realtime and not pro), but I uninstalled it anyway just in case. I also disabled Windows Defender for a bit (the only other antivirus I use), and nothing changed.

@crschnick
Copy link
Member

crschnick commented Mar 15, 2025

You can try https://wetransfer.com/

About the debug logs, it doesn't attach them in debug as they are only printed to the terminal in that session. So you would have to copy paste the terminal contents into a file and send that as well.

The sent error message is unrelated, that is just about having an old LXD version, either on some server or WSL distribution.

@crschnick
Copy link
Member

Looking at it a bit more, I think the slowdown and memory usage are two different things.

I think it's more important to first figure out what it is doing in these large gaps in the log. So sending the debug terminal output would be more important for now

@unleashit
Copy link
Author

Already sent the full debug log yesterday (inline). Its late over here but tomorrow I'll send again and also the memory dump (but don't I need your account ID to send it to?)

@crschnick
Copy link
Member

You can't send the debug log inline via the issue reporter. If you launch XPipe in debug mode, it should only print to the terminal. That is not logged to a file. You would have to copy the terminal output and send it to me for example via email at [email protected]

The same should also work with wetransfer, you can send me the link to the email

@unleashit
Copy link
Author

unleashit commented Mar 15, 2025

You can't send the debug log inline via the issue reporter. If you launch XPipe in debug mode, it should only print to the terminal. That is not logged to a file. You would have to copy the terminal output

I did paste the terminal output into the body of the issue reporter, but I guess you didn't (or can't) receive it. Now that I have your email, it's been sent... and the wetransfer is currently underway! Let me know if you have any problems or need anything more.

@crschnick
Copy link
Member

Thanks, I received it now.

I fixed the issue with the issue report text being too large, you can now paste I betray contents in it without it being dropped.

I looked at the debug logs, but there is still like a 15s gap where nothing is happening, so there is something wrong. It starts up within like 2s, but then idles for 15s. So in the latest build at https://github.com/xpipe-io/xpipe-ptb, I added more debug logging to trace that a little bit more. So you can try launching that version and sending a report again, this time in the integrated issue reporter as that should work now.

I also looked at the heap dump, but there isn't anything that I can identify from there. I think focusing on the log to first figure out where it's spending its time is the way to go

@unleashit
Copy link
Author

Just submitted with the new build. Seems like drawing the UI on my system for whatever reason causes problems. Not sure if there's network stuff also going on that isn't being debugged.

@crschnick
Copy link
Member

Thanks, so that narrows down where it is taking so long. For a little bit more context:

  • How many connections did you add in the PTB build?
  • Is this a slow or fast system? Does it have a dedicated graphics card?

@crschnick
Copy link
Member

I also published another PTB build with more logging in the area that I identified a slow

@unleashit
Copy link
Author

I also published another PTB build with more logging in the area that I identified a slow

Installed and submitted!

How many connections did you add in the PTB build?

Total connections are 68. BTW, I'm extracting the zip version of the PTB into its own folder, which does still link to the config of the original install (so not totally isolated).

As I described earlier in the thread (and the screenshot is still the same), those connections are a) from the wizard during initial install (more than half of the total), and b) After the wizard, I just added the SSH config of the Windows user under the Powershell shell environment. Finally I clickeded the "Find available connections..." buttons on two of those servers that each have about 6-10 docker containers running. THAT is where the memory usage went from 1gb to 3+gb.

Is this a slow or fast system? Does it have a dedicated graphics card?

Medium... it's about 6 years old, but still running fine for most things. 16gb ram, 4 core i7 with a dedicated Nvidia gpu, although it probably isn't using it for your app since the driver on these machines tends to default to onboard unless told otherwise (usually by games, or manually by the user...). In any case, I'm not used to having problems with it, thus haven't upgraded yet.

Basically if you think my system is a weird edge case and it doesn't bother you much, I would say thank you for the trouble but it's probably not worth the extra effort at this point. Happy to still try and help if you want to continue, but I don't think I'm going to be able to use this app unless/until it gets a lot faster and smoother. Even just a basic SSH session to a server takes at least 10x longer than it would otherwise.

@crschnick
Copy link
Member

crschnick commented Mar 16, 2025

So I will only be able to look at this in detail tomorrow.

To switch things up, I see in the logs that you have an Ubuntu WSL system available. To compare, can you try to install and launch xpipe in that? Just following the normal .deb setup instructions should work as the WSL2 graphics are supported.

Once it is installed in WSL, you can run xpipe open or xpipe-ptb open in WSL to launch it

@crschnick
Copy link
Member

So I looked at this in more detail now, and the only scenario I can see how it can reach such a high memory usage is that if the garbage collector does not find any time to clear it. It will then grow and grow, that should also slow down the application.

I reworked the garbage collection configuration in the latest build at https://github.com/xpipe-io/xpipe-ptb, hopefully that one will show an improvement for you

@crschnick
Copy link
Member

The garbage collector adjustments already made it into the latest v15.6 release. I think I still need to spend some time on that for the next release though.

Perhaps this also influences the startup time, because I don't see a definitive cause there

@crschnick
Copy link
Member

Found a potential memory leak after experimenting with various different setups, I will look into that now

@unleashit
Copy link
Author

Cool, I'll give it a try when you're ready. Nothing changed based on the latest PTB by the way. In case it's another worthwhile data point... I just tried adding a local port forward (just one) from one of the remote ssh connections. That caused RAM usage to jump from 3gb to over 4. When I removed the connection, the memory didn't release until I quit the app.

To switch things up, I see in the logs that you have an Ubuntu WSL system available. To compare, can you try to install and launch xpipe in that?

I still plan on trying this when I have time, but I wouldn't personally want to run it on WSL for actual use since it's slower and for other reasons of my workflow.

@crschnick
Copy link
Member

So I think I figured out the issue, at least partially. I implemented a first fix at the latest https://github.com/xpipe-io/xpipe-ptb build. More fixes will follow for the memory league

@crschnick
Copy link
Member

The main cause should now be fixed in the latest release.

I will work on fixing the smaller memory issues as well

@unleashit
Copy link
Author

Great work, the latest changes were a big improvement! It's now a little under 800mb, with a bunch of connections and a couple of local port forwards. Only thing is now GPU is spiking. Even after just starting the app and idling, it's around 75% (before it was nothing).

@unleashit
Copy link
Author

Just updated the stable version, and it seems to have the memory leak fixes incorporated but with no GPU issue. I guess there's something you're doing with the test version that affects GPU. I do notice that GPU sometimes does spike a bit (not sure why an app like this would need GPU in the first place, but I'm not familiar with Java UIs), but only temporarily.

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

No branches or pull requests

2 participants