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

It means that the RAM sticks are driven by a clock signal — as opposed to (older) asynchronous DRAMs. See the Wikipedia page on SDRAMs. To find out whether your RAM is dual-channel, look for “Interleaved Data Depth” in dmidecode output. It should say 1 for single and 2 for dual channel RAM.


2

You can use ps together with awk to find the physical memory usage by a user: ps -U root --no-headers -o rss | awk '{ sum+=$1} END {print int(sum/1024) "MB"}' Here it prints memory used by root to the output.


1

I think smem is the better tool in your case. Install smem and try smem -uk If you are using debian you can install it using: apt-get install smem If you cant install nothing on the server you can try: ps haux | awk -v user=$USER '$1 ~ user { sum += $4} END { print user, sum; }' Remember that $USER is a environment variable so you don't need to ...


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