initialize msdosfs on memory stick?
I can't seem to find how to do this in the handbook or man pages. I need to initialize a usb memory stick with an msdos file system. Is it possible, or do I have to find a windoze system? ___ 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: initialize msdosfs on memory stick?
On Thu, 12 Sep 2013 16:13:11 -0600, Gary Aitken wrote: On 09/12/13 15:51, Polytropon wrote: On Thu, 12 Sep 2013 15:39:26 -0600, Gary Aitken wrote: I can't seem to find how to do this in the handbook or man pages. I need to initialize a usb memory stick with an msdos file system. Is it possible, or do I have to find a windoze system? It is possible. The OS provides the newfs_msdos tool. There is no need to deal with Windows for this task. Great, thanks. I checked the newfs manpage but didn't look too carefully when the summary line said construct a new UFS1/UFS2 file system That's correct: newfs refers to newfs_ufs (which obviously initializes a UFS file system), but there are other newfs_* just as there are corresponding (and more) mount_* commands. See man newfs_msdos for more details. -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ... ___ 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: initialize msdosfs on memory stick?
On Thu, 12 Sep 2013 15:39:26 -0600, Gary Aitken wrote: I can't seem to find how to do this in the handbook or man pages. I need to initialize a usb memory stick with an msdos file system. Is it possible, or do I have to find a windoze system? It is possible. The OS provides the newfs_msdos tool. There is no need to deal with Windows for this task. -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ... ___ 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: initialize msdosfs on memory stick?
On 09/12/13 15:51, Polytropon wrote: On Thu, 12 Sep 2013 15:39:26 -0600, Gary Aitken wrote: I can't seem to find how to do this in the handbook or man pages. I need to initialize a usb memory stick with an msdos file system. Is it possible, or do I have to find a windoze system? It is possible. The OS provides the newfs_msdos tool. There is no need to deal with Windows for this task. Great, thanks. I checked the newfs manpage but didn't look too carefully when the summary line said construct a new UFS1/UFS2 file system ___ 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: initialize msdosfs on memory stick?
On Thu, 12 Sep 2013, Gary Aitken wrote: I can't seem to find how to do this in the handbook or man pages. I need to initialize a usb memory stick with an msdos file system. Is it possible, or do I have to find a windoze system? Sure, it's possible. For maximum compatibility, I'd suggest creating an MBR layout on it. Some devices expect that. Assuming it is da0 (make sure) and that everything on it has been backed up... # gpart destroy -F da0 # gpart create -s mbr da0 # gpart add -t \!12 da0 # newfs_msdos -F32 /dev/da0s1 ___ 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: initialize msdosfs on memory stick?
On 09/12/13 16:26, Polytropon wrote: On Thu, 12 Sep 2013 16:13:11 -0600, Gary Aitken wrote: On 09/12/13 15:51, Polytropon wrote: On Thu, 12 Sep 2013 15:39:26 -0600, Gary Aitken wrote: I can't seem to find how to do this in the handbook or man pages. I need to initialize a usb memory stick with an msdos file system. Is it possible, or do I have to find a windoze system? It is possible. The OS provides the newfs_msdos tool. There is no need to deal with Windows for this task. Great, thanks. I checked the newfs manpage but didn't look too carefully when the summary line said construct a new UFS1/UFS2 file system That's correct: newfs refers to newfs_ufs (which obviously initializes a UFS file system), but there are other newfs_* just as there are corresponding (and more) mount_* commands. See man newfs_msdos for more details. I see that; but was surprised newfs didn't see-also newfs_msdosfs. Anyhoo... ugh, I think I just screwed it up, not thinking things through. After doing # newfs_msdos -F 32 -S 4096 /dev/da0 newfs_msdos: trim 62 sectors to adjust to a multiple of 63 /dev/da0: 979584 sectors in 30612 FAT32 clusters (131072 bytes/cluster) BytesPerSec=4096 SecPerClust=32 ResSectors=4 FATs=2 Media=0xf0 SecPerTrack=63 Heads=255 HiddenSecs=0 HugeSectors=979650 FATsecs=30 RootCluster=2 FSInfo=1 Backup=2 I can't mount it, and there are no partitions: # ls /dev/da0* /dev/da0 # mount -t msdosfs /dev/da0 /mnt/memstick mount_msdosfs: /dev/da0: Invalid argument Normally there is a /dev/da0s1. I suspect I *should* have used /dev/da0s1 in the newfs_msdos cmd. So, attempting to re-establish the partitions: #gpart create -s MBR da0 da0 created # gpart show -l da0 = 63 7837633 da0 MBR (3.8G) 63 7837633 - free - (3.8G) # gpart add -t mbr da0 gpart: Invalid argument now what? Is mbr the wrong kind of partition type? man gpart indicates the MBR scheme requires the GEOM_PART_MBR kernel option; since the create succeeded, I'm assuming this is present? ___ 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: initialize msdosfs on memory stick?
Gary Aitken wrote: On 09/12/13 16:26, Polytropon wrote: On Thu, 12 Sep 2013 16:13:11 -0600, Gary Aitken wrote: On 09/12/13 15:51, Polytropon wrote: On Thu, 12 Sep 2013 15:39:26 -0600, Gary Aitken wrote: I can't seem to find how to do this in the handbook or man pages. I need to initialize a usb memory stick with an msdos file system. Is it possible, or do I have to find a windoze system? It is possible. The OS provides the newfs_msdos tool. There is no need to deal with Windows for this task. Great, thanks. I checked the newfs manpage but didn't look too carefully when the summary line said construct a new UFS1/UFS2 file system That's correct: newfs refers to newfs_ufs (which obviously initializes a UFS file system), but there are other newfs_* just as there are corresponding (and more) mount_* commands. See man newfs_msdos for more details. I see that; but was surprised newfs didn't see-also newfs_msdosfs. Anyhoo... ugh, I think I just screwed it up, not thinking things through. After doing # newfs_msdos -F 32 -S 4096 /dev/da0 newfs_msdos: trim 62 sectors to adjust to a multiple of 63 /dev/da0: 979584 sectors in 30612 FAT32 clusters (131072 bytes/cluster) BytesPerSec=4096 SecPerClust=32 ResSectors=4 FATs=2 Media=0xf0 SecPerTrack=63 Heads=255 HiddenSecs=0 HugeSectors=979650 FATsecs=30 RootCluster=2 FSInfo=1 Backup=2 I can't mount it, and there are no partitions: # ls /dev/da0* /dev/da0 # mount -t msdosfs /dev/da0 /mnt/memstick mount_msdosfs: /dev/da0: Invalid argument Normally there is a /dev/da0s1. I suspect I *should* have used /dev/da0s1 in the newfs_msdos cmd. So, attempting to re-establish the partitions: #gpart create -s MBR da0 da0 created # gpart show -l da0 = 63 7837633 da0 MBR (3.8G) 63 7837633 - free - (3.8G) # gpart add -t mbr da0 gpart: Invalid argument now what? Is mbr the wrong kind of partition type? man gpart indicates the MBR scheme requires the GEOM_PART_MBR kernel option; since the create succeeded, I'm assuming this is present? ___ 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 read this how to http://forums.freebsd.org/showthread.php?t=13780 ___ 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: initialize msdosfs on memory stick?
On 09/12/13 17:52, Warren Block wrote: On Thu, 12 Sep 2013, Gary Aitken wrote: I can't seem to find how to do this in the handbook or man pages. I need to initialize a usb memory stick with an msdos file system. Is it possible, or do I have to find a windoze system? Sure, it's possible. For maximum compatibility, I'd suggest creating an MBR layout on it. Some devices expect that. Assuming it is da0 (make sure) and that everything on it has been backed up... # gpart destroy -F da0 # gpart create -s mbr da0 # gpart add -t \!12 da0 # newfs_msdos -F32 /dev/da0s1 That worked, thanks. Where is the magic file type !12 described? I don't see it as one of the possibilities in man gpart. ___ 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: initialize msdosfs on memory stick?
On Thu, 12 Sep 2013, Gary Aitken wrote: On 09/12/13 17:52, Warren Block wrote: On Thu, 12 Sep 2013, Gary Aitken wrote: I can't seem to find how to do this in the handbook or man pages. I need to initialize a usb memory stick with an msdos file system. Is it possible, or do I have to find a windoze system? Sure, it's possible. For maximum compatibility, I'd suggest creating an MBR layout on it. Some devices expect that. Assuming it is da0 (make sure) and that everything on it has been backed up... # gpart destroy -F da0 # gpart create -s mbr da0 # gpart add -t \!12 da0 # newfs_msdos -F32 /dev/da0s1 That worked, thanks. Where is the magic file type !12 described? I don't see it as one of the possibilities in man gpart. It's one of the many MS-DOS FAT variations: http://en.wikipedia.org/wiki/Partition_type ___ 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: initialize msdosfs on memory stick?
On 09/12/13 20:58, Warren Block wrote: On Thu, 12 Sep 2013, Gary Aitken wrote: On 09/12/13 17:52, Warren Block wrote: On Thu, 12 Sep 2013, Gary Aitken wrote: I can't seem to find how to do this in the handbook or man pages. I need to initialize a usb memory stick with an msdos file system. Is it possible, or do I have to find a windoze system? Sure, it's possible. For maximum compatibility, I'd suggest creating an MBR layout on it. Some devices expect that. Assuming it is da0 (make sure) and that everything on it has been backed up... # gpart destroy -F da0 # gpart create -s mbr da0 # gpart add -t \!12 da0 # newfs_msdos -F32 /dev/da0s1 That worked, thanks. Where is the magic file type !12 described? I don't see it as one of the possibilities in man gpart. It's one of the many MS-DOS FAT variations: http://en.wikipedia.org/wiki/Partition_type Not fair, that makes it really magic ;-) Thanks ___ 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
memory stick
I am trying to mount a memory stick at the command line. I seem to be able to mount and unmount it but i can't copy files into the stick. please see the attached image for the commands I used and the results. If you have any suggestions on what the problem might be I would sure like to know what you think. I logged in as root on free BSD version 7.0 release 0.0. 20130808091209582.pdf Description: Adobe PDF document ___ 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: memory stick
On Thu, Aug 8, 2013 at 9:34 AM, william benton weben...@hotmail.com wrote: I am trying to mount a memory stick at the command line. I seem to be able to mount and unmount it but i can't copy files into the stick. please see the attached image for the commands I used and the results. If you have any suggestions on what the problem might be I would sure like to know what you think. I logged in as root on free BSD version 7.0 release 0.0. You have a special character in your path. You will need to escape it, eg cp /usr/home/w\!/foo /mnt/ufs/ -- 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: memory stick
(sorry for top post) Heh, looks like the Alton Brown style of debugging ;D (for anyone that follows his twitter feed) -- Devin On Aug 8, 2013, at 7:34 AM, william benton wrote: I am trying to mount a memory stick at the command line. I seem to be able to mount and unmount it but i can't copy files into the stick. please see the attached image for the commands I used and the results. If you have any suggestions on what the problem might be I would sure like to know what you think. I logged in as root on free BSD version 7.0 release 0.0. 20130808091209582.pdf___ 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 _ The information contained in this message is proprietary and/or confidential. If you are not the intended recipient, please: (i) delete the message and all copies; (ii) do not disclose, distribute or use the message in any manner; and (iii) notify the sender immediately. In addition, please be aware that any message addressed to our domain is subject to archiving and review by persons other than the intended recipient. Thank you. ___ 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
Is this a memory error?
Is this message indicating I have a memory error? I'm seeing this message across two systems, one below: FreeBSD mc 9.1-STABLE FreeBSD 9.1-STABLE #0 r252678: Thu Jul 4 03:47:52 PDT 2013 root@mc:/usr/obj/disk-1/src/sys/SMUNI amd64 Jul 4 15:11:10 mc kernel: MCA: Bank 2, Status 0x981a400c0176 Jul 4 15:11:10 mc kernel: MCA: Global Cap 0x0107, Status 0x Jul 4 15:11:10 mc kernel: MCA: Vendor AuthenticAMD, ID 0x600f12, APIC ID 72 Jul 4 15:11:10 mc kernel: MCA: CPU 24 COR DCACHE L2 EVICT error Jul 4 15:11:10 mc kernel: MCA: Misc 0x0 ___ 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: Is this a memory error?
Dennis Glatting freebsd at pki2.com writes: Is this message indicating I have a memory error? I'm seeing this message across two systems, one below: FreeBSD mc 9.1-STABLE FreeBSD 9.1-STABLE #0 r252678: Thu Jul 4 03:47:52 PDT 2013 root at mc:/usr/obj/disk-1/src/sys/SMUNI amd64 Jul 4 15:11:10 mc kernel: MCA: Bank 2, Status 0x981a400c0176 Jul 4 15:11:10 mc kernel: MCA: Global Cap 0x0107, Status 0x Jul 4 15:11:10 mc kernel: MCA: Vendor AuthenticAMD, ID 0x600f12, APIC ID 72 Jul 4 15:11:10 mc kernel: MCA: CPU 24 COR DCACHE L2 EVICT error Jul 4 15:11:10 mc kernel: MCA: Misc 0x0 Google search: kernel: MCA: Bank , Status DCACHE L2 EVICT error http://lists.freebsd.org/pipermail/freebsd-questions/2010-August/220060.html http://forums.freebsd.org/showthread.php?t=24447 jb ___ 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
what commands show memory usage
When stopping vnet jails get message about lost memory pages. What console commands show available memory pages so I can determine the lost memory pages after 100 stopped jails? Want to find out if that lost memory page message is bogus or not. Thanks ___ 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: what commands show memory usage
On 05/14/2013 08:56 PM, Joe wrote: Tim Daneliuk wrote: On 05/14/2013 08:32 PM, Joe wrote: When stopping vnet jails get message about lost memory pages. What console commands show available memory pages so I can determine the lost memory pages after 100 stopped jails? Want to find out if that lost memory page message is bogus or not. Look at 'vmstat' and 'free' commands. can't find any free command Sorry Joe (and everyone), I had a brief bit flip. The command is actually called freebsd-memory and is not in the base system. It's an addon from Ralph Engelshall and can be found here: http://people.freebsd.org/~rse/utils/ (If you care, the 'free' command is how you do this on Linux.) -- Tim Daneliuk tun...@tundraware.com PGP Key: http://www.tundraware.com/PGP/ ___ 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: IPC Shared memory segment
The solution was given at revision 233760. Link for description: http://svnweb.freebsd.org/base?view=revisionrevision=233760 Thanks to all! -- Respectfully, Stanislav Putrya System administrator FotoStrana.Ru Ltd. ICQ IM: 328585847 Jabber-GoogleTalk: root.vagner mob.phone SPB: +79215788755 mob.phone RND: +79525600664 email: vag...@bsdway.ru email: put...@playform.ru email: root.vag...@gmail.com site: bsdway.ru site: fotostrana.ru ( ) ASCII ribbon campaign X - against HTML, vCards and / \ - proprietary attachments in e-mail ___ 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
IPC Shared memory segment
Hi all! Tell me please, how may I remove shared memory segment like this: T:m shmid:65537 shmkey:0 mode:--rw-rw-rw- owner:root group:wheel creator:root cgroup:wheel NATTCH:2 SEGSZ:1048576000 CPID:2982 LPID:54375 ATIME:10:29:12 DTIME:15:56:14 CTIME:10:51:00 Pid 2982 and pid 54375 is killed. -- Respectfully, Stanislav Putrya System administrator FotoStrana.Ru Ltd. ICQ IM: 328585847 Jabber-GoogleTalk: root.vagner mob.phone SPB: +79215788755 mob.phone RND: +79525600664 email: vag...@bsdway.ru email: put...@playform.ru email: root.vag...@gmail.com site: bsdway.ru site: fotostrana.ru ( ) ASCII ribbon campaign X - against HTML, vCards and / \ - proprietary attachments in e-mail ___ 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: IPC Shared memory segment
On 03/19/2013 13:06, Vagner wrote: Hi all! Tell me please, how may I remove shared memory segment like this: T:m shmid:65537 shmkey:0 mode:--rw-rw-rw- owner:root group:wheel creator:root cgroup:wheel NATTCH:2 SEGSZ:1048576000 CPID:2982 LPID:54375 ATIME:10:29:12 DTIME:15:56:14 CTIME:10:51:00 Pid 2982 and pid 54375 is killed. man ipcrm -- No trees were killed in the creation of this message. However, many electrons were terribly inconvenienced. ___ 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
process eating up all memory - what should happen next?
I have a process that eats up al memory, in my case science/paraview if I try to analyse a large model. What should FreeBSD do when a process tries to use all RAM or more? I my case I get a complete freeze, can't even login from the console, and requiring a cold reboot. I guess this is not supposed to happen, but what is supposed to happen in situations like this? This is on ia64, so it might be something to do with instability there. Thanks Anton ___ 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: process eating up all memory - what should happen next?
On Thu, 7 Mar 2013 10:01:03 GMT, Anton Shterenlikht wrote: I have a process that eats up al memory, in my case science/paraview if I try to analyse a large model. What should FreeBSD do when a process tries to use all RAM or more? In this case, the swap space would be used, until the system runs out of swap space. I my case I get a complete freeze, can't even login from the console, and requiring a cold reboot. I guess this is not supposed to happen, but what is supposed to happen in situations like this? A normal reboot (including a proper shutdown) should at least be possible. If the machine seems to freeze entirely, this simply looks wrong, so maybe it's more than just eating all the RAM? You could try to impose a resource limit, see man limits for details, so you could trigger the undesired behaviour while e. g. only 50% of the available RAM is being used by _that_ process (and therefor still leaving enough resources for other system and user processes). You could also monitor resource consumption with tools like top, htop, vmstat or systat in adjacent xterms while you run the test, seeing trouble pile up... -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ... ___ 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: process eating up all memory - what should happen next?
On 7/3/2013 12:17 μμ, Polytropon wrote: On Thu, 7 Mar 2013 10:01:03 GMT, Anton Shterenlikht wrote: I have a process that eats up al memory, in my case science/paraview if I try to analyse a large model. What should FreeBSD do when a process tries to use all RAM or more? In this case, the swap space would be used, until the system runs out of swap space. I my case I get a complete freeze, can't even login from the console, and requiring a cold reboot. I guess this is not supposed to happen, but what is supposed to happen in situations like this? A normal reboot (including a proper shutdown) should at least be possible. If the machine seems to freeze entirely, this simply looks wrong, so maybe it's more than just eating all the RAM? You could try to impose a resource limit, see man limits for details, so you could trigger the undesired behaviour while e. g. only 50% of the available RAM is being used by _that_ process (and therefor still leaving enough resources for other system and user processes). You could also monitor resource consumption with tools like top, htop, vmstat or systat in adjacent xterms while you run the test, seeing trouble pile up... I think Anton is interested in the system's behavior when there is no enforced limit. Processes tend to be killed quite quickly when there is no on-disk swap backing. root@awethu:/root # swapinfo Device 1K-blocks UsedAvail Capacity root@awethu:/root # nice python -c 'a = [f for f in range(8000)]' Killed When on-disk swap backing exists and multiple processes are competing for memory things are are not that straightforward. I think you hit a bug on ia64. Could you test the behavior using the above program and report back? I would run top in one terminal(so i can monitor and kill the program) and I would use a second terminal to run the program using increasingly larger values. Also, I wouldn't try that under X, at least i would test first without X... HTH, Nikos ___ 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
Tuning ZFS ARC for 512GB Memory
I have a 512GB memory system that has a 480GB (or so) L2ARC, and a raidz2 storage pool. No dedup or compression is enabled. Although, I will enable compression in the future. By default vfs.zfs.arc_max is about 300GB and the L2ARC is hardly touched. I've seen a couple hints recently on the mailing lists that having too big of an ARC can be a performance hit because it takes a long time to inspect it when something needs to integrate over the entries. I've also had issues with running 9.1 on this machine due to zfs deadlocks or stalls and am currently stuck using 9.0 with no issue. So, I was wondering if shrinking the ARC would potentially help and what should I shrink it to? I am thinking about setting vfs.zfs.arc_max to 64GB. Does anyone have an opinion? -- Reed A. Cartwright, PhD Assistant Professor of Genomics, Evolution, and Bioinformatics School of Life Sciences Center for Evolutionary Medicine and Informatics The Biodesign Institute Arizona State University ___ 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: Tuning ZFS ARC for 512GB Memory
Try to read through the email thread I have started and specifically posts (replies) by alc: http://lists.freebsd.org/pipermail/freebsd-performance/2012-August/thread.html#4640 I have followed his suggestions, and with the arc_max setting I used we still have on average free RAM ~137GB. HTH. On Tue, Mar 5, 2013 at 6:36 PM, Reed A. Cartwright cartwri...@asu.eduwrote: I have a 512GB memory system that has a 480GB (or so) L2ARC, and a raidz2 storage pool. No dedup or compression is enabled. Although, I will enable compression in the future. By default vfs.zfs.arc_max is about 300GB and the L2ARC is hardly touched. I've seen a couple hints recently on the mailing lists that having too big of an ARC can be a performance hit because it takes a long time to inspect it when something needs to integrate over the entries. I've also had issues with running 9.1 on this machine due to zfs deadlocks or stalls and am currently stuck using 9.0 with no issue. So, I was wondering if shrinking the ARC would potentially help and what should I shrink it to? I am thinking about setting vfs.zfs.arc_max to 64GB. Does anyone have an opinion? -- Reed A. Cartwright, PhD Assistant Professor of Genomics, Evolution, and Bioinformatics School of Life Sciences Center for Evolutionary Medicine and Informatics The Biodesign Institute Arizona State University ___ 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 ___ 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
Limiting jail CPU memory resources
Is there anything in 9.1 to Limit jail CPU memory resources? ___ 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: Limiting jail CPU memory resources
On Fri, 01 Mar 2013 08:38:05 -0600, fb...@a1poweruser.com wrote: Is there anything in 9.1 to Limit jail CPU memory resources? https://wiki.freebsd.org/Hierarchical_Resource_Limits ___ 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: Limiting jail CPU memory resources
Mark Felder wrote: On Fri, 01 Mar 2013 08:38:05 -0600, fb...@a1poweruser.com wrote: Is there anything in 9.1 to Limit jail CPU memory resources? https://wiki.freebsd.org/Hierarchical_Resource_Limits Read that all ready and left me with more question than answers. Its experimental and has to be compiled into the kernel. Need solutions that are provided as part of the base system. Such as a loadable kernel module. Can not be risking the security of production jails on some experimental software. ___ 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: Limiting jail CPU memory resources
On Fri, 01 Mar 2013 09:52:41 -0600, fb...@a1poweruser.com wrote: Read that all ready and left me with more question than answers. Its experimental and has to be compiled into the kernel. Need solutions that are provided as part of the base system. Such as a loadable kernel module. Can not be risking the security of production jails on some experimental software. Unfortunately there's nothing else available yet. You'd be better off using full-fledged hypervisors like Xen, KVM, or ESXi. I'm also anxiously awaiting some improvement in this area. ___ 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: Limiting jail CPU memory resources
Mark Felder wrote: On Fri, 01 Mar 2013 09:52:41 -0600, fb...@a1poweruser.com wrote: Read that all ready and left me with more question than answers. Its experimental and has to be compiled into the kernel. Need solutions that are provided as part of the base system. Such as a loadable kernel module. Can not be risking the security of production jails on some experimental software. Unfortunately there's nothing else available yet. You'd be better off using full-fledged hypervisors like Xen, KVM, or ESXi. I'm also anxiously awaiting some improvement in this area. What do you think about the new jail.conf parameter cpuset.id from jail(8)? Seems to me it's a way to dedicate one or more CPUs to a single jail for increased jail performance. Really the opposite of limiting cpu resources to a jail. ___ 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
Reduce the consumption of video memory
Can i reduce using of video memory in xorg.conf? My video card is almost dead, i think is something with Video Memory, because in monitor showed and disappear little noisy pixel, and i wish check out is problem with video memory? ___ 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: Reduce the consumption of video memory
On Sat, 05 Jan 2013 23:15:06 +0700, Dima Naumov wrote: Can i reduce using of video memory in xorg.conf? My video card is almost dead, i think is something with Video Memory, because in monitor showed and disappear little noisy pixel, and i wish check out is problem with video memory? You can add an entry into the GPU's Device section. How _exactly_ this option will be honored depends on the actual driver you're using. From man xorg.conf: VideoRam mem This optional entry specifies the amount of video ram that is installed on the graphics board. This is measured in kBytes. In most cases this is not required because the Xorg server probes the graphics board to determine this quantity. The driver-specific documentation should indicate when it might be needed. Check the documentation for your driver if it will deal with this setting in the desired way. -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ... ___ 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: Reduce the consumption of video memory
Dima Naumov clangbsd at gmail.com writes: Can i reduce using of video memory in xorg.conf? My video card is almost dead, i think is something with Video Memory, because in monitor showed and disappear little noisy pixel, and i wish check out is problem with video memory? - check in BIOS - man xorg.conf VideoRam jb ___ 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
Postgresql related memory question
Hi, I recently had a discussion of PostgreSQLs memory usage on FreeBSD, notably the display of the different memory types in top, on the PostgreSQL mailing list [1]. My server has 32GB ram, of which approx. 8GB vanish from tops display after a while. My question was wether there is a memory problem on FreeBSD or if top is not capable of dealing well with PostgreSQLs memory handling, eg. the shared_buffers. We used a perl script [2] to get a better understanding of the current memory usage on FreeBSD and a line from the scripts output caught my eye: mem_gap_vm: + 8812892160 ( 8404MB) [ 26%] Memory gap: UNKNOWN I don't have a good understanding of the different types of system memory, so the question is, in relation with PostgreSQL, if the mem_gap_vm value can be considered normal or if it is a sign of memory leak. Since this question is more of a FreeBSD question, we decided to move the discussion here in order to get more insight on the system internals :-) This value equals more or less the shared buffers (shared_buffers=8GB) setting of PostgreSQL and is stable, which means, it doesn't change anymore after reaching its peak value. I did post already some system configuration information in the thread on the PostgreSQL list, but I am happy to provide all the information necessary to shed some light on this matter. Many thanks, Frank [1] http://postgresql.1045698.n5.nabble.com/Memory-issue-on-FreeBSD-td5730651.html [2] http://www.cyberciti.biz/faq/freebsd-command-to-get-ram-information/ -- Frank BRONIEWSKI METRICO s.à r.l. géomètres technologies d'information géographique rue des Romains 36 L-5433 NIEDERDONVEN tél.: +352 26 74 94 - 28 fax.: +352 26 74 94 99 http://www.metrico.lu ___ 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: how many memory is needed for FreeBSD 9 ?
Le Mon, 22 Oct 2012 03:49:50 +1100, andrew clarke m...@ozzmosis.com a écrit : Hello, I'm updating an old laptop running FreeBSD 8.1 with 64 MB ram (44MB available) but now FreeBSD 9.1 panics at boot time: panic: kmem_malloc(4194304): kmem_map too small: 24584192 allocated? That's one very old laptop. I think you'll need to install more memory or downgrade FreeBSD to an earlier version. 1998, I think (HP Omnibook 900). I use it for small network testing and serial console access. It works well for this. Well I've put 8-STABLE on it (two days to make buildworld/buildkernel). Looks good. From my limited testing under VirtualBox, 96 MB RAM is about the lower limit that will allow FreeBSD 9.1-RC2 to boot before the swap partition is enabled. Any less and the kernel will freeze or panic at boot. This was with the amd64 version though, not i386. Thanks for this, regards. ___ 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
how many memory is needed for FreeBSD 9 ?
Hi, I'm updating an old laptop running FreeBSD 8.1 with 64 MB ram (44MB available) but now FreeBSD 9.1 panics at boot time: panic: kmem_malloc(4194304): kmem_map too small: 24584192 allocated? Any work-around? Thanks regards. ___ 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: how many memory is needed for FreeBSD 9 ?
On Sun 2012-10-21 18:21:59 UTC+0200, Patrick Lamaiziere (patf...@davenulle.org) wrote: I'm updating an old laptop running FreeBSD 8.1 with 64 MB ram (44MB available) but now FreeBSD 9.1 panics at boot time: panic: kmem_malloc(4194304): kmem_map too small: 24584192 allocated? That's one very old laptop. I think you'll need to install more memory or downgrade FreeBSD to an earlier version. 9.1-RELEASE isn't available yet, only 9.1-RC1 RC2. Given it's prerelease code it's plausible the 9.1-RC2 kernel requires more memory at boot than 9.1-REL will. Attempting to boot 9.0-REL from CD on your laptop should answer that question. From my limited testing under VirtualBox, 96 MB RAM is about the lower limit that will allow FreeBSD 9.1-RC2 to boot before the swap partition is enabled. Any less and the kernel will freeze or panic at boot. This was with the amd64 version though, not i386. ___ 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: how many memory is needed for FreeBSD 9 ?
On 21 October 2012 12:49, andrew clarke m...@ozzmosis.com wrote: On Sun 2012-10-21 18:21:59 UTC+0200, Patrick Lamaiziere (patf...@davenulle.org) wrote: I'm updating an old laptop running FreeBSD 8.1 with 64 MB ram (44MB available) but now FreeBSD 9.1 panics at boot time: panic: kmem_malloc(4194304): kmem_map too small: 24584192 allocated? That's one very old laptop. I think you'll need to install more memory or downgrade FreeBSD to an earlier version. 9.1-RELEASE isn't available yet, only 9.1-RC1 RC2. Given it's prerelease code it's plausible the 9.1-RC2 kernel requires more memory at boot than 9.1-REL will. Attempting to boot 9.0-REL from CD on your laptop should answer that question. From my limited testing under VirtualBox, 96 MB RAM is about the lower limit that will allow FreeBSD 9.1-RC2 to boot before the swap partition is enabled. Any less and the kernel will freeze or panic at boot. This was with the amd64 version though, not i386. Keep in mind that the installer will take some memory on top of what is needed to boot FreeBSD. -- -- ___ 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: Swapped memory limited to about 500MB for a process ?
On Fri, 2012-09-14 at 08:36 +0530, Sriram Gorti wrote: On Wed, Sep 12, 2012 at 7:33 PM, Mickaël Canévet cane...@embl.fr wrote: On Wed, 2012-09-12 at 10:03 -0400, Lowell Gilbert wrote: Mickaël Canévet cane...@embl.fr writes: On Tue, 2012-09-11 at 13:05 -0400, Lowell Gilbert wrote: Mickaël Canévet cane...@embl.fr writes: I was impacted by a memory leak that has been fixed by this patch: http://people.freebsd.org/~rmacklem/namei-leak.patch What I noticed when the server was paging is that it seems that only about 500MB of my 4GB swap partition was used before crashing. I was wondering why it didn't take the whole 4GB up to the crash of the server because of lake of memory (that would let me more time to react). Is there such king of setting that prevent a process to put more then 500MB of data in swap ? limits(1)? Thank you for your answer. Here is the result of limits: limits Resource limits (current): cputime infinity secs filesize infinity kB datasize 33554432 kB stacksize 524288 kB coredumpsize infinity kB memoryuseinfinity kB memorylocked infinity kB maxprocesses 5547 openfiles 11095 sbsize infinity bytes vmemoryuse infinity kB pseudo-terminals infinity swapuse infinity kB swapuse is set to unlimited, but stacksize is set to 512MB. Is it the stacksize setting that prevent my kernel to swap more then 512MB ? No, I don't think so. datasize was the parameter I was most suspecting; and it assumes that a particular process was causing the crash (which is unlikely; the OS is supposed to protect you against it). Most likely, the crash was not directly caused by a shortage of virtual memory. You would have to diagnose through crash dumps, but it could be that some more specific resource was exhausted. Or perhaps the memory leak left dangling references in a vnode. We also had a some what similar experience - swap partition was not being fully utilized (but no NFS in use). Found that the size of SWAPMETA limits the total usable swap space. This is more likely with a custom config and tweaked limits. vmstat -z | egrep LIMIT|SWAPMETA --- sriram OK, Thanks a lot for your explanations. Cheers, Mickaël I have this: # vmstat -z | egrep LIMIT|SWAPMETA ITEM SIZE LIMIT USED FREE REQ FAIL SLEEP SWAPMETA: 288, 116519,1610,6437, 559839, 0, 0 If this number (116519) correspond to the number of memory pages and as I have 4k page size (pagesize command reports 4096), SWAPMETA is limited to 466076 kB which is pretty close to the about 500MB I can see on my monitoring graphs. If this is the explanation of what happens, how can I tune this ? Should I use larger pages (superpages seems to be enable by default on FreeBSD9-amd64) ? Is there a way to increase the limit of swapmeta ? Thanks, Mickaël signature.asc Description: This is a digitally signed message part
Re: Swapped memory limited to about 500MB for a process ?
On Wed, Sep 12, 2012 at 7:33 PM, Mickaël Canévet cane...@embl.fr wrote: On Wed, 2012-09-12 at 10:03 -0400, Lowell Gilbert wrote: Mickaël Canévet cane...@embl.fr writes: On Tue, 2012-09-11 at 13:05 -0400, Lowell Gilbert wrote: Mickaël Canévet cane...@embl.fr writes: I was impacted by a memory leak that has been fixed by this patch: http://people.freebsd.org/~rmacklem/namei-leak.patch What I noticed when the server was paging is that it seems that only about 500MB of my 4GB swap partition was used before crashing. I was wondering why it didn't take the whole 4GB up to the crash of the server because of lake of memory (that would let me more time to react). Is there such king of setting that prevent a process to put more then 500MB of data in swap ? limits(1)? Thank you for your answer. Here is the result of limits: limits Resource limits (current): cputime infinity secs filesize infinity kB datasize 33554432 kB stacksize 524288 kB coredumpsize infinity kB memoryuseinfinity kB memorylocked infinity kB maxprocesses 5547 openfiles 11095 sbsize infinity bytes vmemoryuse infinity kB pseudo-terminals infinity swapuse infinity kB swapuse is set to unlimited, but stacksize is set to 512MB. Is it the stacksize setting that prevent my kernel to swap more then 512MB ? No, I don't think so. datasize was the parameter I was most suspecting; and it assumes that a particular process was causing the crash (which is unlikely; the OS is supposed to protect you against it). Most likely, the crash was not directly caused by a shortage of virtual memory. You would have to diagnose through crash dumps, but it could be that some more specific resource was exhausted. Or perhaps the memory leak left dangling references in a vnode. We also had a some what similar experience - swap partition was not being fully utilized (but no NFS in use). Found that the size of SWAPMETA limits the total usable swap space. This is more likely with a custom config and tweaked limits. vmstat -z | egrep LIMIT|SWAPMETA --- sriram OK, Thanks a lot for your explanations. Cheers, Mickaël ___ 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: Swapped memory limited to about 500MB for a process ?
On Tue, 2012-09-11 at 13:05 -0400, Lowell Gilbert wrote: Mickaël Canévet cane...@embl.fr writes: I was impacted by a memory leak that has been fixed by this patch: http://people.freebsd.org/~rmacklem/namei-leak.patch What I noticed when the server was paging is that it seems that only about 500MB of my 4GB swap partition was used before crashing. I was wondering why it didn't take the whole 4GB up to the crash of the server because of lake of memory (that would let me more time to react). Is there such king of setting that prevent a process to put more then 500MB of data in swap ? limits(1)? Thank you for your answer. Here is the result of limits: limits Resource limits (current): cputime infinity secs filesize infinity kB datasize 33554432 kB stacksize 524288 kB coredumpsize infinity kB memoryuseinfinity kB memorylocked infinity kB maxprocesses 5547 openfiles 11095 sbsize infinity bytes vmemoryuse infinity kB pseudo-terminals infinity swapuse infinity kB swapuse is set to unlimited, but stacksize is set to 512MB. Is it the stacksize setting that prevent my kernel to swap more then 512MB ? If so, are there any side effect of raising the stack (except exhaust the swap space on the system) to give me more time to react by restarting NFS or export/import Zpools for example in the case of NAMEI memory leak before the kernel crashes ? Thanks, Mickaël signature.asc Description: This is a digitally signed message part
Re: Swapped memory limited to about 500MB for a process ?
Mickaël Canévet cane...@embl.fr writes: On Tue, 2012-09-11 at 13:05 -0400, Lowell Gilbert wrote: Mickaël Canévet cane...@embl.fr writes: I was impacted by a memory leak that has been fixed by this patch: http://people.freebsd.org/~rmacklem/namei-leak.patch What I noticed when the server was paging is that it seems that only about 500MB of my 4GB swap partition was used before crashing. I was wondering why it didn't take the whole 4GB up to the crash of the server because of lake of memory (that would let me more time to react). Is there such king of setting that prevent a process to put more then 500MB of data in swap ? limits(1)? Thank you for your answer. Here is the result of limits: limits Resource limits (current): cputime infinity secs filesize infinity kB datasize 33554432 kB stacksize 524288 kB coredumpsize infinity kB memoryuseinfinity kB memorylocked infinity kB maxprocesses 5547 openfiles 11095 sbsize infinity bytes vmemoryuse infinity kB pseudo-terminals infinity swapuse infinity kB swapuse is set to unlimited, but stacksize is set to 512MB. Is it the stacksize setting that prevent my kernel to swap more then 512MB ? No, I don't think so. datasize was the parameter I was most suspecting; and it assumes that a particular process was causing the crash (which is unlikely; the OS is supposed to protect you against it). Most likely, the crash was not directly caused by a shortage of virtual memory. You would have to diagnose through crash dumps, but it could be that some more specific resource was exhausted. Or perhaps the memory leak left dangling references in a vnode. ___ 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: Swapped memory limited to about 500MB for a process ?
Mickaël Canévet cane...@embl.fr writes: On Tue, 2012-09-11 at 13:05 -0400, Lowell Gilbert wrote: Mickaël Canévet cane...@embl.fr writes: I was impacted by a memory leak that has been fixed by this patch: http://people.freebsd.org/~rmacklem/namei-leak.patch What I noticed when the server was paging is that it seems that only about 500MB of my 4GB swap partition was used before crashing. I was wondering why it didn't take the whole 4GB up to the crash of the server because of lake of memory (that would let me more time to react). Is there such king of setting that prevent a process to put more then 500MB of data in swap ? limits(1)? Thank you for your answer. Here is the result of limits: limits Resource limits (current): cputime infinity secs filesize infinity kB datasize 33554432 kB stacksize 524288 kB coredumpsize infinity kB memoryuseinfinity kB memorylocked infinity kB maxprocesses 5547 openfiles 11095 sbsize infinity bytes vmemoryuse infinity kB pseudo-terminals infinity swapuse infinity kB swapuse is set to unlimited, but stacksize is set to 512MB. Is it the stacksize setting that prevent my kernel to swap more then 512MB ? No, I don't think so. datasize was the parameter I was most suspecting; and it assumes that a particular process was causing the crash (which is unlikely; the OS is supposed to protect you against it). Most likely, the crash was not directly caused by a shortage of virtual memory. You would have to diagnose through crash dumps, but it could be that some more specific resource was exhausted. Or perhaps the memory leak left dangling references in a vnode. ___ 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: Swapped memory limited to about 500MB for a process ?
On Wed, 2012-09-12 at 10:03 -0400, Lowell Gilbert wrote: Mickaël Canévet cane...@embl.fr writes: On Tue, 2012-09-11 at 13:05 -0400, Lowell Gilbert wrote: Mickaël Canévet cane...@embl.fr writes: I was impacted by a memory leak that has been fixed by this patch: http://people.freebsd.org/~rmacklem/namei-leak.patch What I noticed when the server was paging is that it seems that only about 500MB of my 4GB swap partition was used before crashing. I was wondering why it didn't take the whole 4GB up to the crash of the server because of lake of memory (that would let me more time to react). Is there such king of setting that prevent a process to put more then 500MB of data in swap ? limits(1)? Thank you for your answer. Here is the result of limits: limits Resource limits (current): cputime infinity secs filesize infinity kB datasize 33554432 kB stacksize 524288 kB coredumpsize infinity kB memoryuseinfinity kB memorylocked infinity kB maxprocesses 5547 openfiles 11095 sbsize infinity bytes vmemoryuse infinity kB pseudo-terminals infinity swapuse infinity kB swapuse is set to unlimited, but stacksize is set to 512MB. Is it the stacksize setting that prevent my kernel to swap more then 512MB ? No, I don't think so. datasize was the parameter I was most suspecting; and it assumes that a particular process was causing the crash (which is unlikely; the OS is supposed to protect you against it). Most likely, the crash was not directly caused by a shortage of virtual memory. You would have to diagnose through crash dumps, but it could be that some more specific resource was exhausted. Or perhaps the memory leak left dangling references in a vnode. OK, Thanks a lot for your explanations. Cheers, Mickaël signature.asc Description: This is a digitally signed message part
Re: Swapped memory limited to about 500MB for a process ?
Mickaël Canévet cane...@embl.fr writes: I was impacted by a memory leak that has been fixed by this patch: http://people.freebsd.org/~rmacklem/namei-leak.patch What I noticed when the server was paging is that it seems that only about 500MB of my 4GB swap partition was used before crashing. I was wondering why it didn't take the whole 4GB up to the crash of the server because of lake of memory (that would let me more time to react). Is there such king of setting that prevent a process to put more then 500MB of data in swap ? limits(1)? ___ 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
Swapped memory limited to about 500MB for a process ?
Hello, I was impacted by a memory leak that has been fixed by this patch: http://people.freebsd.org/~rmacklem/namei-leak.patch What I noticed when the server was paging is that it seems that only about 500MB of my 4GB swap partition was used before crashing. I was wondering why it didn't take the whole 4GB up to the crash of the server because of lake of memory (that would let me more time to react). Is there such king of setting that prevent a process to put more then 500MB of data in swap ? Thanks in advance for your answers, Mickaël Canévet signature.asc Description: This is a digitally signed message part
Linux app shared memory problem
Trying to run a Linux app under 9-STABLE. I can start it once and stop it once but all subsequent efforts produces a core dump. I believe the reason being that this app stores licensing information in shared memory and when it stops first time it fails to remove this info. Is there a sysctl parameter that would be useful in a case like this? Thanks, ___ 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: Linux app shared memory problem
On 08/12/12 11:12, Per olof Ljungmark wrote: Trying to run a Linux app under 9-STABLE. I can start it once and stop it once but all subsequent efforts produces a core dump. I believe the reason being that this app stores licensing information in shared memory and when it stops first time it fails to remove this info. Is there a sysctl parameter that would be useful in a case like this? Additional info: linux_set_robust_list(0x2820c710,0xc,0x2808fff4,0x2820c6c0,0x0,0x6) = 0 (0x0) linux_sys_futex(0xcc90,0x81,0x1,0x2820c6c0,0x2808fff4,0x6) = 0 (0x0) linux_rt_sigaction(0x20,0xc948,0x0,0x8,0x2808fff4,0x6) = 0 (0x0) linux_rt_sigaction(0x21,0xc948,0x0,0x8,0x2808fff4,0x6) = 0 (0x0) linux_rt_sigprocmask(0x1,0xcbfc,0x0,0x8,0x2808fff4,0x6) = 0 (0x0) linux_getrlimit(0x3,0xcc84,0x28207ff4,0x10,0x1,0x6) = 0 (0x0) linux_newuname(0xc9f8,0x2820b400,0x2808fff4,0x0,0xc9f8,0x6) = 0 (0x0) linux_ipc(0x17,0x4f524553,0x1,0x3ff,0x0,0x6) = 65536 (0x1) linux_ipc(0x15,0x1,0x0,0xcbe8,0x0,0x6) = 0 (0x0) linux_ipc(0x2,0x4f726583,0x1,0x1ff,0x0,0x6) ERR#13 'Permission denied' linux_ipc(0x3,0x,0x0,0x10c,0xca68,0x6) ERR#22 'Invalid argument' linux_rt_sigaction(0xe,0xc9c8,0x0,0x8,0x2808fff4,0x6) = 0 (0x0) linux_alarm(0x14,0x0,0x80589d8,0xcb10,0xcb94,0x6) = 0 (0x0) linux_ipc(0x1,0x,0x1,0x0,0xcba0,0x6) ERR#22 'Invalid argument' linux_rt_sigaction(0xe,0xc9c8,0x0,0x8,0x2808fff4,0x6) = 0 (0x0) linux_alarm(0x0,0x0,0x80589d8,0x,0xcba0,0x6) = 20 (0x14) linux_ipc(0x3,0x,0x0,0x10c,0xca88,0x6) ERR#22 'Invalid argument' linux_rt_sigaction(0xe,0xc9e8,0x0,0x8,0x2808fff4,0x6) = 0 (0x0) linux_alarm(0x14,0x0,0x80589d8,0xcb30,0xcbb4,0x6) = 0 (0x0) linux_ipc(0x1,0x,0x1,0x0,0xcbc0,0x6) ERR#22 'Invalid argument' linux_rt_sigaction(0xe,0xc9e8,0x0,0x8,0x2808fff4,0x6) = 0 (0x0) linux_alarm(0x0,0x0,0x80589d8,0x,0xcbc0,0x6) = 20 (0x14) linux_fstat64(0x1,0xcaf4,0x28207ff4,0x282084c0,0x282084c0,0x6) = 0 (0x0) linux_mmap2(0x0,0x1000,0x3,0x22,0x,0x6) = 671576064 (0x28077000) Shared memory problem ___ 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: Apache FCGI in a a jail under FBSD 9 won't start due to shared memory creation error
On Aug 9, 2012, at 9:41 AM, Fbsd8 wrote: Chad Leigh Shire.Net LLC wrote: On Aug 7, 2012, at 10:31 AM, Mark Felder wrote: jail_sysvipc_allow=YES in rc.conf should do it. Hmm I added that and rebooted the jail host system. However, the setting in sysctl security.jail.sysvipc_allowed is still 0 after the reboot # sysctl -a | grep sysvipc security.jail.param.allow.sysvipc: 0 security.jail.sysvipc_allowed: 0 # I can set security.jail.sysvipc_allowed to 1 manually. However, even after doing that, the original fcgi problem happens when starting apache2.2 with mod_fcgid in the configuration and being loaded [Tue Aug 07 13:09:12 2012] [emerg] (78)Function not implemented: mod_fcgid: Can't create shared memory for size 1192488 bytes Thanks! Chad Since you manually installed apache22 and mod_fcgid from up-stream sources maybe you missed something. As a test create another jail and install the package versions of apache22 and mod_fcgid and see if that will start ok. If it does them you know you missed something in your hand job version. Hi Thanks for the suggestion. I don't think, however, that anything is missing with my from-source compilations. I have been running self-compiled apaches for 15 years and have also done mod_fcgid in the past as well without issue (but not inside a jail). I don't think it is a matter of sw missing, but of system parameters or similar.' Thanks Chad
Re: Apache FCGI in a a jail under FBSD 9 won't start due to shared memory creation error
Chad Leigh Shire.Net LLC wrote: On Aug 7, 2012, at 10:31 AM, Mark Felder wrote: jail_sysvipc_allow=YES in rc.conf should do it. Hmm I added that and rebooted the jail host system. However, the setting in sysctl security.jail.sysvipc_allowed is still 0 after the reboot # sysctl -a | grep sysvipc security.jail.param.allow.sysvipc: 0 security.jail.sysvipc_allowed: 0 # I can set security.jail.sysvipc_allowed to 1 manually. However, even after doing that, the original fcgi problem happens when starting apache2.2 with mod_fcgid in the configuration and being loaded [Tue Aug 07 13:09:12 2012] [emerg] (78)Function not implemented: mod_fcgid: Can't create shared memory for size 1192488 bytes Thanks! Chad Since you manually installed apache22 and mod_fcgid from up-stream sources maybe you missed something. As a test create another jail and install the package versions of apache22 and mod_fcgid and see if that will start ok. If it does them you know you missed something in your hand job version. ___ 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
Apache FCGI in a a jail under FBSD 9 won't start due to shared memory creation error
Hi. I'll try this again. I run systems using FreeBSD 9.0 FreeBSD utah.XXXcom 9.0-STABLE FreeBSD 9.0-STABLE #1: Wed Mar 21 15:22:14 MDT 2012 chad@underhill:/usr/obj/usr/src/sys/UNDERHILL-XEN amd64 and on those systems run a bunch of jails. I have Apache 2.2 built and running in the jail in question, and recently had need to add mod_fcgid to it. NOTE that the Apache and mod_fcgid were not installed through ports or packages. I download the source and build myself (for various reasons). Apache inside the Jail, with mod_fcgid enabled will not start: [Mon Jul 23 10:59:35 2012] [emerg] (78)Function not implemented: mod_fcgid: Can't create shared memory for size 1192488 bytes I did a search on this and found that I would probably need a system kernel parameter changed from 0 - 1 security.jail.sysvipc_allowed So I did that. (And restarted the jail). However, I still get the same error when trying to start apache. I noticed a similar parameter security.jail.param.allow.sysvipc but cannot change this at run time and did not find anything useful about what this parameter is for using a search engine. (As an aside, how would I change security.jail.sysvipc_allowed and also security.jail.param.allow.sysvipc at boot time? I added them both to /boot/loader.conf but they did not get changed at boot and I had to do the security.jail.sysvipc_allowed one again on the command line -- I have some vfs type kernel state variables set there and they stick) I would appreciate some help with getting things set up so that I can run apache with mod_fcgid under my Jails on FBSD 9. Thanks! Chad
Re: Apache FCGI in a a jail under FBSD 9 won't start due to shared memory creation error
jail_sysvipc_allow=YES in rc.conf should do it. ___ 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: Apache FCGI in a a jail under FBSD 9 won't start due to shared memory creation error
On Aug 7, 2012, at 10:31 AM, Mark Felder wrote: jail_sysvipc_allow=YES in rc.conf should do it. Hmm I added that and rebooted the jail host system. However, the setting in sysctl security.jail.sysvipc_allowed is still 0 after the reboot # sysctl -a | grep sysvipc security.jail.param.allow.sysvipc: 0 security.jail.sysvipc_allowed: 0 # I can set security.jail.sysvipc_allowed to 1 manually. However, even after doing that, the original fcgi problem happens when starting apache2.2 with mod_fcgid in the configuration and being loaded [Tue Aug 07 13:09:12 2012] [emerg] (78)Function not implemented: mod_fcgid: Can't create shared memory for size 1192488 bytes Thanks! Chad
Apache FCGI in a a jail under FBSD 9 won't start due to shared memory creation error
Hi I run systems using FreeBSD 9.0 FreeBSD utah.XXXcom 9.0-STABLE FreeBSD 9.0-STABLE #1: Wed Mar 21 15:22:14 MDT 2012 chad@underhill:/usr/obj/usr/src/sys/UNDERHILL-XEN amd64 and on those systems run a bunch of jails. I have Apache 2.2 built and running in the jail in question, and recently had need to add mod_fcgid to it. NOTE that the Apache and mod_fcgid were not installed through ports or packages. I download the source and build myself (for various reasons). Apache inside the Jail, with mod_fcgid enabled will not start: [Mon Jul 23 10:59:35 2012] [emerg] (78)Function not implemented: mod_fcgid: Can't create shared memory for size 1192488 bytes I did a search on this and found that I would probably need a system kernel parameter changed from 0 - 1 security.jail.sysvipc_allowed So I did that. (And restarted the jail). However, I still get the same error when trying to start apache. I noticed a similar parameter security.jail.param.allow.sysvipc but cannot change this at run time and did not find anything useful about what this parameter is for using a search engine. (As an aside, how would I change security.jail.sysvipc_allowed and also security.jail.param.allow.sysvipc at boot time? I added them both to /boot/loader.conf but they did not get changed at boot and I had to do the security.jail.sysvipc_allowed one again on the command line -- I have some vfs type kernel state variables set there and they stick) I would appreciate some help with getting things set up so that I can run apache with mod_fcgid under my Jails on FBSD 9. Thanks! Chad ___ 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: How can i decrease memory occupied by xorg ?
1083 root 1 210 99444K 11544K select 0 1:28 0.00% Xorg doesn't take much, only 11.5MB is resident ___ 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: How can i decrease memory occupied by xorg ?
On 4 July 2012 20:52, J B jb.1234a...@gmail.com wrote: It is in ports: http://www.freedesktop.org/wiki/Software/xrestop jb [10001 eitan@radar ~ ]%whereis xrestop xrestop: /usr/ports/x11/xrestop -- Eitan Adler ___ 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
How can i decrease memory occupied by xorg ?
An old i386 box has only 512M RAM. PID USERNAMETHR PRI NICE SIZERES STATE C TIME WCPU COMMAND ... 1121 sw2wolf 8 200 299M 128M uwait 1 5:22 0.59% opera 1083 root 1 210 99444K 11544K select 0 1:28 0.00% Xorg 1096 sw2wolf 1 200 25136K 2412K select 0 0:00 0.00% xterm 1101 sw2wolf 1 200 10948K 1576K pause 1 0:00 0.00% csh 1081 root 1 200 19448K 1564K wait0 0:00 0.00% slim 1124 sw2wolf 1 200 34376K 1496K select 1 0:00 0.00% gam_server 1086 sw2wolf 1 200 10992K 1136K select 1 0:00 0.00% dwm 1100 sw2wolf 1 200 10060K 1080K select 0 0:01 0.00% tmux 722 root 1 200 9612K 732K select 1 0:00 0.00% syslogd 1098 sw2wolf 1 520 10060K 672K select 0 0:00 0.00% tmux 965 root 1 200 9716K 660K select 0 0:05 0.00% moused ... Of course, opera is a big customer of RAM which i cannot decrease its memory usage. then can i descrease the xorg's resident memory ? Sincerely! - e^(π.i) + 1 = 0 -- View this message in context: http://freebsd.1045724.n5.nabble.com/How-can-i-decrease-memory-occupied-by-xorg-tp5724311.html Sent from the freebsd-questions mailing list archive at Nabble.com. ___ 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
How can i decrease memory occupied by xorg ?
It is in ports: http://www.freedesktop.org/wiki/Software/xrestop jb ___ 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: wired memory - again!
http://apple.stackexchange.com/questions/31801/what-is-in-wired-memory On Sat, Jun 09, 2012 at 09:21:35AM +0200, Wojciech Puchar wrote: top reports wired memory 128MB WHERE it is used? below results of vmstat -m and vmstat -z values does not sum up even to half of it FreeBSD 9 - few days old. ___ freebsd-hack...@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org -- Colin Barnabas ___ 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: FreeBSD vice OS X memory management
does OS X kernel share any code with FreeBSD kernel's memory management subsystem ? IMHO no. OSX is somehow-microkernel based, they did take things from FreeBSD but not this IMHO. anyway - who cares Something is deeply broken in OS X memory management http://workstuff.tumblr.com/post/20464780085/something-is-deeply-broken-in-os-x- memory-management One of the problems that caught my eyes was inactive memory reclamation. I remember some time ago there was a thread here with similar topic. http://lists.freebsd.org/pipermail/freebsd-questions/2012-March/239121.html jb ___ 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 ___ 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: FreeBSD vice OS X memory management
most importantly networking but certainly not memory subsystem. On Wed, 25 Apr 2012, Chuck Swiger wrote: On Apr 25, 2012, at 5:31 AM, jb wrote: does OS X kernel share any code with FreeBSD kernel's memory management subsystem ? The simple answer is no. A more complex answer: % grep -ri freebsd xnu-1699.24.23 | wc -l 520 % grep -ril freebsd xnu-1699.24.23 | sort | uniq ___ 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: FreeBSD vice OS X memory management
2) Inactive memory (which is memory that has been recently used but is no longer) is supposed to be seamlessly reclaimed automatically by the OS when needed for new programs. In practice, I?ve found that this isn?t the case, and my system slows to a crawl and starts paging out to disk when free memory drops to zero, even as half of the available RAM (which is a lot) is marked as inactive. ... Well, this is not a case of a BSD is dying troll (you can safely ignore those). yes it is, just search a bit to know what inactive memory in FreeBSD is. ___ 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: FreeBSD vice OS X memory management
If you really are having a problem with FreeBSD you are going to have to do a lot better than this in terms of providing some data points which define the problem. I am in agreement with Adam here: either you can work the problem or you can troll. I don't see any indication yet of any real problem analysis, only a wild mix of stuff non-related to FreeBSD sprinkled with some magic 'memory management' dust. The fact that FreeBSD DOES NOT page excessively on the same workload relative to other OS (linux, netbsd) is one of most important thing i decided to use it. If his system is heavily paging then simply he have too large working set. ___ 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: FreeBSD vice OS X memory management
is relatively new. My guess is that if there is a problem it's ZFS specific. If it were a more general problem I think we'd see a lot more complaints, whereas ZFS already has a reputation for needing lots of memory. you may precisely set up a limits of memory that ZFS would use at most. or just don't use it which i do. ___ 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: FreeBSD vice OS X memory management
Wojciech Puchar wojtek at wojtek.tensor.gdynia.pl writes: 2) Inactive memory (which is memory that has been recently used but is no longer) is supposed to be seamlessly reclaimed automatically by the OS when needed for new programs. In practice, I?ve found that this isn?t the case, and my system slows to a crawl and starts paging out to disk when free memory drops to zero, even as half of the available RAM (which is a lot) is marked as inactive. ... Well, this is not a case of a BSD is dying troll (you can safely ignore those). yes it is, just search a bit to know what inactive memory in FreeBSD is. His description (the quoted text) is at least of intuitive nature, and in fact in may be correct as it referrs to OS X MM subsys, which may be based on least-recently used pageout algorithm (as FreeBSD originally used to be too). jb ___ 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: FreeBSD vice OS X memory management
Wojciech Puchar wojtek at wojtek.tensor.gdynia.pl writes: does OS X kernel share any code with FreeBSD kernel's memory management subsystem ? IMHO no. OSX is somehow-microkernel based, they did take things from FreeBSD but not this IMHO. anyway - who cares Well, I quoted the source in my 2nd post in this thread. But I will repeat it once again: I'm quite sure that the memory manager of OSX wasn't derived from BSD, but from Mach. Actually, FreeBSD has adapted that memory manager, so it's rather the other way around If so, both OS X and FreeBSD share the same MM subsys base. jb ___ 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: FreeBSD vice OS X memory management
On Thu, Apr 26, 2012 at 12:04 AM, jb jb.1234a...@gmail.com wrote: If so, should FreeBSD adopt NetBSD's MM subsys, or just improve itself surgically ? You ought first establish there is a problem. What you have cited is recently reinvigorated trend that has taken on the air of the BDS is dying troll. What you have is a set of computer users with no understanding of kernel internals attempting to diagnose some sort of possibly legitimate problem by reaching conclusion via rumor and guesswork. These people can be taken about as seriously as those who insist the moon landing was fake and other bizarre ignorant pseudo-science. http://workstuff.tumblr.com/post/19036310553/two-things-that-really-helped-speed-up-my-mac-and http://dywypi.org/2012/02/back-on-linux.html When you have a test case illustrating your feared FreeBSD VM shortcomings, you may at that point begin to attract developer interest. -- 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: FreeBSD vice OS X memory management
Adam Vande More amvandemore at gmail.com writes: ... http://workstuff.tumblr.com/post/19036310553/two-things-that-really-helped- speed-up-my-mac-and http://dywypi.org/2012/02/back-on-linux.html 2) Inactive memory (which is memory that has been recently used but is no longer) is supposed to be seamlessly reclaimed automatically by the OS when needed for new programs. In practice, I’ve found that this isn’t the case, and my system slows to a crawl and starts paging out to disk when free memory drops to zero, even as half of the available RAM (which is a lot) is marked as inactive. ... Well, this is not a case of a BSD is dying troll (you can safely ignore those). The above and the past FreeBSD thread here, both I referred to, have something in common - the system seems to progressively come under stress due to what one user experienced as missing memory, and other two users experienced (as shown here above) as inefficient (or lack of) early reclamation of inactive pages. We just want the devs and users make aware of things. jb ___ 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: FreeBSD vice OS X memory management
Adam Vande More wrote: On Thu, Apr 26, 2012 at 12:04 AM, jb jb.1234a...@gmail.com wrote: If so, should FreeBSD adopt NetBSD's MM subsys, or just improve itself surgically ? You ought first establish there is a problem. What you have cited is recently reinvigorated trend that has taken on the air of the BDS is dying troll. What you have is a set of computer users with no understanding of kernel internals attempting to diagnose some sort of possibly legitimate problem by reaching conclusion via rumor and guesswork. These people can be taken about as seriously as those who insist the moon landing was fake and other bizarre ignorant pseudo-science. http://workstuff.tumblr.com/post/19036310553/two-things-that-really-helped- speed-up-my-mac-and http://dywypi.org/2012/02/back-on-linux.html When you have a test case illustrating your feared FreeBSD VM shortcomings, you may at that point begin to attract developer interest. To the OP: A potential first test case where the symptom is my system slows to a crawl and starts paging out to disk might be to build a kernel with the SCHED_4BSD scheduler. There have been a couple of edge/corner cases that sound like this. That is, if you really have a problem and want to try eliminating one possibility. Another thing that shows up in things like top is it breaks and does not report accurate values for anything when userland and kernel are out of sync, that is if it runs at all without segfaulting. World and kernel being out of sync would be operator error. In this case the values you are using to somehow relate the symptom to memory management would be false. As far as all the rest, such as something being deeply broken in OS X memory management, mentions of NetBSD memory management, etc, are all irrelevant. It is this wild mix of stuff seemingly non-related to any problem in FreeBSD per se, that makes this look like a troll. If you really are having a problem with FreeBSD you are going to have to do a lot better than this in terms of providing some data points which define the problem. I am in agreement with Adam here: either you can work the problem or you can troll. I don't see any indication yet of any real problem analysis, only a wild mix of stuff non-related to FreeBSD sprinkled with some magic 'memory management' dust. Sorry if this comes across the wrong way, but this really looks like troll material to me too - it has a great resemblance to a pattern trolls have used for many years. -Mike ___ 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: FreeBSD vice OS X memory management
On Thu, 26 Apr 2012 08:32:39 + (UTC) jb wrote: Adam Vande More amvandemore at gmail.com writes: ... http://workstuff.tumblr.com/post/19036310553/two-things-that-really-helped- speed-up-my-mac-and http://dywypi.org/2012/02/back-on-linux.html 2) Inactive memory (which is memory that has been recently used but is no longer) is supposed to be seamlessly reclaimed automatically by the OS when needed for new programs. In practice, I’ve found that this isn’t the case, and my system slows to a crawl and starts paging out to disk when free memory drops to zero, even as half of the available RAM (which is a lot) is marked as inactive. ... That's not a good description of inactive memory, most of which contains useful data. The situation described is undesirable, but not abnormal. It can happen when your physical memory is spread thinly, but most of it isn't being frequently accessed. In that case the inactive queue can be dominated by dirty swap-backed pages. The above and the past FreeBSD thread here, both I referred to, have something in common - the system seems to progressively come under stress due to what one user experienced as missing memory, The FreeBSD link involved ZFS which manages its own disk caching and is relatively new. My guess is that if there is a problem it's ZFS specific. If it were a more general problem I think we'd see a lot more complaints, whereas ZFS already has a reputation for needing lots of memory. ___ 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: FreeBSD vice OS X memory management
RW rwmaillists at googlemail.com writes: ... ... 2) Inactive memory (which is memory that has been recently used but is no longer) is supposed to be seamlessly reclaimed automatically by the OS when needed for new programs. In practice, I’ve found that this isn’t the case, and my system slows to a crawl and starts paging out to disk when free memory drops to zero, even as half of the available RAM (which is a lot) is marked as inactive. ... That's not a good description of inactive memory, most of which contains useful data. The situation described is undesirable, but not abnormal. It can happen when your physical memory is spread thinly, but most of it isn't being frequently accessed. In that case the inactive queue can be dominated by dirty swap-backed pages. ... Would implementing the VM pageout algorithm in such a way that it would mix in equal proportion the current least-actively used algo and the old least-recently used algo help the situation ? jb ___ 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
FreeBSD vice OS X memory management
Hi, does OS X kernel share any code with FreeBSD kernel's memory management subsystem ? Something is deeply broken in OS X memory management http://workstuff.tumblr.com/post/20464780085/something-is-deeply-broken-in-os-x- memory-management One of the problems that caught my eyes was inactive memory reclamation. I remember some time ago there was a thread here with similar topic. http://lists.freebsd.org/pipermail/freebsd-questions/2012-March/239121.html jb ___ 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: FreeBSD vice OS X memory management
On Apr 25, 2012, at 5:31 AM, jb wrote: does OS X kernel share any code with FreeBSD kernel's memory management subsystem ? The simple answer is no. A more complex answer: % grep -ri freebsd xnu-1699.24.23 | wc -l 520 % grep -ril freebsd xnu-1699.24.23 | sort | uniq % grep -ril freebsd xnu-1699.24.23 | sort | uniq ~/Downloads xnu-1699.24.23/EXTERNAL_HEADERS/stdbool.h xnu-1699.24.23/bsd/bsm/audit.h xnu-1699.24.23/bsd/bsm/audit_domain.h xnu-1699.24.23/bsd/bsm/audit_errno.h xnu-1699.24.23/bsd/bsm/audit_fcntl.h xnu-1699.24.23/bsd/bsm/audit_kevents.h xnu-1699.24.23/bsd/crypto/aes/gen/aesopt.h xnu-1699.24.23/bsd/crypto/blowfish/bf_enc.c xnu-1699.24.23/bsd/crypto/blowfish/bf_locl.h xnu-1699.24.23/bsd/crypto/blowfish/bf_pi.h xnu-1699.24.23/bsd/crypto/blowfish/bf_skey.c xnu-1699.24.23/bsd/crypto/blowfish/blowfish.h xnu-1699.24.23/bsd/crypto/cast128/cast128.c xnu-1699.24.23/bsd/crypto/cast128/cast128.h xnu-1699.24.23/bsd/crypto/cast128/cast128_subkey.h xnu-1699.24.23/bsd/crypto/des/des.h xnu-1699.24.23/bsd/crypto/des/des_ecb.c xnu-1699.24.23/bsd/crypto/des/des_enc.c xnu-1699.24.23/bsd/crypto/des/des_locl.h xnu-1699.24.23/bsd/crypto/des/des_setkey.c xnu-1699.24.23/bsd/crypto/des/podd.h xnu-1699.24.23/bsd/crypto/des/sk.h xnu-1699.24.23/bsd/crypto/des/spr.h xnu-1699.24.23/bsd/crypto/rc4/rc4.c xnu-1699.24.23/bsd/crypto/rc4/rc4.h xnu-1699.24.23/bsd/crypto/sha2/sha2.c xnu-1699.24.23/bsd/crypto/sha2/sha2.h xnu-1699.24.23/bsd/dev/dtrace/blist.c xnu-1699.24.23/bsd/dev/dtrace/blist.h xnu-1699.24.23/bsd/dev/memdev.c xnu-1699.24.23/bsd/dev/vn/vn.c xnu-1699.24.23/bsd/hfs/hfs_lookup.c xnu-1699.24.23/bsd/hfs/hfscommon/headers/RedBlackTree.h xnu-1699.24.23/bsd/kern/kern_event.c xnu-1699.24.23/bsd/kern/kern_mib.c xnu-1699.24.23/bsd/kern/kern_newsysctl.c xnu-1699.24.23/bsd/kern/kern_resource.c xnu-1699.24.23/bsd/kern/makesyscalls.sh xnu-1699.24.23/bsd/kern/sys_pipe.c xnu-1699.24.23/bsd/kern/syscalls.master xnu-1699.24.23/bsd/kern/tty.c xnu-1699.24.23/bsd/kern/uipc_socket.c xnu-1699.24.23/bsd/kern/uipc_socket2.c xnu-1699.24.23/bsd/libkern/strsep.c xnu-1699.24.23/bsd/man/man2/aio_cancel.2 xnu-1699.24.23/bsd/man/man2/aio_error.2 xnu-1699.24.23/bsd/man/man2/aio_read.2 xnu-1699.24.23/bsd/man/man2/aio_return.2 xnu-1699.24.23/bsd/man/man2/aio_suspend.2 xnu-1699.24.23/bsd/man/man2/aio_write.2 xnu-1699.24.23/bsd/man/man2/audit.2 xnu-1699.24.23/bsd/man/man2/auditctl.2 xnu-1699.24.23/bsd/man/man2/auditon.2 xnu-1699.24.23/bsd/man/man2/getaudit.2 xnu-1699.24.23/bsd/man/man2/getauid.2 xnu-1699.24.23/bsd/man/man2/getdtablesize.2 xnu-1699.24.23/bsd/man/man2/getlcid.2 xnu-1699.24.23/bsd/man/man2/getpgrp.2 xnu-1699.24.23/bsd/man/man2/getsid.2 xnu-1699.24.23/bsd/man/man2/i386_get_ldt.2 xnu-1699.24.23/bsd/man/man2/issetugid.2 xnu-1699.24.23/bsd/man/man2/kqueue.2 xnu-1699.24.23/bsd/man/man2/mmap.2 xnu-1699.24.23/bsd/man/man2/mprotect.2 xnu-1699.24.23/bsd/man/man2/msync.2 xnu-1699.24.23/bsd/man/man2/read.2 xnu-1699.24.23/bsd/man/man2/semctl.2 xnu-1699.24.23/bsd/man/man2/semget.2 xnu-1699.24.23/bsd/man/man2/semop.2 xnu-1699.24.23/bsd/man/man2/sendfile.2 xnu-1699.24.23/bsd/man/man2/setaudit.2 xnu-1699.24.23/bsd/man/man2/setauid.2 xnu-1699.24.23/bsd/man/man2/setlcid.2 xnu-1699.24.23/bsd/man/man2/setregid.2 xnu-1699.24.23/bsd/man/man2/setreuid.2 xnu-1699.24.23/bsd/man/man2/sigaction.2 xnu-1699.24.23/bsd/man/man2/undelete.2 xnu-1699.24.23/bsd/man/man2/utimes.2 xnu-1699.24.23/bsd/man/man2/write.2 xnu-1699.24.23/bsd/man/man3/queue.3 xnu-1699.24.23/bsd/man/man4/aio.4 xnu-1699.24.23/bsd/man/man4/audit.4 xnu-1699.24.23/bsd/man/man4/auditpipe.4 xnu-1699.24.23/bsd/man/man4/bpf.4 xnu-1699.24.23/bsd/man/man4/divert.4 xnu-1699.24.23/bsd/man/man4/dummynet.4 xnu-1699.24.23/bsd/man/man4/faith.4 xnu-1699.24.23/bsd/man/man4/gif.4 xnu-1699.24.23/bsd/man/man4/ifmib.4 xnu-1699.24.23/bsd/man/man4/inet6.4 xnu-1699.24.23/bsd/man/man4/ipfirewall.4 xnu-1699.24.23/bsd/man/man4/ipsec.4 xnu-1699.24.23/bsd/man/man4/stf.4 xnu-1699.24.23/bsd/man/man4/tty.4 xnu-1699.24.23/bsd/man/man9/copy.9 xnu-1699.24.23/bsd/man/man9/fetch.9 xnu-1699.24.23/bsd/man/man9/intro.9 xnu-1699.24.23/bsd/man/man9/store.9 xnu-1699.24.23/bsd/man/man9/style.9 xnu-1699.24.23/bsd/miscfs/devfs/README xnu-1699.24.23/bsd/miscfs/devfs/devfs.h xnu-1699.24.23/bsd/miscfs/devfs/devfs_tree.c xnu-1699.24.23/bsd/miscfs/devfs/devfs_vfsops.c xnu-1699.24.23/bsd/miscfs/devfs/devfs_vnops.c xnu-1699.24.23/bsd/miscfs/devfs/devfsdefs.h xnu-1699.24.23/bsd/net/bpf.c xnu-1699.24.23/bsd/net/bpf.h xnu-1699.24.23/bsd/net/bpf_compat.h xnu-1699.24.23/bsd/net/bpf_filter.c xnu-1699.24.23/bsd/net/bpfdesc.h xnu-1699.24.23/bsd/net/bridgestp.c xnu-1699.24.23/bsd/net/bridgestp.h xnu-1699.24.23/bsd/net/if.c xnu-1699.24.23/bsd/net/if.h xnu-1699.24.23/bsd/net/if_arp.h xnu-1699.24.23/bsd/net/if_bridge.c xnu-1699.24.23/bsd/net/if_bridgevar.h xnu-1699.24.23/bsd/net/if_dl.h xnu-1699.24.23/bsd/net/if_gif.c xnu-1699.24.23/bsd/net/if_loop.c xnu-1699.24.23/bsd/net
Re: FreeBSD vice OS X memory management
Chuck Swiger cswiger at mac.com writes: On Apr 25, 2012, at 5:31 AM, jb wrote: does OS X kernel share any code with FreeBSD kernel's memory management subsystem ? The simple answer is no. A more complex answer: % grep -ri freebsd xnu-1699.24.23 | wc -l 520 % grep -ril freebsd xnu-1699.24.23 | sort | uniq % grep -ril freebsd xnu-1699.24.23 | sort | uniq ~/Downloads xnu-1699.24.23/EXTERNAL_HEADERS/stdbool.h xnu-1699.24.23/bsd/bsm/audit.h ... Right, MM subsys is not part of BSD import. But XNU kernel is a combo of Mach and old BSD kernel parts. There was some discussion here: http://www.osnews.com/comments/25861 where two comments are of interest: I'm quite sure that the memory manager of OSX wasn't derived from BSD, but from Mach. Actually, FreeBSD has adapted that memory manager, so it's rather the other way around. But Apple might learn from the way FreeBSD does things. If it is feasible, as the kernel is quite different. The related implementation in FreeBSD seems to have a similar problem: NetBSD users have also reported that UVM’s im- provements have had a positive effect on their applica- tions. This is most noticeable when physical memory becomes scarce and the VM system must page out data to free up memory. Under BSD VM this type of paging causes the system to become highly unresponsive, while under UVM the system slows while paging but does not become unresponsive. http://static.usenix.org/event/usenix99/full_papers/cranor/cranor.p... Should be easy to fix: just start to page out some stuff in time before there is no memory left. When I browsed the USENIX paper (dated 1999) I understood that it is indeed possible that FreeBSD may have imported some Mach's MM code in those early BSD VM days. And over time since then some ideas (if not exact code) may have migrated between OS X and FreeBSD MM subsystems. If so, the problems experienced may be similar or identical even today. jb ___ 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: FreeBSD vice OS X memory management
jb jb.1234abcd at gmail.com writes: ... The related implementation in FreeBSD seems to have a similar problem: NetBSD users have also reported that UVM’s im- provements have had a positive effect on their applica- tions. This is most noticeable when physical memory becomes scarce and the VM system must page out data to free up memory. Under BSD VM this type of paging causes the system to become highly unresponsive, while under UVM the system slows while paging but does not become unresponsive. http://static.usenix.org/event/usenix99/full_papers/cranor/cranor.p... Should be easy to fix: just start to page out some stuff in time before there is no memory left. ... Would this mean that FreeBSD's (and Mach's ?) MM subsys are behind NetBSD's ? If so, should FreeBSD adopt NetBSD's MM subsys, or just improve itself surgically ? jb ___ 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: FreeBSD 8.2 - active plus inactive memory leak!?
On Wed, 2012-03-07 at 10:23 +0200, Konstantin Belousov wrote: On Wed, Mar 07, 2012 at 12:36:21AM +, Luke Marsden wrote: I'm trying to confirm that, on a system with no pages swapped out, that the following is a true statement: a page is accounted for in active + inactive if and only if it corresponds to one or more of the pages accounted for in the resident memory lists of all the processes on the system (as per the output of 'top' and 'ps') No. The pages belonging to vnode vm object can be active or inactive or cached but not mapped into any process address space. Thank you, Konstantin. Does the number of vnodes we've got open on this machine (272011) fully explain away the memory gap? Memory gap: 11264M active + 2598M inactive - 9297M sum-of-resident = 4565M Active vnodes: vfs.numvnodes: 272011 That gives a lower bound at 17.18Kb per vode (or higher if we take into account shared libs, etc); that seems a bit high for a vnode vm object doesn't it? If that doesn't fully explain it, what else might be chewing through active memory? Also, when are vnodes freed? This system does have some tuning... kern.maxfiles: 100 vm.pmap.pv_entry_max: 73296250 Could that be contributing to so much active + inactive memory (5GB+ more than expected), or do PV entries live in wired e.g. kernel memory? On Tue, 2012-03-06 at 17:48 -0700, Ian Lepore wrote: In my experience, the bulk of the memory in the inactive category is cached disk blocks, at least for ufs (I think zfs does things differently). On this desktop machine I have 12G physical and typically have roughly 11G inactive, and I can unmount one particular filesystem where most of my work is done and instantly I have almost no inactive and roughly 11G free. Okay, so this could be UFS disk cache, except the system is ZFS-on-root with no UFS filesystems active or mounted. Can I confirm that no double-caching of ZFS data is happening in active + inactive (+ cache) memory? Thanks, Luke -- CTO, Hybrid Logic +447791750420 | +1-415-449-1165 | www.hybrid-cluster.com ___ 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: FreeBSD 8.2 - active plus inactive memory leak!?
On Wed, 07 Mar 2012 10:23:38 +0200, Konstantin Belousov wrote: On Wed, Mar 07, 2012 at 12:36:21AM +, Luke Marsden wrote: ... I'm trying to confirm that, on a system with no pages swapped out, that the following is a true statement: a page is accounted for in active + inactive if and only if it corresponds to one or more of the pages accounted for in the resident memory lists of all the processes on the system (as per the output of 'top' and 'ps') No. The pages belonging to vnode vm object can be active or inactive or cached but not mapped into any process address space. I wonder if some ideas by Denys Vlasenko contained in this thread http://comments.gmane.org/gmane.linux.redhat.fedora.devel/157706 would be useful ? ... Today, I'm looking at my process list, sorted by amount of dirtied pages (which very closely matches amount of malloced and used space - that is, malloced, but not-written to memory areas are not included). This is the most expensive type of pages, they can't be discarded. If we would be in memory squeeze, kernel will have to swap them out, if swap exists, otherwise kernel can't do anything at all. ... Note that any shared pages (such as glibc) are not freed this way; also, non-mapped pages (such as large, but unused malloced space, or large, but unused file mappings) also do not contribute to MemFree increase. jb ___ 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: FreeBSD 8.2 - active plus inactive memory leak!?
On Wed, 2012-03-07 at 13:33 +0100, J B wrote: On Wed, 07 Mar 2012 10:23:38 +0200, Konstantin Belousov wrote: On Wed, Mar 07, 2012 at 12:36:21AM +, Luke Marsden wrote: ... I'm trying to confirm that, on a system with no pages swapped out, that the following is a true statement: a page is accounted for in active + inactive if and only if it corresponds to one or more of the pages accounted for in the resident memory lists of all the processes on the system (as per the output of 'top' and 'ps') No. The pages belonging to vnode vm object can be active or inactive or cached but not mapped into any process address space. I wonder if some ideas by Denys Vlasenko contained in this thread http://comments.gmane.org/gmane.linux.redhat.fedora.devel/157706 would be useful ? https://github.com/pixelb/scripts/blob/master/scripts/ps_mem.py This looks like a really useful script, and looks like it works under FreeBSD with linprocfs. Good find! Cheers, Luke ... Today, I'm looking at my process list, sorted by amount of dirtied pages (which very closely matches amount of malloced and used space - that is, malloced, but not-written to memory areas are not included). This is the most expensive type of pages, they can't be discarded. If we would be in memory squeeze, kernel will have to swap them out, if swap exists, otherwise kernel can't do anything at all. ... Note that any shared pages (such as glibc) are not freed this way; also, non-mapped pages (such as large, but unused malloced space, or large, but unused file mappings) also do not contribute to MemFree increase. jb -- CTO, Hybrid Logic +447791750420 | +1-415-449-1165 | www.hybrid-cluster.com ___ 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: FreeBSD 8.2 - active plus inactive memory leak!?
On 3/6/2012 2:13 PM, Luke Marsden wrote: [ ... ] My current (probably quite simplistic) understanding of the FreeBSD virtual memory system is that, for each process as reported by top: * Size corresponds to the total size of all the text pages for the process (those belonging to code in the binary itself and linked libraries) plus data pages (including stack and malloc()'d but not-yet-written-to memory segments). Size is the amount of the processes' VM address space which has been assigned; the various things you mention indeed are the common things which consume address space, but there are others like shared memory (ie, SysV shmem stuff), memory-mapped hardware like a video card VRAM buffer, thread-local storage, etc. * Resident corresponds to a subset of the pages above: those pages which actually occupy physical/core memory. Notably pages may appear in size but not appear in resident for read-only text pages from libraries which have not been used yet or which have been malloc()'d but not yet written-to. Yes. My understanding for the values for the system as a whole (at the top in 'top') is as follows: * Active / inactive memory is the same thing: resident memory from processes in use. Being in the inactive as opposed to active list simply indicates that the pages in question are less recently used and therefore more likely to get swapped out if the machine comes under memory pressure. Well, they aren't exactly the same thing. The kernel implements a VM working set algorithm which periodically looks at all of the pages that are in memory and notes whether a process has accessed that page recently. If it has, the page is active; if the page has not been used for some time, it becomes inactive. If the system has plenty of memory, it will not page or swap anything out. If it is under mild memory pressure, it will only consider pages which are inactive or cache as candidates for which it might page them out. Only under more severe memory pressure will it start looking to swap out entire processes rather than just page individual pages out. [ Although, the FreeBSD implementation supposedly will try to balance the size of the active, inactive, and cache lists (or queues), so it is looking at the active list also-- but you don't want to page out an active page unless you really have to, and if you have to do that, maybe you might as well free up the whole process and let something have enough room to run. ] * Wired is mostly kernel memory. It's normally all kernel memory; only a rare handful of userland programs such as crypto code like gnupg ever ask for wired memory, AFAIK. * Cache is freed memory which the kernel has decided to keep in case it correspond to a useful page in future; it can be cheaply evicted into the free list. Sort of, although this description fits the inactive memory category also. The major distinction is that the system is actively trying to flush any dirty pages in the cache category, so that they are available for reuse by something else immediately. * Free memory is actually not being used for anything. Yes, although the system likes to have at least a few pre-zeroed pages handy in case an interrupt handler needs them. It seems that pages which occur in the active + inactive lists must occur in the resident memory of one or more processes (or more since processes can share pages in e.g. read-only shared libs or COW forked address space). Everything in the active and inactive (and cache) lists are resident in physical memory. Conversely, if a page *does not* occur in the resident memory of any process, it must not occupy any space in the active + inactive lists. Hmm...if a process gets swapped out entirely, the pages for it will be moved to the cache list, flushed, and then reused as soon as the disk I/O completes. But there is a window where the process can be marked as swapped out (and considered no longer resident), but still has some of it's pages in physical memory. Therefore the active + inactive memory should always be less than or equal to the sum of the resident memory of all the processes on the system, right? No. If you've got a lot of process pages shared (ie, a webserver with lots of httpd children, or a database pulling in a large common shmem area), then your process resident sizes can be very large compared to the system-wide active+inactive count. This missing memory is scary, because it seems to be increasing over time, and eventually when the system runs out of free memory, I'm certain it will crash in the same way described in my previous thread [1]. I don't have enough data to fully evaluate the interactions with ZFS; you can easily get system panics by running out of KVA on a 32-bit system, but that shouldn't apply
Re: FreeBSD 8.2 - active plus inactive memory leak!?
Thanks for your email, Chuck. Conversely, if a page *does not* occur in the resident memory of any process, it must not occupy any space in the active + inactive lists. Hmm...if a process gets swapped out entirely, the pages for it will be moved to the cache list, flushed, and then reused as soon as the disk I/O completes. But there is a window where the process can be marked as swapped out (and considered no longer resident), but still has some of it's pages in physical memory. There's no swapping happening on these machines (intentionally so, because as soon as we hit swap everything goes tits up), so this window doesn't concern me. I'm trying to confirm that, on a system with no pages swapped out, that the following is a true statement: a page is accounted for in active + inactive if and only if it corresponds to one or more of the pages accounted for in the resident memory lists of all the processes on the system (as per the output of 'top' and 'ps') Therefore the active + inactive memory should always be less than or equal to the sum of the resident memory of all the processes on the system, right? No. If you've got a lot of process pages shared (ie, a webserver with lots of httpd children, or a database pulling in a large common shmem area), then your process resident sizes can be very large compared to the system-wide active+inactive count. But that's what I'm saying... sum(process resident sizes) = active + inactive Or as I said it above, equivalently: active + inactive = sum(process resident sizes) The data I've got from this system, and what's killing us, shows the opposite: active + inactive sum(process resident sizes) - by over 5GB now and growing, which is what keeps causing these machines to crash. In particular: Mem: 13G Active, 1129M Inact, 7543M Wired, 120M Cache, 1553M Free But the total sum of resident memories is 9457M (according to summing the output from ps or top). 13G + 1129M = 14441M (active + inact) 9457M (sum of res) That's 4984M out, and that's almost enough to push us over the edge. If my understanding of VM is correct, I don't see how this can happen. But it's happening, and it's causing real trouble here because our free memory keeps hitting zero and then we swap-spiral. What can I do to investigate this discrepancy? Are there some tools that I can use to debug the memory allocated in active to find out where it's going, if not to resident process memory? Thanks, Luke -- CTO, Hybrid Logic +447791750420 | +1-415-449-1165 | www.hybrid-cluster.com ___ 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: FreeBSD 8.2 - active plus inactive memory leak!?
On Tue, 06 Mar 2012 18:30:07 -0500 Chuck Swiger wrote: On 3/6/2012 2:13 PM, Luke Marsden wrote: * Resident corresponds to a subset of the pages above: those pages which actually occupy physical/core memory. Notably pages may appear in size but not appear in resident for read-only text pages from libraries which have not been used yet or which have been malloc()'d but not yet written-to. Yes. My understanding for the values for the system as a whole (at the top in 'top') is as follows: * Active / inactive memory is the same thing: resident memory from processes in use. Being in the inactive as opposed to active list simply indicates that the pages in question are less recently used and therefore more likely to get swapped out if the machine comes under memory pressure. Well, they aren't exactly the same thing. The kernel implements a VM working set algorithm which periodically looks at all of the pages that are in memory and notes whether a process has accessed that page recently. If it has, the page is active; if the page has not been used for some time, it becomes inactive. I think the previous poster has it about right, it's mostly about lifecycle. The inactive queue contains a mixture of resident and non-resident memory. It's commonly dominated by disk cache pages, and consequently is easily blown away by recursive greps etc. * Cache is freed memory which the kernel has decided to keep in case it correspond to a useful page in future; it can be cheaply evicted into the free list. Sort of, although this description fits the inactive memory category also. The major distinction is that the system is actively trying to flush any dirty pages in the cache category, so that they are available for reuse by something else immediately. Only clean pages are added to cache. A dirty page will go twice around the inactive queue as dirty, get flushed and then do a third pass as a clean page. The point of cache is that it's a small stock of memory that's available for immediate reuse, the pages have nothing else in common. On Wed, 07 Mar 2012 00:36:21 + Luke Marsden wrote: But that's what I'm saying... sum(process resident sizes) = active + inactive Inactive memory contains disc cache. ___ 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
issue with limiting java's memory usage
hi there, maybe i'm missing something obvious, but i don't quite understand the following top(1) output: last pid: 13875; load averages: 0.73, 0.75, 0.68 65 processes: 2 running, 62 sleeping, 1 waiting CPU 0: 19.5% user, 0.0% nice, 13.3% system, 0.0% interrupt, 67.2% idle CPU 1: 20.3% user, 0.0% nice, 7.8% system, 0.0% interrupt, 71.9% idle Mem: 1365M Active, 185M Inact, 323M Wired, 69M Cache, 213M Buf, 32M Free Swap: 10G Total, 2494M Used, 7746M Free, 24% Inuse, 4K In PIDUIDTHR PRI NICE SIZERES STATE C TIME WCPU COMMAND 6913 1001 32 200 4252M 1312M uwait 0 18.3H 39.06% /usr/local/diablo-jdk1.6.0/bin/java -Xmx512m -jar JDownloade ...how can the size of the resident memory of pid 6913 be 512 megabytes? this is wth a very recent HEAD on amd64. cheers. alex ___ 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: issue with limiting java's memory usage
Le Sun, 29 Jan 2012 19:34:11 +, Alexander Best arun...@freebsd.org a écrit : hi there, Hello, maybe i'm missing something obvious, but i don't quite understand the following top(1) output: last pid: 13875; load averages: 0.73, 0.75, 0.68 65 processes: 2 running, 62 sleeping, 1 waiting CPU 0: 19.5% user, 0.0% nice, 13.3% system, 0.0% interrupt, 67.2% idle CPU 1: 20.3% user, 0.0% nice, 7.8% system, 0.0% interrupt, 71.9% idle Mem: 1365M Active, 185M Inact, 323M Wired, 69M Cache, 213M Buf, 32M Free Swap: 10G Total, 2494M Used, 7746M Free, 24% Inuse, 4K In PIDUIDTHR PRI NICE SIZERES STATE C TIME WCPU COMMAND 6913 1001 32 200 4252M 1312M uwait 0 18.3H 39.06% /usr/local/diablo-jdk1.6.0/bin/java -Xmx512m -jar JDownloade ...how can the size of the resident memory of pid 6913 be 512 megabytes? I don't know but you can inspect the java application with the java console (jconsole). There are several stats on memory usage. With JDownloader (doing nothing), I see 57 MB of non heap memory usage, and only 30 MB of heap memory. Regards. ___ 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: issue with limiting java's memory usage
On Sun Jan 29 12, Patrick Lamaiziere wrote: Le Sun, 29 Jan 2012 19:34:11 +, Alexander Best arun...@freebsd.org a écrit : hi there, Hello, maybe i'm missing something obvious, but i don't quite understand the following top(1) output: last pid: 13875; load averages: 0.73, 0.75, 0.68 65 processes: 2 running, 62 sleeping, 1 waiting CPU 0: 19.5% user, 0.0% nice, 13.3% system, 0.0% interrupt, 67.2% idle CPU 1: 20.3% user, 0.0% nice, 7.8% system, 0.0% interrupt, 71.9% idle Mem: 1365M Active, 185M Inact, 323M Wired, 69M Cache, 213M Buf, 32M Free Swap: 10G Total, 2494M Used, 7746M Free, 24% Inuse, 4K In PIDUIDTHR PRI NICE SIZERES STATE C TIME WCPU COMMAND 6913 1001 32 200 4252M 1312M uwait 0 18.3H 39.06% /usr/local/diablo-jdk1.6.0/bin/java -Xmx512m -jar JDownloade ...how can the size of the resident memory of pid 6913 be 512 megabytes? I don't know but you can inspect the java application with the java console (jconsole). There are several stats on memory usage. jconsole doesn't seem to work for me. all i get is a blank white X window. :( cheers. alex With JDownloader (doing nothing), I see 57 MB of non heap memory usage, and only 30 MB of heap memory. Regards. ___ 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
Shared Memory allocation in jail
Hi, I am trying to run both postgres and zabbix in the same jail and I am only able to start postgres or zabbix not both of them. I have tuned my sysctl on master host as follow : kern.ipc.shmmax=268435456 kern.ipc.shmall=409600 kern.ipc.semmap=256 security.jail.allow_raw_sockets=1 security.jail.sysvipc_allowed=1 security.jail.enforce_statfs=1 No special tunning on jail host. I have also tunned in rc.conf jail_sysvipc_allow=YES I am still not able to start both at the same time. Any idea ? –– - Grégory Bernard Director - --- www.osnet.eu --- -- Your provider of OpenSource appliances -- –– OSnetOSnetOSnetOSnetOSnetOSnetOSnetOSnetOSnetO ___ 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: Shared Memory allocation in jail
Le 5 janv. 2012 à 14:56, bsd a écrit : Hi, I am trying to run both postgres and zabbix in the same jail and I am only able to start postgres or zabbix not both of them. I have tuned my sysctl on master host as follow : kern.ipc.shmmax=268435456 kern.ipc.shmall=409600 kern.ipc.semmap=256 security.jail.allow_raw_sockets=1 security.jail.sysvipc_allowed=1 security.jail.enforce_statfs=1 No special tunning on jail host. I have also tunned in rc.conf jail_sysvipc_allow=YES I am still not able to start both at the same time. Any idea ? Infos here were helpful : http://www.freebsddiary.org/jail-multiple.php I have • re-configure /boot/loader.conf • configured sysctl.conf with various options # rebooted and the issue was solved. –– - Grégory Bernard Director - --- www.osnet.eu --- -- Your provider of OpenSource appliances -- –– OSnetOSnetOSnetOSnetOSnetOSnetOSnetOSnetOSnetO ___ 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 –– - Grégory Bernard Director - --- www.osnet.eu --- -- Your provider of OpenSource appliances -- –– OSnetOSnetOSnetOSnetOSnetOSnetOSnetOSnetOSnetO ___ 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: Shared Memory allocation in jail
On Thu, Jan 5, 2012 at 8:56 AM, bsd b...@todoo.biz wrote: Hi, I am trying to run both postgres and zabbix in the same jail and I am only able to start postgres or zabbix not both of them. Yeah bro, it bit me in the ass as well ;-) the SysV IPC is common for the whole system. So anything that uses IPC in jails will have to go through this process You have to change the Pg user's id and the chown the Pg files. I use a nomeclature for this and is the last 3 digits of the jail's IP and the original uid. Example The jail on 192.168.101.124 has a Pg user of 70124 for port NATing I use the contrary nomenclature like 12480 is the network port 80 of the same jail in th public IP as 12480. Anyway here is my recipe: pw usermod pgsql -u 70124 pw groupmod pgsql -g 70124 chown -R pgsql /usr/local/pgsql/ chgrp -R pgsql /usr/local/pgsql/ When you run ipcs from the jail You should the see something like the example below, where there is still one Pg on uid 70 but from the jail's perspective it's the pgsql user who now has uid of 70124 Message Queues: T ID KEY MODEOWNERGROUP Shared Memory: T ID KEY MODEOWNERGROUP m 1179648 5432001 --rw--- 70 70 m 1310730 --rw--- 70 70 m 1572866 5432002 --rw--- pgsqlpgsql Semaphores: T ID KEY MODEOWNERGROUP s 1703936 5432001 --rw--- 70 70 s 1703937 5432002 --rw--- 70 70 s 1703938 5432003 --rw--- 70 70 s 1572867 5432004 --rw--- 70 70 s 1572868 5432005 --rw--- 70 70 s 1572869 5432006 --rw--- 70 70 s 1572870 5432007 --rw--- 70 70 s 1179655 5432008 --rw--- pgsqlpgsql s 1179656 5432009 --rw--- pgsqlpgsql s 1179657 5432010 --rw--- pgsqlpgsql s 1179658 5432011 --rw--- pgsqlpgsql s 1179659 5432012 --rw--- pgsqlpgsql s 1179660 5432013 --rw--- pgsqlpgsql s 1179661 5432014 --rw--- pgsqlpgsql Cheers, -- Alejandro Imass ___ 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
Free memory exhausted by networking
I'm running Transmission (http://www.transmissionbt.com/), а BitTorrent client on my FreeBSD 7.2 box. It requests large recieve buffers for its network connections. This leaves my system with absolutely no free memory. If some process frees a large amount of memory, it gets consumed about 1.5 megabytes per second until it drops to zero. I don't seem to have any problems like denied network connections or memory allocation, but it makes my system swap in and out often. As top shows: CPU: 24.9% user, 0.0% nice, 27.2% system, 33.1% interrupt, 14.8% idle Mem: 217M Active, 143M Inact, 105M Wired, 25M Cache, 59M Buf, 8K Free Swap: 4352M Total, 236K Used, 4352M Free I wasn't able to reproduce this problem with any other program, but it clearly disappears when I stop Transmission. The amount of free memory rarely drops below 5 MB without Transmission running. netstat -m shows nothing criminal: 4642/983/5625 mbufs in use (current/cache/total) 3380/214/3594/65536 mbuf clusters in use (current/cache/total/max) 3380/103 mbuf+clusters out of packet secondary zone in use (current/cache) 346/93/439/8480 4k (page size) jumbo clusters in use (current/cache/total/max) 0/0/0/4240 9k jumbo clusters in use (current/cache/total/max) 0/0/0/2120 16k jumbo clusters in use (current/cache/total/max) 9304K/1045K/10350K bytes allocated to network (current/cache/total) 0/0/0 requests for mbufs denied (mbufs/clusters/mbuf+clusters) 0/0/0 requests for jumbo clusters denied (4k/9k/16k) 0/5/4496 sfbufs in use (current/peak/max) 0 requests for sfbufs denied 0 requests for sfbufs delayed 0 requests for I/O initiated by sendfile 0 calls to protocol drain routines My sysctl tunes: vfs.usermount=1 kern.ipc.nmbclusters=65536 kern.ipc.maxsockbuf=4194304 kern.ipc.maxsockets=204800 net.tcp.sendbuf_inc=16384 net.inet.tcp.recvbuf_inc=131072 net.inet.ip.fastforwarding=1 net.inet.tcp.tcbhashsize=4096 How do I make FreeBSD keep some memory free (and so avoid swapping) with Transmission running? ___ 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: Free memory exhausted by networking
On Tue, Dec 13, 2011 at 11:57 AM, Dmitriy Kryuk kryukdmit...@rambler.ruwrote: How do I make FreeBSD keep some memory free (and so avoid swapping) with Transmission running? Your top(1) output doesn't indicate to me that swapping is a problem. There were some performance problems with Transmission on FreeBSD. Are you sure they have been resolved? https://forum.transmissionbt.com/viewtopic.php?f=2t=11687 -- 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: Free memory exhausted by networking
On Wed, 14 Dec 2011 00:57:52 +0700 Dmitriy Kryuk wrote: I'm running Transmission (http://www.transmissionbt.com/), а BitTorrent client on my FreeBSD 7.2 box. It requests large recieve buffers for its network connections. This leaves my system with absolutely no free memory. If some process frees a large amount of memory, it gets consumed about 1.5 megabytes per second until it drops to zero. I don't seem to have any problems like denied network connections or memory allocation, but it makes my system swap in and out often. As top shows: CPU: 24.9% user, 0.0% nice, 27.2% system, 33.1% interrupt, 14.8% idle Mem: 217M Active, 143M Inact, 105M Wired, 25M Cache, 59M Buf, 8K Free Swap: 4352M Total, 236K Used, 4352M Free Swapping doesn't have much to do with low free memory. There's actually very little swap use, but only 2 pages of free memory. I think that means that the memory is being used for interrupt handling, because anything else would allocate from the cache queue well before that happened. You might try switching the interface to polling or increasing both of the free memory watermarks vm.v_free_min and vm.v_free_target. ___ 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
Memory error?
All: Just got these messages in the log after installing FreeBSD 9.0-RC1 on an older machine. The system hasn't shown any glitches or crashes, so the error wasn't fatal. I'm guessing that there was an error in cache memory that was corrected by ECC; is this correct? Nov 4 08:31:21 joe kernel: MCA: Bank 3, Status 0x9001010a Nov 4 08:31:21 joe kernel: MCA: Global Cap 0x0005, Status 0x Nov 4 08:31:21 joe kernel: MCA: Vendor GenuineIntel, ID 0x652, APIC ID 0 Nov 4 08:31:21 joe kernel: MCA: CPU 0 COR GCACHE L2 ERR error --Brett Glass ___ 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
Check Memory Usage, program like 'free' in Linux
Is there a program to check physical memory usage in FreeBSD(using 8.2 RELEASE)? In vain of 'free' in Linux. I know you can check the values with sysctl, I was just checking if anyone has a cleaner option. I was always curious. Thanks Jon ___ 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: Check Memory Usage, program like 'free' in Linux
On 11/3/11 9:18 PM, Jon Schipp wrote: Is there a program to check physical memory usage in FreeBSD(using 8.2 RELEASE)? Hi Jon, Check out the port /usr/ports/sysutils/sysinfo . HTH ___ 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: Check Memory Usage, program like 'free' in Linux
On Thu, Nov 3, 2011 at 9:25 AM, Rares Aioanei bsdlis...@gmail.com wrote: On 11/03/2011 03:18 PM, Jon Schipp wrote: Is there a program to check physical memory usage in FreeBSD(using 8.2 RELEASE)? In vain of 'free' in Linux. I know you can check the values with sysctl, I was just checking if anyone has a cleaner option. I was always curious. Thanks Jon __**_ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/**mailman/listinfo/freebsd-**questionshttp://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-** unsubscr...@freebsd.org freebsd-questions-unsubscr...@freebsd.org top? Crap, I forgot mention that it needs to be non-interactive, it will be for e-mail alerts. So that rules out top as for as I know. ___ 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: Check Memory Usage, program like 'free' in Linux
On Thu, 3 Nov 2011 10:06:19 -0400 Jon Schipp jonsch...@gmail.com wrote: On Thu, Nov 3, 2011 at 9:25 AM, Rares Aioanei bsdlis...@gmail.com wrote: On 11/03/2011 03:18 PM, Jon Schipp wrote: Is there a program to check physical memory usage in FreeBSD(using 8.2 RELEASE)? In vain of 'free' in Linux. I know you can check the values with sysctl, I was just checking if anyone has a cleaner option. I was always curious. Thanks Jon __**_ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/**mailman/listinfo/freebsd-**questionshttp://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-** unsubscr...@freebsd.org freebsd-questions-unsubscr...@freebsd.org top? Crap, I forgot mention that it needs to be non-interactive, it will be for e-mail alerts. So that rules out top as for as I know. ___ 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 top -n 1 followed by grep or awk might do what you want. ___ 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: Check Memory Usage, program like 'free' in Linux
Hello Jon, Perhaps the port sysutils/freecolor. Cheers ... Mark Is there a program to check physical memory usage in FreeBSD(using 8.2 RELEASE)? In vain of 'free' in Linux. I know you can check the values with sysctl, I was just checking if anyone has a cleaner option. I was always curious. Thanks Jon ___ 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: Check Memory Usage, program like 'free' in Linux
Jon Schipp jonsch...@gmail.com writes: On Thu, Nov 3, 2011 at 9:25 AM, Rares Aioanei bsdlis...@gmail.com wrote: On 11/03/2011 03:18 PM, Jon Schipp wrote: Is there a program to check physical memory usage in FreeBSD(using 8.2 RELEASE)? In vain of 'free' in Linux. I know you can check the values with sysctl, I was just checking if anyone has a cleaner option. I was always curious. Thanks Jon __**_ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/**mailman/listinfo/freebsd-**questionshttp://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-** unsubscr...@freebsd.org freebsd-questions-unsubscr...@freebsd.org top? Crap, I forgot mention that it needs to be non-interactive, it will be for e-mail alerts. So that rules out top as for as I know. No, you could script it out of top(1), but I'm going to guess that you're trying to be warned when the system is close to running out of memory. That is silly -- you paid for the memory; why would you *want* it to sit around doing nothing? Also note that the definition of free is somewhat complicated. Maybe if you described the actual problem you want to solve, we could suggest a more appropriate answer. A literal answer to your question might be: top -d 1|grep '^Mem:'|cut -d ',' -f 6 assuming the format of the line of top doesn't change. ___ 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: Check Memory Usage, program like 'free' in Linux
On Thu, Nov 3, 2011 at 11:35 AM, Robert Bonomi bon...@mail.r-bonomi.comwrote: From owner-freebsd-questi...@freebsd.org Thu Nov 3 08:17:46 2011 Date: Thu, 3 Nov 2011 09:18:06 -0400 From: Jon Schipp jonsch...@gmail.com To: freebsd-questions@freebsd.org Subject: Check Memory Usage, program like 'free' in Linux Is there a program to check physical memory usage in FreeBSD(using 8.2 RELEASE)? In vain of 'free' in Linux. Having *NO* idea what linux 'free' does, your question is hard to answer. I know you can check the values with sysctl, I was just checking if anyone has a cleaner option. I was always curious. If you're just looking for the amount of 'free' memory, the 3rd field of the third line of the output of vmstat(8) has that value. I'm under the impression that virtual memory and physical memory usage are very different. e.g. vmstat and top report very different memory values. ___ 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: Check Memory Usage, program like 'free' in Linux
On Thu, Nov 3, 2011 at 11:55 AM, Lowell Gilbert freebsd-questions-lo...@be-well.ilk.org wrote: Jon Schipp jonsch...@gmail.com writes: On Thu, Nov 3, 2011 at 9:25 AM, Rares Aioanei bsdlis...@gmail.com wrote: On 11/03/2011 03:18 PM, Jon Schipp wrote: Is there a program to check physical memory usage in FreeBSD(using 8.2 RELEASE)? In vain of 'free' in Linux. I know you can check the values with sysctl, I was just checking if anyone has a cleaner option. I was always curious. Thanks Jon __**_ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/**mailman/listinfo/freebsd-**questions http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-** unsubscr...@freebsd.org freebsd-questions-unsubscr...@freebsd.org top? Crap, I forgot mention that it needs to be non-interactive, it will be for e-mail alerts. So that rules out top as for as I know. No, you could script it out of top(1), but I'm going to guess that you're trying to be warned when the system is close to running out of memory. That is silly -- you paid for the memory; why would you *want* it to sit around doing nothing? While this isn't my intention... I'm curious: You wouldn't want to know when your machine has reached periods of high memory utilization? Occurrence/frequency information seems pretty valuable. More importantly, at specific times, noticing patterns, use during/after business hours If you didn't want to use memory, it wouldn't be purchased. I don't think keeping track of the utility of your purchases is silly. Also note that the definition of free is somewhat complicated. Maybe if you described the actual problem you want to solve, we could suggest a more appropriate answer. A literal answer to your question might be: top -d 1|grep '^Mem:'|cut -d ',' -f 6 assuming the format of the line of top doesn't change. That does the trick. I didn't think it was possible to grab data from interactive programs without throwing in some garbage. Should've tested. Thanks ___ 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: Check Memory Usage, program like 'free' in Linux
On Thu, Nov 3, 2011 at 11:12 AM, Jon Schipp jonsch...@gmail.com wrote: I'm under the impression that virtual memory and physical memory usage are very different. e.g. vmstat and top report very different memory values. If I assume this is an XY problem, and your true goal is find out what memory pressure a system is under then my answer would be to track the percent of swap used. Free memory is a useful utility on Windows XP, not so much on FreeBSD. So to answer your question in another way, there is a reason free doesn't exist on FreeBSD. It's not very meaningful. -- 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