Measuring Free memory

2010-03-17 Thread Mario Lobo
Hi to all;

I am trying to get the most precise reading I can of all free memory (8-
STABLE).

I am using 
/usr/bin/vmstat | grep -a 2 | awk '{print $5}'

But I'm not sure if this reflects ALL free memory.

Would anyone have a more precise place to read free memory from?

Thanks
-- 
Mario Lobo
http://www.mallavoodoo.com.br
FreeBSD since version 2.2.8 [not Pro-Audio YET!!] (99,7% winfoes FREE)
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Measuring Free memory

2010-03-17 Thread Lowell Gilbert
Mario Lobo l...@bsd.com.br writes:

 I am trying to get the most precise reading I can of all free memory (8-
 STABLE).

First, you'll need a precise definition of what you mean by free memory.

 I am using 
 /usr/bin/vmstat | grep -a 2 | awk '{print $5}'

 But I'm not sure if this reflects ALL free memory.

 Would anyone have a more precise place to read free memory from?

Add the -H flag to get that value more precise.  I suspect, however,
that precision isn't really the right term for what you're after.  

Have you seen:
 http://www.freebsd.org/doc/en_US.ISO8859-1/books/faq/misc.html#TOP-FREEMEM
and
 
http://www.freebsd.org/doc/en_US.ISO8859-1/books/faq/admin.html#FREE-MEMORY-AMOUNT
by any chance?

-- 
Lowell Gilbert, embedded/networking software engineer, Boston area
http://be-well.ilk.org/~lowell/
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Measuring Free memory

2010-03-17 Thread Mario Lobo
On Wednesday 17 March 2010 19:03:03 Lowell Gilbert wrote:
 First, you'll need a precise definition of what you mean by free memory.

Free physical memory available.

 
 Add the -H flag to get that value more precise.  I suspect, however,
 that precision isn't really the right term for what you're after.

I caught the -H flag right after I wrote the mail. The result has to be 
multiplied by 1024.

It's possible you're right but what I am trying to do is to monitor the amount 
of free physical memory still on the system. 

To make a long story short, I am in a long stretch in trying to find out why 
8-STABLE amd64+VBox+nvidia driver is freezing my system to power button point.

 Have you seen:
  http://www.freebsd.org/doc/en_US.ISO8859-1/books/faq/misc.html#TOP-FREEMEM
 and
  http://www.freebsd.org/doc/en_US.ISO8859-1/books/faq/admin.html#FREE-MEMOR
 Y-AMOUNT by any chance?
 

Those were nice, Thanks.

-- 
Mario Lobo
http://www.mallavoodoo.com.br
FreeBSD since version 2.2.8 [not Pro-Audio YET!!] (99,7% winfoes FREE)
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Measuring Free memory

2010-03-17 Thread Brandon Gooch



Sent from my iPhone

On Mar 17, 2010, at 11:25 AM, Mario Lobo l...@bsd.com.br wrote:


On Wednesday 17 March 2010 19:03:03 Lowell Gilbert wrote:
First, you'll need a precise definition of what you mean by free  
memory.


Free physical memory available.



Add the -H flag to get that value more precise.  I suspect,  
however,

that precision isn't really the right term for what you're after.


I caught the -H flag right after I wrote the mail. The result has to  
be

multiplied by 1024.

It's possible you're right but what I am trying to do is to monitor  
the amount

of free physical memory still on the system.

To make a long story short, I am in a long stretch in trying to find  
out why
8-STABLE amd64+VBox+nvidia driver is freezing my system to power  
button point.




I'm also seeing something similar although perhaps not related to  
(lack of) free memory. Are you able to enable debugging in the kernel  
and maybe get a (text)dump?



Have you seen:
http://www.freebsd.org/doc/en_US.ISO8859-1/books/faq/misc.html#TOP-FREEMEM
and
http://www.freebsd.org/doc/en_US.ISO8859-1/books/faq/admin.html#FREE-MEMOR
Y-AMOUNT by any chance?



Those were nice, Thanks.

--
Mario Lobo
http://www.mallavoodoo.com.br
FreeBSD since version 2.2.8 [not Pro-Audio YET!!] (99,7% winfoes  
FREE)

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org 



I've sent a couple of textdumps to one of the FreeBSD VirtualBox devs  
but haven't heard back just yet.


-Brandon 
___

freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Measuring Free memory

2010-03-17 Thread Mario Lobo
On Wednesday 17 March 2010 19:51:33 Brandon Gooch wrote:
 I'm also seeing something similar although perhaps not related to
 (lack of) free memory. Are you able to enable debugging in the kernel
 and maybe get a (text)dump?

