ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Tue, 04 Aug 2020 13:52:07 +0200Mouse Lag after a whilehttps://ask.sagemath.org/question/52707/mouse-lag-after-a-while/Hi
Ubuntu 18.04.4 LTS , FireFox 78.0.2 , SageMath Jupyter notebook 9.1
When I use my pc with SageMath, after a while I observe a high response time with my mouse. I then look at what is happening with the system monitor, and I see that the memory is occupied at around 90% and that the swap memory is occupied at around 35%. If I quit Sagemath (I meant that I kill the terminal window in which I launched SageMat without & I precise) and I close all Firefox windows, then the memory occupation goes down to around 60% and the swap memory goes down to around 25%. But when I look with HTOP, I notice that it is still running several Sagemath processes. I'll give it a try with Chrome, to see if it's browser independent. The problem is not specific to a certain SageMath code, I notice it with different SageMath codes.
![image description](/upfiles/15958290046535282.jpg)Mon, 27 Jul 2020 07:52:57 +0200https://ask.sagemath.org/question/52707/mouse-lag-after-a-while/Comment by ortollj for <p>Hi</p>
<p>Ubuntu 18.04.4 LTS , FireFox 78.0.2 , SageMath Jupyter notebook 9.1</p>
<p>When I use my pc with SageMath, after a while I observe a high response time with my mouse. I then look at what is happening with the system monitor, and I see that the memory is occupied at around 90% and that the swap memory is occupied at around 35%. If I quit Sagemath (I meant that I kill the terminal window in which I launched SageMat without & I precise) and I close all Firefox windows, then the memory occupation goes down to around 60% and the swap memory goes down to around 25%. But when I look with HTOP, I notice that it is still running several Sagemath processes. I'll give it a try with Chrome, to see if it's browser independent. The problem is not specific to a certain SageMath code, I notice it with different SageMath codes.
<img alt="image description" src="/upfiles/15958290046535282.jpg"></p>
https://ask.sagemath.org/question/52707/mouse-lag-after-a-while/?comment=52710#post-id-52710I will expand this post with different tests and details later. I don't have time today.Mon, 27 Jul 2020 08:50:22 +0200https://ask.sagemath.org/question/52707/mouse-lag-after-a-while/?comment=52710#post-id-52710Answer by slelievre for <p>Hi</p>
<p>Ubuntu 18.04.4 LTS , FireFox 78.0.2 , SageMath Jupyter notebook 9.1</p>
<p>When I use my pc with SageMath, after a while I observe a high response time with my mouse. I then look at what is happening with the system monitor, and I see that the memory is occupied at around 90% and that the swap memory is occupied at around 35%. If I quit Sagemath (I meant that I kill the terminal window in which I launched SageMat without & I precise) and I close all Firefox windows, then the memory occupation goes down to around 60% and the swap memory goes down to around 25%. But when I look with HTOP, I notice that it is still running several Sagemath processes. I'll give it a try with Chrome, to see if it's browser independent. The problem is not specific to a certain SageMath code, I notice it with different SageMath codes.
<img alt="image description" src="/upfiles/15958290046535282.jpg"></p>
https://ask.sagemath.org/question/52707/mouse-lag-after-a-while/?answer=52721#post-id-52721Things to be aware of when using Jupyter notebooks:
- a new Sage session gets launched for each Jupyter worksheet you open
- closing the worksheet's browser tab does not terminate the corresponding session
(reopen a worksheet and you can resume computing without having to run all cells again)
The good practice is to make sure to "Close and halt" each worksheet when done with it,
as that will terminate the corresponding Sage session.
If you are using JupyterLab, the interface lets you more easily
- spot which Jupyter workhseets still have an active kernel (ie associated Sage session).
- stop those kernels one by one
- or "stop all kernels"
To install JupyterLab if you haven't yet:
- if you installed Sage with a package manager, use that package manager to install JupyterLab too
- if you built Sage from source or installed binaries from the Sage download page,
open a Sage session and type
sage: !pip install jupyterlab
Then to use Sage in JupyterLab, run one of the following two commands in a terminal:
$ sage --jupyter lab
$ sage -n jupyterlab
Or if your system-wide Jupyter installation has Sage, this should work too
$ jupyter labTue, 28 Jul 2020 12:40:57 +0200https://ask.sagemath.org/question/52707/mouse-lag-after-a-while/?answer=52721#post-id-52721Comment by ortollj for <p>Things to be aware of when using Jupyter notebooks:</p>
<ul>
<li>a new Sage session gets launched for each Jupyter worksheet you open</li>
<li>closing the worksheet's browser tab does not terminate the corresponding session
(reopen a worksheet and you can resume computing without having to run all cells again)</li>
</ul>
<p>The good practice is to make sure to "Close and halt" each worksheet when done with it,
as that will terminate the corresponding Sage session.</p>
<p>If you are using JupyterLab, the interface lets you more easily</p>
<ul>
<li>spot which Jupyter workhseets still have an active kernel (ie associated Sage session).</li>
<li>stop those kernels one by one</li>
<li>or "stop all kernels"</li>
</ul>
<p>To install JupyterLab if you haven't yet:</p>
<ul>
<li>if you installed Sage with a package manager, use that package manager to install JupyterLab too</li>
<li><p>if you built Sage from source or installed binaries from the Sage download page,
open a Sage session and type</p>
<pre><code> sage: !pip install jupyterlab
</code></pre></li>
</ul>
<p>Then to use Sage in JupyterLab, run one of the following two commands in a terminal:</p>
<pre><code>$ sage --jupyter lab
$ sage -n jupyterlab
</code></pre>
<p>Or if your system-wide Jupyter installation has Sage, this should work too</p>
<pre><code>$ jupyter lab
</code></pre>
https://ask.sagemath.org/question/52707/mouse-lag-after-a-while/?comment=52856#post-id-52856it s possible to free the memory tacken and supress lag with
pkill -f "firefox"
pkill -f "python3"
and then restart sageMathTue, 04 Aug 2020 13:52:07 +0200https://ask.sagemath.org/question/52707/mouse-lag-after-a-while/?comment=52856#post-id-52856Comment by ortollj for <p>Things to be aware of when using Jupyter notebooks:</p>
<ul>
<li>a new Sage session gets launched for each Jupyter worksheet you open</li>
<li>closing the worksheet's browser tab does not terminate the corresponding session
(reopen a worksheet and you can resume computing without having to run all cells again)</li>
</ul>
<p>The good practice is to make sure to "Close and halt" each worksheet when done with it,
as that will terminate the corresponding Sage session.</p>
<p>If you are using JupyterLab, the interface lets you more easily</p>
<ul>
<li>spot which Jupyter workhseets still have an active kernel (ie associated Sage session).</li>
<li>stop those kernels one by one</li>
<li>or "stop all kernels"</li>
</ul>
<p>To install JupyterLab if you haven't yet:</p>
<ul>
<li>if you installed Sage with a package manager, use that package manager to install JupyterLab too</li>
<li><p>if you built Sage from source or installed binaries from the Sage download page,
open a Sage session and type</p>
<pre><code> sage: !pip install jupyterlab
</code></pre></li>
</ul>
<p>Then to use Sage in JupyterLab, run one of the following two commands in a terminal:</p>
<pre><code>$ sage --jupyter lab
$ sage -n jupyterlab
</code></pre>
<p>Or if your system-wide Jupyter installation has Sage, this should work too</p>
<pre><code>$ jupyter lab
</code></pre>
https://ask.sagemath.org/question/52707/mouse-lag-after-a-while/?comment=52732#post-id-52732Thank @slelievre, for all these operational details .
Thank you for this advice to install Jupyter lab, I like this new interfaceWed, 29 Jul 2020 06:39:52 +0200https://ask.sagemath.org/question/52707/mouse-lag-after-a-while/?comment=52732#post-id-52732Comment by slelievre for <p>Things to be aware of when using Jupyter notebooks:</p>
<ul>
<li>a new Sage session gets launched for each Jupyter worksheet you open</li>
<li>closing the worksheet's browser tab does not terminate the corresponding session
(reopen a worksheet and you can resume computing without having to run all cells again)</li>
</ul>
<p>The good practice is to make sure to "Close and halt" each worksheet when done with it,
as that will terminate the corresponding Sage session.</p>
<p>If you are using JupyterLab, the interface lets you more easily</p>
<ul>
<li>spot which Jupyter workhseets still have an active kernel (ie associated Sage session).</li>
<li>stop those kernels one by one</li>
<li>or "stop all kernels"</li>
</ul>
<p>To install JupyterLab if you haven't yet:</p>
<ul>
<li>if you installed Sage with a package manager, use that package manager to install JupyterLab too</li>
<li><p>if you built Sage from source or installed binaries from the Sage download page,
open a Sage session and type</p>
<pre><code> sage: !pip install jupyterlab
</code></pre></li>
</ul>
<p>Then to use Sage in JupyterLab, run one of the following two commands in a terminal:</p>
<pre><code>$ sage --jupyter lab
$ sage -n jupyterlab
</code></pre>
<p>Or if your system-wide Jupyter installation has Sage, this should work too</p>
<pre><code>$ jupyter lab
</code></pre>
https://ask.sagemath.org/question/52707/mouse-lag-after-a-while/?comment=52738#post-id-52738@Cyrille - If you're running the command with `!` from inside Sage, `pip` should work in all cases.Wed, 29 Jul 2020 13:50:25 +0200https://ask.sagemath.org/question/52707/mouse-lag-after-a-while/?comment=52738#post-id-52738Comment by ortollj for <p>Things to be aware of when using Jupyter notebooks:</p>
<ul>
<li>a new Sage session gets launched for each Jupyter worksheet you open</li>
<li>closing the worksheet's browser tab does not terminate the corresponding session
(reopen a worksheet and you can resume computing without having to run all cells again)</li>
</ul>
<p>The good practice is to make sure to "Close and halt" each worksheet when done with it,
as that will terminate the corresponding Sage session.</p>
<p>If you are using JupyterLab, the interface lets you more easily</p>
<ul>
<li>spot which Jupyter workhseets still have an active kernel (ie associated Sage session).</li>
<li>stop those kernels one by one</li>
<li>or "stop all kernels"</li>
</ul>
<p>To install JupyterLab if you haven't yet:</p>
<ul>
<li>if you installed Sage with a package manager, use that package manager to install JupyterLab too</li>
<li><p>if you built Sage from source or installed binaries from the Sage download page,
open a Sage session and type</p>
<pre><code> sage: !pip install jupyterlab
</code></pre></li>
</ul>
<p>Then to use Sage in JupyterLab, run one of the following two commands in a terminal:</p>
<pre><code>$ sage --jupyter lab
$ sage -n jupyterlab
</code></pre>
<p>Or if your system-wide Jupyter installation has Sage, this should work too</p>
<pre><code>$ jupyter lab
</code></pre>
https://ask.sagemath.org/question/52707/mouse-lag-after-a-while/?comment=52733#post-id-52733but interact seems not to work in Jupyter Lab ;-( . moreover when I try to upvote the post:[Interact in Jupyterlab vs Jupyter](https://ask.sagemath.org/question/50194/interact-in-jupyterlab-vs-jupyter/)
I got the mesage : **sorry but older vote can't be revoked**
[edited] Oops maybe that's because I already upvoted this post ? but I don't remember doing that !
O anger! O despair! O age my enemy!, Have I lived simply to know this infamy! ;-)Wed, 29 Jul 2020 07:24:05 +0200https://ask.sagemath.org/question/52707/mouse-lag-after-a-while/?comment=52733#post-id-52733Comment by Cyrille for <p>Things to be aware of when using Jupyter notebooks:</p>
<ul>
<li>a new Sage session gets launched for each Jupyter worksheet you open</li>
<li>closing the worksheet's browser tab does not terminate the corresponding session
(reopen a worksheet and you can resume computing without having to run all cells again)</li>
</ul>
<p>The good practice is to make sure to "Close and halt" each worksheet when done with it,
as that will terminate the corresponding Sage session.</p>
<p>If you are using JupyterLab, the interface lets you more easily</p>
<ul>
<li>spot which Jupyter workhseets still have an active kernel (ie associated Sage session).</li>
<li>stop those kernels one by one</li>
<li>or "stop all kernels"</li>
</ul>
<p>To install JupyterLab if you haven't yet:</p>
<ul>
<li>if you installed Sage with a package manager, use that package manager to install JupyterLab too</li>
<li><p>if you built Sage from source or installed binaries from the Sage download page,
open a Sage session and type</p>
<pre><code> sage: !pip install jupyterlab
</code></pre></li>
</ul>
<p>Then to use Sage in JupyterLab, run one of the following two commands in a terminal:</p>
<pre><code>$ sage --jupyter lab
$ sage -n jupyterlab
</code></pre>
<p>Or if your system-wide Jupyter installation has Sage, this should work too</p>
<pre><code>$ jupyter lab
</code></pre>
https://ask.sagemath.org/question/52707/mouse-lag-after-a-while/?comment=52734#post-id-52734Perhaps upgrade this post by moving from pip to pip3, since pip is not anymore in the distributionWed, 29 Jul 2020 09:58:44 +0200https://ask.sagemath.org/question/52707/mouse-lag-after-a-while/?comment=52734#post-id-52734Comment by slelievre for <p>Things to be aware of when using Jupyter notebooks:</p>
<ul>
<li>a new Sage session gets launched for each Jupyter worksheet you open</li>
<li>closing the worksheet's browser tab does not terminate the corresponding session
(reopen a worksheet and you can resume computing without having to run all cells again)</li>
</ul>
<p>The good practice is to make sure to "Close and halt" each worksheet when done with it,
as that will terminate the corresponding Sage session.</p>
<p>If you are using JupyterLab, the interface lets you more easily</p>
<ul>
<li>spot which Jupyter workhseets still have an active kernel (ie associated Sage session).</li>
<li>stop those kernels one by one</li>
<li>or "stop all kernels"</li>
</ul>
<p>To install JupyterLab if you haven't yet:</p>
<ul>
<li>if you installed Sage with a package manager, use that package manager to install JupyterLab too</li>
<li><p>if you built Sage from source or installed binaries from the Sage download page,
open a Sage session and type</p>
<pre><code> sage: !pip install jupyterlab
</code></pre></li>
</ul>
<p>Then to use Sage in JupyterLab, run one of the following two commands in a terminal:</p>
<pre><code>$ sage --jupyter lab
$ sage -n jupyterlab
</code></pre>
<p>Or if your system-wide Jupyter installation has Sage, this should work too</p>
<pre><code>$ jupyter lab
</code></pre>
https://ask.sagemath.org/question/52707/mouse-lag-after-a-while/?comment=52741#post-id-52741@ortolij -
> but interact seems not to work in Jupyter Lab ;-( . moreover
> when I try to upvote the post: [Interact in Jupyterlab vs Jupyter](https://ask.sagemath.org/question/50194)
> I got the mesage : sorry but older vote can't be revoked
> [edited] Oops maybe that's because I already upvoted this post ?
> but I don't remember doing that !
If it says "older vote can't be revoked" when you try to upvote,
it means you either upvoted or downvoted that post in the past
(within a short time after upvoting, clicking "upvote" again cancels the upvote).Wed, 29 Jul 2020 14:15:53 +0200https://ask.sagemath.org/question/52707/mouse-lag-after-a-while/?comment=52741#post-id-52741