Hot answers tagged

3

MM seems to be quite arcane, so it is indeed annoying to track down. Linux literature makes heavy mention of LRU in the context of MM (memory management). I haven't noticed any of the other terms being mentioned. If you're not familiar with how basic LRU is implemented in practice for virtual memory, I came across an interesting introduction (first four ...


3

I don't think there is a way to limit swap space, unless you modify the program to only request non-swappable memory, which even if possible would probably be impractical. However what you can and should do is limit the total amount of memory available to the process. You can use cgroups (the new-ish general way), ulimit (setrlimit, the traditional way), or ...


2

Yes—the two main approaches are setrlimit(2) and (on Linux) control groups. The main advantages of setrlimit is that it's simple and portable (specified by POSIX). You fork, then set limits for RLIMIT_AS and RLIMIT_CPU, then exec the code. The downside is that it's per-process, so the code could still fork to exceed the limit (each process it forks will ...


2

If you look at the kernel's inode source code, you can see that the ihash_entries is set at the kernel level only. There is no user or process level considerations at all. Adding those could drastically decrease performance which would be counter productive. It would also imply keeping track of all processes that used the cached entries, therefore ...


1

You should not delete files directly from system directories. Instead you should remove unneeded packages. In this manner, the system will remove unnecessary files and its dependences. Note: you can remove every file (but not directories) in /var/cache. Additionally old logs in /var/log/ could be removed. Check about unread system mails (/var/mail/ or ...


1

The answer is no, in terms of free(1) type information. We simply do not do that type of accounting and then have the ability to report it back. The closest we have is 'bdinfo' (or bdi for short): > bdinfo ... DRAM bank = 0x00000000 -> start = 0x80000000 -> size = 0x40000000


1

It is not clear if you search for page in/out caused by paging or by swapping. The difference is explained at several places here (http://superuser.com/questions/785447). The number of pages swapped and paged from /proc/vmstat. Pages paged in / out $ cat /proc/vmstat|grep pgpg pgpgin 6920262 pgpgout 345654122 Pages swapped in / out $ cat ...


1

The physmem value from the system_pages statistics will give you the number of pages the OS sees. You need to multiply this number by the default page size which can be 4K or 8K depending on your architecture: $ kstat -n system_pages -p -s physmem | nawk -v pagesize=$(pagesize) '{print $2*pagesize/1024/1024 "MB"}' 4017.64MB Note that this might not ...



Only top voted, non community-wiki answers of a minimum length are eligible