Hi

Does the memory use change if you apply this and rebuild:


diff --git a/grid.c b/grid.c
index 1cd01cbd..34716992 100644
--- a/grid.c
+++ b/grid.c
@@ -18,6 +18,7 @@
 
 #include <sys/types.h>
 
+#include <malloc.h>
 #include <stdlib.h>
 #include <string.h>
 
@@ -240,6 +241,7 @@ grid_destroy(struct grid *gd)
        free(gd->linedata);
 
        free(gd);
+       malloc_trim(0);
 }
 
 /* Compare grids. */





On Fri, Dec 08, 2017 at 05:41:57PM +1100, Philip Rhoades wrote:
> Nicholas,
> 
> 
> On 2017-11-17 13:33, Philip Rhoades wrote:
> > Nicholas,
> > 
> > On 2017-11-17 08:00, Nicholas Marriott wrote:
> > > This is a lot of memory but not excessive for Linux.
> > > 
> > > Does the delay gradually increase over time, or is it suddenly slow?
> > 
> > 
> > As the Subject says . .
> > 
> > 
> > > Also please upgrade to 2.6 and see if you can still reproduce.
> > 
> > 
> > There is no RPM for 2.6 so I have uninstalled the 2.5 RPM and used the
> > tmux source to install 2.6 - I will let you know how that goes.
> > 
> > I tried commenting out the plugin stuff but then I can't restore
> > exactly the same environment quickly . .
> 
> 
> Version 2.6 might be a little better but the problem persists - the problem
> is even worse on my old server - which I connect to via ssh - and doesn't
> even have X running.  In that situation killing the tmux server does not
> help much - as soon as I restore the tmux environment (14 tabs for root),
> the problem returns almost immediately:
> 
> top - 17:25:50 up 7 days, 13:37,  3 users,  load average: 1.50, 1.49, 1.47
> Tasks:   2 total,   0 running,   2 sleeping,   0 stopped,   0 zombie
> %Cpu0  :  0.9 us, 33.8 sy,  0.2 ni, 63.5 id,  1.4 wa,  0.0 hi,  0.1 si,  0.0
> st
> %Cpu1  :  0.8 us, 19.2 sy,  0.2 ni, 76.7 id,  2.6 wa,  0.0 hi,  0.5 si,  0.0
> st
> %Cpu2  :  0.9 us, 33.2 sy,  0.6 ni, 63.5 id,  1.6 wa,  0.0 hi,  0.1 si,  0.0
> st
> %Cpu3  :  0.9 us, 21.7 sy,  0.5 ni, 74.5 id,  2.0 wa,  0.0 hi,  0.4 si,  0.0
> st
> KiB Mem :  8069196 total,  2905548 free,  2559260 used,  2604388 buff/cache
> KiB Swap:  4194300 total,  2910484 free,  1283816 used.  4942156 avail Mem
> 
>   PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND
>  1840 root      20   0 1884804 1.672g   2800 S   0.0 21.7   4969:05 tmux:
> server
> 31765 phil      20   0  131888   7744   2872 S   0.0  0.1   0:50.31 tmux:
> server
> 
>   PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND
>  1840 root      20   0 1884804 1.672g   2800 R  74.4 21.7   4969:07 tmux:
> server
> 31765 phil      20   0  131888   7748   2872 S   1.0  0.1   0:50.34 tmux:
> server
> 
>   PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND
>  1840 root      20   0 1884804 1.672g   2800 S  59.7 21.7   4969:09 tmux:
> server
> 31765 phil      20   0  131888   7748   2872 S   0.7  0.1   0:50.36 tmux:
> server
> 
>   PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND
>  1840 root      20   0 1884804 1.672g   2800 R  49.7 21.7   4969:10 tmux:
> server
> 31765 phil      20   0  131888   7748   2872 S   1.3  0.1   0:50.40 tmux:
> server
> 
>   PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND
>  1840 root      20   0 1884804 1.672g   2800 R  69.8 21.7   4969:12 tmux:
> server
> 31765 phil      20   0  131888   7748   2872 S   1.0  0.1   0:50.43 tmux:
> server
> 
>   PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND
>  1840 root      20   0 1884804 1.672g   2800 R  69.7 21.7   4969:15 tmux:
> server
> 31765 phil      20   0  131888   7752   2872 S   0.7  0.1   0:50.45 tmux:
> server
> 
>   PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND
>  1840 root      20   0 1884804 1.672g   2800 S  47.7 21.7   4969:16 tmux:
> server
> 31765 phil      20   0  131888   7752   2872 S   0.7  0.1   0:50.47 tmux:
> server
> 
>   PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND
>  1840 root      20   0 1884804 1.672g   2800 R  61.5 21.7   4969:18 tmux:
> server
> 31765 phil      20   0  132008   7756   2872 S   1.0  0.1   0:50.50 tmux:
> server
> 
>   PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND
>  1840 root      20   0 1884804 1.672g   2800 R  70.0 21.7   4969:20 tmux:
> server
> 31765 phil      20   0  132008   7756   2872 S   0.7  0.1   0:50.52 tmux:
> server
> 
> top - 17:26:17 up 7 days, 13:37,  3 users,  load average: 1.70, 1.53, 1.49
> Tasks:   2 total,   0 running,   2 sleeping,   0 stopped,   0 zombie
> %Cpu0  :  0.7 us, 28.9 sy,  0.0 ni, 70.1 id,  0.0 wa,  0.0 hi,  0.3 si,  0.0
> st
> %Cpu1  :  0.7 us, 33.2 sy,  0.0 ni, 65.8 id,  0.0 wa,  0.0 hi,  0.3 si,  0.0
> st
> %Cpu2  :  0.7 us, 57.7 sy,  0.0 ni, 41.7 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0
> st
> %Cpu3  :  0.7 us, 12.0 sy,  0.0 ni, 87.0 id,  0.0 wa,  0.0 hi,  0.3 si,  0.0
> st
> KiB Mem :  8069196 total,  2904780 free,  2559600 used,  2604816 buff/cache
> KiB Swap:  4194300 total,  2910484 free,  1283816 used.  4941660 avail Mem
> 
>   PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND
>  1840 root      20   0 1884928 1.672g   2800 S  57.7 21.7   4969:22 tmux:
> server
> 31765 phil      20   0  132008   7756   2872 S   1.0  0.1   0:50.55 tmux:
> server
> 
> 
> P.
> -- 
> Philip Rhoades
> 
> PO Box 896
> Cowra  NSW  2794
> Australia
> E-mail:  [email protected]

-- 
You received this message because you are subscribed to the Google Groups 
"tmux-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to