Build an erlang computer (was:Computers are fast)
Vlad Dumitrescu XX (LN/EAB)
Wed Jan 25 10:15:10 CET 2006
> Question: Is there a simple program to make main memory
> totally unavailable in my linux system? - I'd like to boot
> the system saying "use only 100K of memory" or "use only 200K
> or memory"
> (I currently have 512K) so I can measure the effect of
> different memory sizes on performance.
There usually is a mem=XXXM boot parameter for the kernel. I don't know
if it works to restrict it, or is it just for cases where the default
doen't recognize all installed memory.
Otherwise, it is also possible to restrict memory usage per user, using
the PAM module.
You can control the per-user limits using the resource-limits PAM module
and /etc/pam.d/limits.conf. For example, limits for group users might
look like this:
@users hard core 0
@users hard nproc 50
@users hard rss 5000
This says to prohibit the creation of core files, restrict the number of
processes to 50, and restrict memory usage per user to 5M.
More information about the erlang-questions