1 |
Denis Shcherbakov <deniss@×××××××××.EDU> writes: |
2 |
|
3 |
> Sorry if this question is inappropriate for this forum, but I figure this |
4 |
> is where the experts are :) |
5 |
> |
6 |
> I run Mathematica 5.0 on Gentoo Linux 1.4 (2.4.19-gentoo-r10 kernel) on a |
7 |
> dual-processor machine. I was wondering why my graphic applications came |
8 |
> to a screeching halt when I began running a computation in Mathematica, |
9 |
> and then when I looked at top, my jaw droped - MathKernel is using ALL of |
10 |
> my remaining memory, and I got 2 GB of it on this machine! |
11 |
> |
12 |
> My question is what can I do about this... Is there a way to cap the |
13 |
> amount of memory accessible to Mathematica? Is it possible to put a |
14 |
> quota |
15 |
|
16 |
It sounds like MathKernel uses an over-commit strategy (like what |
17 |
CMUCL and SBCL Common Lisp implementations on GNU/Linux use). They |
18 |
are not really using that much memory. They over-commit in order to |
19 |
have a linear address space in which to implement their own memory |
20 |
management schemes. |
21 |
|
22 |
For example, CMUCL on Gentoo, looks like this in the top(1) output: |
23 |
|
24 |
$ top |
25 |
|
26 |
top - 15:43:40 up 21 days, 5:47, 1 user, load average: 1.03, 0.74, 0.36 |
27 |
Tasks: 111 total, 2 running, 108 sleeping, 0 stopped, 1 zombie |
28 |
Cpu(s): 97.4% us, 2.3% sy, 0.0% ni, 0.0% id, 0.0% wa, 0.3% hi, 0.0% si |
29 |
Mem: 514180k total, 497184k used, 16996k free, 50088k buffers |
30 |
Swap: 1004052k total, 122512k used, 881540k free, 225592k cached |
31 |
|
32 |
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND |
33 |
22549 mkennedy 25 0 1284m 8244 22m R 1.0 1.6 5:24.32 lisp |
34 |
|
35 |
|
36 |
You should look in the %MEM column for the "real" measure. |
37 |
|
38 |
However, you wrote "graphic applications came to a screeching halt" -- |
39 |
over-committing would not explain that though (presumably very high |
40 |
CPU usage on Mathematica's behalf??). You might want to try Linux |
41 |
2.6.x kernels which provide much improved desktop responsiveness. |
42 |
|
43 |
Matt |
44 |
|
45 |
-- |
46 |
Matthew Kennedy |
47 |
Gentoo Linux Developer |