Re: memory managment

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> There is a trick: write a utility that allocates 350MB of memory and
> touches every 4k of it. That will force the kernel to shrink the
> caches.

I'm curious (if this warrants an answer) what, in more detail, this causes
the kernel to do which causes the shrinking of the caches. I assume that
you're forcing the kernel to page out memory not in use in favor of the
memory allocated by this utility.

Is something like this utility a good thing to run on a regular basis when
things like this happen?

Is that 350MB number dependent on the amount of memory in the machine or is
it some magic number in the kernel?

Thanks,
john

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
IRC Channel:   irc.openprojects.net / #kernelnewbies
Web Page:      http://www.kernelnewbies.org/



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux