Sublime Forum

Sublime runs very slow when GPU-Util is 100%

#1

I’m performing some deep learning experiments by Titan X GPU. When GPU reaches 100% util, sublime will run very slowly, while other text editors don’t suffer from this. How do I solve this problem?

1 Like

UI lag under high GPU load
#2

I have never hit the GPU cap before with sublime that pretty funny. You have to understand that you are taxing your machine to max and are probably rendering everything slowly… But if you have extra CPU cycles to spare some how, you can disable your GPU driver through Device Manager launch Sublime(it should be using CPU emulation now assuming you are running windows) then re-enable your GPU driver and launch what ever else you are using to max your titan out. Just open sublime first. Otherwise i think you are screwed I don’t think Sublime has a built in option to use CPU only rendering.

0 Likes

#3

Thank you for your reply. I’m using ubuntu 14.04. i7 4790k CPU util is about 15% (only one core is full load) and GPU util is 99%. So there are enough CPU cycles to support the operating system. Unfortunately, only sublime runs slowly. Other applications including editors work fine.

1 Like

#4

I’m no expert in this area since I am new to the codebase, by my understanding is that Sublime Text uses the GPU buffer for compositing the editor pane during rendering. Thus, if you GPU is overloaded, it is probably getting responses from the GPU slowly enough that it affects rendering.

1 Like

#5

I’m also using GPU for computational expensive deep learning application and when doing that ST3 becomes quite slow in rendering that I just can’t use it to edit my codes.

Have you solved this problem?

1 Like

#6

Me too – whenever I’m training a model, sublime stops working properly (speed-wise) and I switch to atom :frowning:

0 Likes

#7

Sublime uses the GPU for rendering. This is, presumably, one of the reasons that it’s generally faster than Atom. However, if you max out your GPU, then any program that uses the GPU will be bottlenecked. I’m surprised that your window manager is not affected; I thought that all of the mainstream ones composited on the GPU. I would suggest that if you want to use your computer interactively while running a GPU-saturating task, you might want to cap that task’s utilization (say, at 95%) to give other programs a chance. If there’s an equivalent to renice for GPUs, that might be a good idea as well.

0 Likes

#8

I guess Microsoft somehow makes it run with highest priority at any time to ensure good user experience at any time. Not sure how Chromium does handle it as most web engines tend to use GPU for rendering as well.

0 Likes

#9

Our architecture is slightly different than Chrome, in that when we use OpenGL on Mac (that is the only platform we use it on), the GPU is used to upload fully-composited textures to, and then we move then around as your scroll. It is possible that directly compositing the interface via OpenGL may not be impacted the same way if you are taxing your GPU.

On Windows and Linux we do not use OpenGL, so if you are experiencing issues on those platforms, it must be that the GPU is giving CPU-based draw commands lower priority, or something along those lines.

0 Likes

#10

Thanks for your explanation. My solution is using two GPU cards. One is for computation, the other is for display. But this solution is expensive and requires the mainboard to support 2 PCI-E 3.0 X16 at least. Is it possible to add a switchable mode between CPU and GPU in sublime?

0 Likes

#11

Yes, in the settings you will see a setting named "gpu_window_buffer". Set that to false to not use OpenGL on Mac.

0 Likes

#12

If mac is the only platform OpenGL is used on, why not use Metal instead?

0 Likes

#13

Why drop OS X 10.7 to 10.10 (and Macs from before 2012) and learn a new API when you can keep using the same one?

0 Likes

#14

Just wondering if there were any performance benefits in using a platform specific API is all.

0 Likes

#15

There are almost certainly performance benefits, but it seems unlikely that they will be user-visible in a significant way.

0 Likes

#16

Thanks~! This is very helpful. I also have a ubuntu server. Is there any way of switching to CPU mode on ubuntu?

0 Likes

#17

Sublime Text only has a CPU mode on Linux. There is no GPU mode.

0 Likes