Re: slow machine, swap in use, but more than 5GB of RAM inactive

2017-03-07 Thread Erich Dollansky
Hi,

On Tue, 7 Mar 2017 16:46:21 -0800
Kevin Oberman  wrote:

> On Tue, Mar 7, 2017 at 3:14 PM, Erich Dollansky
>  > wrote:  
> 
> > On Tue, 7 Mar 2017 23:30:58 +1100 (EST)
> > Ian Smith  wrote:
> >  
> > > On Tue, 7 Mar 2017 10:19:35 +0800, Erich Dollansky wrote:  
> > >  >
> > >  > I wonder about the slow speed of my machine while top shows
> > >  > ample inactive memory:  
> > >
> > > ( quoting from this top output because it's neater :)
> > >  
> > >  > last pid: 85287;  load averages:  2.56,  2.44, 1.68
> > >  > up 6+10:24:45 10:13:36 191 processes: 5 running, 186 sleeping
> > >  > CPU 0: 47.1% user,  0.0% nice, 51.4% system, 0.0% interrupt,
> > >  > 1.6% idle CPU 1: 38.4% user,  0.0% nice, 60.4% system,  0.0%
> > >  > interrupt, 1.2% idle CPU 2: 38.8% user,  0.0% nice, 59.2%
> > >  > system,  0.0% interrupt, 2.0% idle CPU 3: 45.5% user,  0.0%
> > >  > nice, 51.0% system, 0.4% interrupt, 3.1% idle Mem: 677M
> > >  > Active, 5600M Inact, 1083M Wired, 178M Cache, 816M Buf,301M
> > >  > Free Swap: 16G Total, 1352M Used, 15G Free, 8% Inuse  
> > >
> > > Others have covered the swap / inactive memory issue.
> > >
> > > But I'd expect this to be slow, for any new work anyway .. there's
> > > next to no idle on any CPU.  I'd be asking, what's all of that
> > > system usage?
> > >  
> > this is building ports in the background. Still, used doing this
> > ones a month, I know the feeling when the ports are updated. This
> > one was really slow. Hopefully, it was just an unlucky coincidence.
> >
> > I rebooted meanwhile the machine. It is faster now, I would say, it
> > is back to normal now. It did not come to its limits since the new
> > start. It is now on:
> >
> > FreeBSD 10.3-STABLE #3 r314363
> >
> > Erich
> >  
> 
> Well, looks like over half of the CPU is running in system space and
> that seems rather high for what I would assume is compilation. I
> thinnk you will need to  poke around with things like systat, and the
> like to see just what the system is doing for 55% or so of all CPUs.
> Since there doe snot seem to be a lot of IO or memory at issue, the
> various command for those are probably not very interesting. Probably
> not lock stats, either.
> 
> This reminds me of when some operation (IIRC NFS related) was calling
> system time routines that are fairly expensive on FreeBSD almost
> continually.
> --

There were one or two NFS clients connected but should have been idle.
Both are on an older FreeBSD 12.

Could it be caused by a Seagate 2TB 2 1/2" HD  with
8GB SSD (ST2000LX001-1RG174)?

The system behaved strangely when the disk was new. It seemed that the
flash part was used at the beginning also for writing. It took then
some times up to a minute before data could have been read again after
prolonged write operations. The disk has now a transfer volume of some
5TB and did not show this behaviour for a few weeks. It is only hard for
me to see why this happens. I use this machine since years. The only
change was the disk. I know, things can happen.

As I have rebooted the machine, I will keep this in mind and check also
this direction when this happens again.

Thanks!

Erich
___
freebsd-stable@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


Re: slow machine, swap in use, but more than 5GB of RAM inactive

2017-03-07 Thread Kevin Oberman
On Tue, Mar 7, 2017 at 3:14 PM, Erich Dollansky  wrote:

> Hi,
>
> On Tue, 7 Mar 2017 23:30:58 +1100 (EST)
> Ian Smith  wrote:
>
> > On Tue, 7 Mar 2017 10:19:35 +0800, Erich Dollansky wrote:
> >  > Hi,
> >  >
> >  > I wonder about the slow speed of my machine while top shows ample
> >  > inactive memory:
> >
> > ( quoting from this top output because it's neater :)
> >
> >  > last pid: 85287;  load averages:  2.56,  2.44, 1.68
> >  > up 6+10:24:45 10:13:36 191 processes: 5 running, 186 sleeping
> >  > CPU 0: 47.1% user,  0.0% nice, 51.4% system, 0.0% interrupt,  1.6%
> >  > idle CPU 1: 38.4% user,  0.0% nice, 60.4% system,  0.0% interrupt,
> >  > 1.2% idle CPU 2: 38.8% user,  0.0% nice, 59.2% system,  0.0%
> >  > interrupt, 2.0% idle CPU 3: 45.5% user,  0.0% nice, 51.0% system,
> >  > 0.4% interrupt, 3.1% idle Mem: 677M Active, 5600M Inact, 1083M
> >  > Wired, 178M Cache, 816M Buf,301M Free
> >  > Swap: 16G Total, 1352M Used, 15G Free, 8% Inuse
> >
> > Others have covered the swap / inactive memory issue.
> >
> > But I'd expect this to be slow, for any new work anyway .. there's
> > next to no idle on any CPU.  I'd be asking, what's all of that system
> > usage?
> >
> this is building ports in the background. Still, used doing this ones a
> month, I know the feeling when the ports are updated. This one was
> really slow. Hopefully, it was just an unlucky coincidence.
>
> I rebooted meanwhile the machine. It is faster now, I would say, it is
> back to normal now. It did not come to its limits since the new start.
> It is now on:
>
> FreeBSD 10.3-STABLE #3 r314363
>
> Erich
>

Well, looks like over half of the CPU is running in system space and that
seems rather high for what I would assume is compilation. I thinnk you will
need to  poke around with things like systat, and the like to see just what
the system is doing for 55% or so of all CPUs. Since there doe snot seem to
be a lot of IO or memory at issue, the various command for those are
probably not very interesting. Probably not lock stats, either.

This reminds me of when some operation (IIRC NFS related) was calling
system time routines that are fairly expensive on FreeBSD almost
continually.
--
Kevin Oberman, Part time kid herder and retired Network Engineer
E-mail: rkober...@gmail.com
PGP Fingerprint: D03FB98AFA78E3B78C1694B318AB39EF1B055683
___
freebsd-stable@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


Re: slow machine, swap in use, but more than 5GB of RAM inactive

2017-03-07 Thread Erich Dollansky
Hi,

On Tue, 7 Mar 2017 23:30:58 +1100 (EST)
Ian Smith  wrote:

> On Tue, 7 Mar 2017 10:19:35 +0800, Erich Dollansky wrote:
>  > Hi,
>  > 
>  > I wonder about the slow speed of my machine while top shows ample
>  > inactive memory:  
> 
> ( quoting from this top output because it's neater :)
> 
>  > last pid: 85287;  load averages:  2.56,  2.44, 1.68 
>  > up 6+10:24:45 10:13:36 191 processes: 5 running, 186 sleeping 
>  > CPU 0: 47.1% user,  0.0% nice, 51.4% system, 0.0% interrupt,  1.6%
>  > idle CPU 1: 38.4% user,  0.0% nice, 60.4% system,  0.0% interrupt,
>  > 1.2% idle CPU 2: 38.8% user,  0.0% nice, 59.2% system,  0.0%
>  > interrupt, 2.0% idle CPU 3: 45.5% user,  0.0% nice, 51.0% system,
>  > 0.4% interrupt, 3.1% idle Mem: 677M Active, 5600M Inact, 1083M
>  > Wired, 178M Cache, 816M Buf,301M Free 
>  > Swap: 16G Total, 1352M Used, 15G Free, 8% Inuse  
> 
> Others have covered the swap / inactive memory issue.
> 
> But I'd expect this to be slow, for any new work anyway .. there's
> next to no idle on any CPU.  I'd be asking, what's all of that system
> usage?
> 
this is building ports in the background. Still, used doing this ones a
month, I know the feeling when the ports are updated. This one was
really slow. Hopefully, it was just an unlucky coincidence.

I rebooted meanwhile the machine. It is faster now, I would say, it is
back to normal now. It did not come to its limits since the new start.
It is now on:

FreeBSD 10.3-STABLE #3 r314363

Erich
___
freebsd-stable@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


Re: slow machine, swap in use, but more than 5GB of RAM inactive

2017-03-07 Thread Ian Smith
On Tue, 7 Mar 2017 10:19:35 +0800, Erich Dollansky wrote:
 > Hi,
 > 
 > I wonder about the slow speed of my machine while top shows ample
 > inactive memory:

( quoting from this top output because it's neater :)

 > last pid: 85287;  load averages:  2.56,  2.44, 1.68 
 > up 6+10:24:45 10:13:36 191 processes: 5 running, 186 sleeping 
 > CPU 0: 47.1% user,  0.0% nice, 51.4% system, 0.0% interrupt,  1.6% idle 
 > CPU 1: 38.4% user,  0.0% nice, 60.4% system,  0.0% interrupt, 1.2% idle 
 > CPU 2: 38.8% user,  0.0% nice, 59.2% system,  0.0% interrupt, 2.0% idle 
 > CPU 3: 45.5% user,  0.0% nice, 51.0% system,  0.4% interrupt, 3.1% idle 
 > Mem: 677M Active, 5600M Inact, 1083M Wired, 178M Cache, 816M Buf,301M
 > Free 
 > Swap: 16G Total, 1352M Used, 15G Free, 8% Inuse

Others have covered the swap / inactive memory issue.

But I'd expect this to be slow, for any new work anyway .. there's next 
to no idle on any CPU.  I'd be asking, what's all of that system usage?

cheers, Ian
___
freebsd-stable@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


Re: slow machine, swap in use, but more than 5GB of RAM inactive

2017-03-07 Thread Erich Dollansky
Hi,

On Tue, 7 Mar 2017 10:02:42 +0300
Slawa Olhovchenkov  wrote:

> On Tue, Mar 07, 2017 at 10:19:35AM +0800, Erich Dollansky wrote:
> 
> > I wonder about the slow speed of my machine while top shows ample
> > inactive memory:
> > 
> > last pid: 85287;  load averages:  2.56,  2.44, 1.68 
> > up 6+10:24:45 10:13:36 191 processes: 5 running, 186 sleeping 
> > CPU 0: 47.1% user,  0.0% nice, 51.4% system, 0.0% interrupt,  1.6%
> > idle CPU 1: 38.4% user,  0.0% nice, 60.4% system,  0.0% interrupt,
> > 1.2% idle CPU 2: 38.8% user,  0.0% nice, 59.2% system,  0.0%
> > interrupt, 2.0% idle CPU 3: 45.5% user,  0.0% nice, 51.0% system,
> > 0.4% interrupt, 3.1% idle Mem: 677M Active, 5600M Inact, 1083M
> > Wired, 178M Cache, 816M Buf,301M Free 
> > Swap: 16G Total, 1352M Used, 15G Free, 8% Inuse
> > 
> > The swap space in use can be explained by large compilations done
> > recently. Why is the inactive memory not put to use.
> > 
> > I do not want to restart the machine. So, if I could help find the
> > source of the problem, I would do.  
> 
> inactive is not 'not used' memory.
> this is just pages don't touched in last 10(?) seconds, but all of
> this allocated (such as malloc, mmap, sendfile) to application
> (userland programs).

something changed then since my last update of FreeBSD. The machine is
currently on 10.3-STABLE FreeBSD 10.3-STABLE #2 r313849: Fri Feb 17. It
is on 10 since 2012. It was never this slow. Anyway, I will reboot it
soon into a new kernel and see what will happen then.

Thanks!

Erich
___
freebsd-stable@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


Re: slow machine, swap in use, but more than 5GB of RAM inactive

2017-03-07 Thread Brandon Allbery
On Tue, Mar 7, 2017 at 2:02 AM, Slawa Olhovchenkov  wrote:

> inactive is not 'not used' memory.
> this is just pages don't touched in last 10(?) seconds, but all of
> this allocated (such as malloc, mmap, sendfile) to application
> (userland programs).
>

Or otherwise phrased: they're candidates to be paged out if something
requires that much memory soon. Meanwhile, stuff currently paged out will
stay there unless actively needed; why bother pulling it back in if nothing
actually needs it right now, especially since it got paged out because
nothing had used it recently (i.e. it was marked inactive)?

-- 
brandon s allbery kf8nh   sine nomine associates
allber...@gmail.com  ballb...@sinenomine.net
unix, openafs, kerberos, infrastructure, xmonadhttp://sinenomine.net
___
freebsd-stable@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


Re: slow machine, swap in use, but more than 5GB of RAM inactive

2017-03-06 Thread Slawa Olhovchenkov
On Tue, Mar 07, 2017 at 10:19:35AM +0800, Erich Dollansky wrote:

> Hi,
> 
> I wonder about the slow speed of my machine while top shows ample
> inactive memory:
> 
> last pid: 85287;  load averages:  2.56,  2.44, 1.68 
> up 6+10:24:45 10:13:36 191 processes: 5 running, 186 sleeping 
> CPU 0: 47.1% user,  0.0% nice, 51.4% system, 0.0% interrupt,  1.6% idle 
> CPU 1: 38.4% user,  0.0% nice, 60.4% system,  0.0% interrupt, 1.2% idle 
> CPU 2: 38.8% user,  0.0% nice, 59.2% system,  0.0% interrupt, 2.0% idle 
> CPU 3: 45.5% user,  0.0% nice, 51.0% system,  0.4% interrupt, 3.1% idle 
> Mem: 677M Active, 5600M Inact, 1083M Wired, 178M Cache, 816M Buf,301M
> Free 
> Swap: 16G Total, 1352M Used, 15G Free, 8% Inuse
> 
> The swap space in use can be explained by large compilations done
> recently. Why is the inactive memory not put to use.
> 
> I do not want to restart the machine. So, if I could help find the
> source of the problem, I would do.

inactive is not 'not used' memory.
this is just pages don't touched in last 10(?) seconds, but all of
this allocated (such as malloc, mmap, sendfile) to application
(userland programs).
___
freebsd-stable@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


slow machine, swap in use, but more than 5GB of RAM inactive

2017-03-06 Thread Erich Dollansky
Hi,

I wonder about the slow speed of my machine while top shows ample
inactive memory:

last pid: 85287;  load averages:  2.56,  2.44, 1.68 
up 6+10:24:45 10:13:36 191 processes: 5 running, 186 sleeping 
CPU 0: 47.1% user,  0.0% nice, 51.4% system, 0.0% interrupt,  1.6% idle 
CPU 1: 38.4% user,  0.0% nice, 60.4% system,  0.0% interrupt, 1.2% idle 
CPU 2: 38.8% user,  0.0% nice, 59.2% system,  0.0% interrupt, 2.0% idle 
CPU 3: 45.5% user,  0.0% nice, 51.0% system,  0.4% interrupt, 3.1% idle 
Mem: 677M Active, 5600M Inact, 1083M Wired, 178M Cache, 816M Buf,301M
Free 
Swap: 16G Total, 1352M Used, 15G Free, 8% Inuse

The swap space in use can be explained by large compilations done
recently. Why is the inactive memory not put to use.

I do not want to restart the machine. So, if I could help find the
source of the problem, I would do.

Erich
___
freebsd-stable@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"