I can't ! The machine freezes completely !! NOTHING works when the freeze 
happens. I even tried with SSH from another machine to it and its screen also 
freezes.
 
 I've sent a couple of textdumps to one of the FreeBSD VirtualBox devs
 but haven't heard back just yet.
 
 -Brandon
 

Please let me know when you do get something.

Thanks
-- 
Mario Lobo
http://www.mallavoodoo.com.br
FreeBSD since version 2.2.8 [not Pro-Audio YET!!] (99,7% winfoes FREE)
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Measuring Free memory

2010-03-17 Thread Adam Vande More
On Wed, Mar 17, 2010 at 11:25 AM, Mario Lobo l...@bsd.com.br wrote:

 On Wednesday 17 March 2010 19:03:03 Lowell Gilbert wrote:
  First, you'll need a precise definition of what you mean by free
 memory.

 Free physical memory available.

 
  Add the -H flag to get that value more precise.  I suspect, however,
  that precision isn't really the right term for what you're after.

 I caught the -H flag right after I wrote the mail. The result has to be
 multiplied by 1024.

 It's possible you're right but what I am trying to do is to monitor the
 amount
 of free physical memory still on the system.

 To make a long story short, I am in a long stretch in trying to find out
 why
 8-STABLE amd64+VBox+nvidia driver is freezing my system to power button
 point.


Well I hope you find the issue, I'm experiencing the same issue siimplying
trying to csup from 8-RELEASE to  8-STABLE.  From what I've been able to
gather I think this only applicable to amd64.  You might have a different
reason for wanting to know this, but I can assure you my lockups aren't due
to a lack of memory from the host anyways.  I have an order of magnitude
more free memory(according to top) in my hosts than my VM requires when it's
running and it still locks on every csup attempt.

Mem: 112M Active, 12M Inact, 1543M Wired, 632K Cache, 2245M Free

VM is set to use 256MB.

-- 
Adam Vande More
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Measuring Free memory

2010-03-17 Thread Mario Lobo
On Wednesday 17 March 2010 20:31:04 Adam Vande More wrote:
 On Wed, Mar 17, 2010 at 11:25 AM, Mario Lobo l...@bsd.com.br wrote:
  On Wednesday 17 March 2010 19:03:03 Lowell Gilbert wrote:
   First, you'll need a precise definition of what you mean by free
 
  memory.
 
  Free physical memory available.
 
   Add the -H flag to get that value more precise.  I suspect, however,
   that precision isn't really the right term for what you're after.
 
  I caught the -H flag right after I wrote the mail. The result has to be
  multiplied by 1024.
 
  It's possible you're right but what I am trying to do is to monitor the
  amount
  of free physical memory still on the system.
 
  To make a long story short, I am in a long stretch in trying to find out
  why
  8-STABLE amd64+VBox+nvidia driver is freezing my system to power button
  point.
 
 Well I hope you find the issue, I'm experiencing the same issue siimplying
 trying to csup from 8-RELEASE to  8-STABLE.  From what I've been able to
 gather I think this only applicable to amd64.  You might have a different
 reason for wanting to know this, but I can assure you my lockups aren't due
 to a lack of memory from the host anyways.  I have an order of magnitude
 more free memory(according to top) in my hosts than my VM requires when
  it's running and it still locks on every csup attempt.
 
 Mem: 112M Active, 12M Inact, 1543M Wired, 632K Cache, 2245M Free
 
 VM is set to use 256MB.
 

Its sounds as if your FreeBSD is a GUEST. For me, FreeBSD is the HOST.

For what its worth, the recently released nvidia driver improved something. 
SO FAR, disabling GL everywhere has stopped the freezes. I've been able to run 
all guests I have (one at a time for now) and none of them froze my host.

-- 
Mario Lobo
http://www.mallavoodoo.com.br
FreeBSD since version 2.2.8 [not Pro-Audio YET!!] (99,7% winfoes FREE)
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Measuring Free memory

2010-03-17 Thread Lowell Gilbert
Mario Lobo l...@bsd.com.br writes:

 On Wednesday 17 March 2010 19:03:03 Lowell Gilbert wrote:
 First, you'll need a precise definition of what you mean by free memory.

 Free physical memory available.

