another error with md malloc based fs
michael.schuh at gmail.com
Fri Mar 23 18:39:45 UTC 2007
yes that's exatly what i have in my mind,
after the explainings from Chuck.
thanks very much
2007/3/23, Oliver Fromme <olli at lurza.secnetix.de>:
> Michael Schuh wrote:
> > Chuck Swiger wrote:
> > > Michael Schuh wrote:
> > > > i can't understand how malloc can eat all available
> > > > memory, i have 2Gigs of it ;-)
> > > > so it seems to me i know what i doing, if
> > > > i have 1,6 Gigs free Memory, and i say ok get me 750Megs from
> > > > my 1,6 Gigs of free Memory, what was faulty on that????
> > >
> > > The two choices involve a swap-based RAMdisk, which can use all of
> > > the available physical RAM it needs to, since this memory is
> > > swappable, or a kernel-memory-based RAMdisk, which uses wired-down
> > > memory from within the kernel.
> > Ok, so that is it harder to understand for me in the first time,
> > if i understand it now right the swap or file based memory backend
> > is also in the ram, but it get another way managed from kernels vm.
> > the malloc based ramdisk get's not reallly managed by the kvm,
> > but it underlays under the paging and swapping, and also
> > ba the "thread-killer" there shot's thread down it it get's to much
> > work for the system....
> > i hope i understand this right, it is important for me...
> Let me try to explain it with a little different words.
> The following is a bit simplified, but it should give
> you an idea about the advantages and disadvantages of
> each md disk type.
> First of all, _both_ "malloc" and "swap"-backed md disks
> are RAM disks. You don't have to worry that a swap-backed
> md disk will be created on your swap partiton. It's not.
> It will reside in RAM, just like a "malloc" md disk.
> However, the difference is that a malloc md disk uses
> memory from the KVM area (kernel virtual memory), which
> is hardwired into the RAM. It cannot be paged, and it
> is taken from the kernel's own memory pool, which is
> usually much smaller than your total available RAM.
> It's taken from the same pool of RAM that's used for
> network buffers, driver data and similar things.
> On the other hand, "swap-backed" md disks use regular
> memory, so to speak, just like a normal user process.
> That also means that they are pageable, which means
> that they can be paged to swap if necessary (if the
> systems runs low on RAM). That's what "swap-backed"
> means. Because of that, they don't have a size limit
> (well, they shouldn't be bigger than your RAM + swap,
> of course). If there is enough RAM, then they will
> stay completely in RAM and will _not_ touch your swap
> at all.
> For typical RAM disks, such as for /tmp, you should use
> a swap-backed md disk (it should be the default). The
> "malloc" type should be used only for rather small,
> special uses.
> I hope it's now a little clearer.
> Best regards
> Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
> Handelsregister: Registergericht Muenchen, HRA 74606, Geschäftsfuehrung:
> secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mün-
> chen, HRB 125758, Geschäftsführer: Maik Bachmann, Olaf Erb, Ralf Gebhart
> FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd
> "[...] one observation we can make here is that Python makes
> an excellent pseudocoding language, with the wonderful attribute
> that it can actually be executed." -- Bruce Eckel
=== michael-schuh.net ===
@: michael.schuh at gmail.com
=== Ust-ID: DE251072318 ===
More information about the freebsd-stable