Not precise enough to have a clear answer.  Does it have to be zeroed
already, or do clean inactive pages count? [etc. for buffer cache, VM
page cache...]

 
 Add the -H flag to get that value more precise.  I suspect, however,
 that precision isn't really the right term for what you're after.

 I caught the -H flag right after I wrote the mail. The result has to be 
 multiplied by 1024.

 It's possible you're right but what I am trying to do is to monitor the 
 amount 
 of free physical memory still on the system. 

 To make a long story short, I am in a long stretch in trying to find out why 
 8-STABLE amd64+VBox+nvidia driver is freezing my system to power button point.

Ah.  That's different.  Generally it's more useful to track paging
rates, assuming memory has anything to do with the freeze (which may not
be the case).

-- 
Lowell Gilbert, embedded/networking software engineer, Boston area
http://be-well.ilk.org/~lowell/
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Measuring Free memory

2010-03-17 Thread Adam Vande More
On Wed, Mar 17, 2010 at 12:49 PM, Mario Lobo l...@bsd.com.br wrote:


 
  Well I hope you find the issue, I'm experiencing the same issue
 siimplying
  trying to csup from 8-RELEASE to  8-STABLE.  From what I've been able to
  gather I think this only applicable to amd64.  You might have a different
  reason for wanting to know this, but I can assure you my lockups aren't
 due
  to a lack of memory from the host anyways.  I have an order of magnitude
  more free memory(according to top) in my hosts than my VM requires when
   it's running and it still locks on every csup attempt.
 
  Mem: 112M Active, 12M Inact, 1543M Wired, 632K Cache, 2245M Free
 
  VM is set to use 256MB.
 

 Its sounds as if your FreeBSD is a GUEST. For me, FreeBSD is the HOST.

 For what its worth, the recently released nvidia driver improved something.
 SO FAR, disabling GL everywhere has stopped the freezes. I've been able to
 run
 all guests I have (one at a time for now) and none of them froze my host.


My host and VM are FreeBSD.  8-STABLE for me runs fine with current nvidia
drivers installed with GL enabled.


Host:  8.0-STABLE FreeBSD 8.0-STABLE #0: Thu Mar 11 14:45:20 CST 2010
pkg_info |grep nvidia
nvidia-driver-195.22 NVidia graphics card binary drivers for hardware OpenGL
ren

It is when I csup the VM to 8-STABLE the lockup occurs.


-- 
Adam Vande More
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Measuring Free memory

2010-03-17 Thread Henrik Hudson
On Wed, 17 Mar 2010, Mario Lobo wrote:

 On Wednesday 17 March 2010 19:51:33 Brandon Gooch wrote:
  I'm also seeing something similar although perhaps not related to
  (lack of) free memory. Are you able to enable debugging in the kernel
  and maybe get a (text)dump?
 
 I can't ! The machine freezes completely !! NOTHING works when the freeze 
 happens. I even tried with SSH from another machine to it and its screen also 
 freezes.
  
  I've sent a couple of textdumps to one of the FreeBSD VirtualBox devs
  but haven't heard back just yet.

See the known issues at the bottom of the VirtualBox wiki.
http://wiki.freebsd.org/VirtualBox

Are you running a 8-STABLE kernel newer then Jan. 29th? Did
you pull in VirtualBox 3.1.4 outside of the ports freeze?

I'm running Virtual Box 3.1.4 ontop of a amd64 and nvidia binary
blob as I type this.

henrik
-- 
Henrik Hudson
li...@rhavenn.net
-
God, root, what is difference? Pitr; UF 

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Measuring Free memory

2010-03-17 Thread Mario Lobo
On Wednesday 17 March 2010 21:51:11 Adam Vande More wrote:
 On Wed, Mar 17, 2010 at 12:49 PM, Mario Lobo l...@bsd.com.br wrote:
   Well I hope you find the issue, I'm experiencing the same issue
 
  siimplying
 
   trying to csup from 8-RELEASE to  8-STABLE.  From what I've been able
   to gather I think this only applicable to amd64.  You might have a
   different reason for wanting to know this, but I can assure you my
   lockups aren't
 
  due
 
   to a lack of memory from the host anyways.  I have an order of
   magnitude more free memory(according to top) in my hosts than my VM
   requires when it's running and it still locks on every csup attempt.
  
   Mem: 112M Active, 12M Inact, 1543M Wired, 632K Cache, 2245M Free
  
   VM is set to use 256MB.
 
  Its sounds as if your FreeBSD is a GUEST. For me, FreeBSD is the HOST.
 
  For what its worth, the recently released nvidia driver improved
  something. SO FAR, disabling GL everywhere has stopped the freezes. I've
  been able to run
  all guests I have (one at a time for now) and none of them froze my host.
 
 My host and VM are FreeBSD.  8-STABLE for me runs fine with current nvidia
 drivers installed with GL enabled.
 
 
 Host:  8.0-STABLE FreeBSD 8.0-STABLE #0: Thu Mar 11 14:45:20 CST 2010
 pkg_info |grep nvidia
 nvidia-driver-195.22 NVidia graphics card binary drivers for hardware
  OpenGL ren
 
 It is when I csup the VM to 8-STABLE the lockup occurs.
 
Understood now, Adam.

I have no FBSD VM, but just about every other OS vms. LeoOSx, Win7(3264), 
Several XPs, several 2003, Fedora and even an OS/2 warp. They all work. In 
fact, LeoOsx and Win7 (32) are up as I type this.

The problem comes IF I change the rendering engine from Xrender to OpenGL. 
Or even if a GL screensaver kicks in.

With OpenGL, Win7 freezes the host even before the login prompt, XP may run 
for 5 or 50 minutes and freeze, so does the all other OSes (except Fedora but 
it has no GUI)

Here is my env:

- Phenom II 955 black
- 8G Ram

- FreeBSD Papi 8.0-STABLE FreeBSD 8.0-STABLE #0 r204106M: Tue Mar 16 23:17:32 
UTC 2010 r...@papi:/usr/obj/usr/src/sys/LOBO  amd64 - csuped yesterday !

- (II) Mar 17 19:44:28 NVIDIA(0): NVIDIA GPU GeForce 9800 GT (G92) at(GPU-0)
- (II) NVIDIA dlloader X Driver  195.36.15  Fri Mar 12 08:49:20 
posix/SystemV/PST 2010 - compiled yesterday ! New release.

- virtualbox-ose-devel-3.1.51.r27187 A general-purpose full virtualizer
- virtualbox-ose-kmod-devel-3.1.51.r27187 VirtualBox kernel module for FreeBSD
Latest port with Mac Support !

- KDE 4.3.5

Like I said on my last e-mail, The new driver improved on the old. With the 
195.22 driver, the host would freeze even if I had Xrender enabled, and Lord 
knows how many syctl and boot tweaks I tried.

-- 
Mario Lobo
http://www.mallavoodoo.com.br
FreeBSD since version 2.2.8 [not Pro-Audio YET!!] (99,7% winfoes FREE)
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Measuring Free memory

2010-03-17 Thread Adam Vande More
On Wed, Mar 17, 2010 at 3:08 PM, Mario Lobo l...@bsd.com.br wrote:


 
 Understood now, Adam.

 I have no FBSD VM, but just about every other OS vms. LeoOSx, Win7(3264),
 Several XPs, several 2003, Fedora and even an OS/2 warp. They all work. In
 fact, LeoOsx and Win7 (32) are up as I type this.

 The problem comes IF I change the rendering engine from Xrender to OpenGL.
 Or even if a GL screensaver kicks in.

 With OpenGL, Win7 freezes the host even before the login prompt, XP may run
 for 5 or 50 minutes and freeze, so does the all other OSes (except Fedora
 but
 it has no GUI)

 Here is my env:

 - Phenom II 955 black
 - 8G Ram

 - FreeBSD Papi 8.0-STABLE FreeBSD 8.0-STABLE #0 r204106M: Tue Mar 16
 23:17:32
 UTC 2010 r...@papi:/usr/obj/usr/src/sys/LOBO  amd64 - csuped
 yesterday !

 - (II) Mar 17 19:44:28 NVIDIA(0): NVIDIA GPU GeForce 9800 GT (G92)
 at(GPU-0)
 - (II) NVIDIA dlloader X Driver  195.36.15  Fri Mar 12 08:49:20
 posix/SystemV/PST 2010 - compiled yesterday ! New release.

 - virtualbox-ose-devel-3.1.51.r27187 A general-purpose full virtualizer
 - virtualbox-ose-kmod-devel-3.1.51.r27187 VirtualBox kernel module for
 FreeBSD
 Latest port with Mac Support !

 - KDE 4.3.5

 Like I said on my last e-mail, The new driver improved on the old. With the
 195.22 driver, the host would freeze even if I had Xrender enabled, and
 Lord
 knows how many syctl and boot tweaks I tried.


It does seem we have different issue then.   FWIW: I have vbox installed on
two separate systems w/ nvidia on both.  The only other OS gui VM I have
comparable to yours is an XP install.  I don't use it, but my son plays
games on it some video intensive.  It seems to be stable for him, and I also
use kde4.3.5 with openGL enabled.  This are on VT enabled VM w/ 3d accel
enabled and 128 MB video mem allocated.


-- 
Adam Vande More
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org