I haven't been able to compile my java programs since yesterday, this is the error I've been getting:
lec> java Hmwk9a.java
Error occurred during initialization of VM
java.lang.OutOfMemoryError: unable to create new native thread
=====
Students in my class (522) have been having problems running MPI jobs on Lectura. I see that there are several lamd processes running. These are lam daemons that students have forgotten to kill. (Lam is the MPI implementation that we use, hence the name lamd.) Things seemed to go fine once I killed the unattended lam daemons that students forgot to get rid of.
Lectura has over 1300 login accounts, and there are resource limits to prevent users from taking too much of the system's shared resources. People sometimes hit the resource limits because unneeded processes are consuming resources too. So first check that you do not have other processes running that you don't need. Run the 'ps' command with the '-U' command line flag and your userid to find your processes:
lectura$ ps -U jdavis
PID TTY TIME CMD
31816 ? 00:00:00 sshd
31817 pts/17 00:00:00 bash
31881 pts/17 00:01:13 top
772 ? 00:00:14 sshd
773 ? 00:00:00 firefox
785 ? 00:00:00 run-mozilla.sh
790 ? 00:01:20 firefox-bin
794 ? 00:00:00 gconfd-2
2834 ? 00:00:00 sshd
2835 pts/163 00:00:00 bash
3668 pts/163 00:00:00 iefbr14
3669 pts/163 00:00:00 iefbr14
3670 pts/163 00:00:00 iefbr14
3671 pts/163 00:00:00 iefbr14
3697 pts/163 00:00:00 script
3698 pts/163 00:00:00 script
3699 pts/194 00:00:00 bash
3815 pts/194 00:00:00 ps
Here I have several programs running I don't need. The 'pkill' command is a convenient way to get rid of all of them at once:
lectura$ pkill iefbr14
lectura$ ps -U jdavis
PID TTY TIME CMD
31816 ? 00:00:00 sshd
31817 pts/17 00:00:00 bash
31881 pts/17 00:01:13 top
772 ? 00:00:14 sshd
773 ? 00:00:00 firefox
785 ? 00:00:00 run-mozilla.sh
790 ? 00:01:20 firefox-bin
794 ? 00:00:00 gconfd-2
2834 ? 00:00:00 sshd
2835 pts/163 00:00:00 bash
3697 pts/163 00:00:00 script
3698 pts/163 00:00:00 script
3699 pts/194 00:00:00 bash
3965 pts/194 00:00:00 ps
You can use the 'top' command with the '-u' command line flag and your userid to check the resource consumption of your processes. The header lines top prints show the system totals, and the lines below that show your resource use:
lectura$ top -u jdavis
top - 11:11:09 up 87 days, 10:32, 148 users, load average: 3.50, 2.87, 2.25
Tasks: 869 total, 5 running, 861 sleeping, 2 stopped, 1 zombie
Cpu(s): 6.9% us, 3.0% sy, 0.2% ni, 89.2% id, 0.5% wa, 0.0% hi, 0.1% si, 0
Mem: 16384916k total, 16321080k used, 63836k free, 2461508k buffers
Swap: 74637336k total, 837324k used, 73800012k free, 6351588k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
4229 jdavis 15 0 8092 1572 724 R 9 0.0 0:00.13 top
31816 jdavis 15 0 39776 1940 1344 S 0 0.0 0:00.27 sshd
31817 jdavis 15 0 59832 1584 1196 S 0 0.0 0:00.06 bash
31881 jdavis 26 10 8080 1664 808 S 0 0.0 1:13.64 top
772 jdavis 15 0 40196 2268 1360 S 0 0.0 0:14.24 sshd
773 jdavis 16 0 5548 1008 828 S 0 0.0 0:00.04 firefox
785 jdavis 16 0 5552 1048 820 S 0 0.0 0:00.00 run-mozilla.sh
790 jdavis 15 0 304m 95m 22m S 0 0.6 1:20.38 firefox-bin
794 jdavis 16 0 18648 4336 1752 S 0 0.0 0:00.22 gconfd-2
2834 jdavis 15 0 39772 1932 1344 S 0 0.0 0:00.06 sshd
2835 jdavis 16 0 59832 1584 1196 S 0 0.0 0:00.04 bash
3697 jdavis 15 0 3728 476 400 S 0 0.0 0:00.00 script
3698 jdavis 15 0 3760 284 200 S 0 0.0 0:00.00 script
3699 jdavis 15 0 6752 1424 1048 S 0 0.0 0:00.00 bash
(Top will redraw the screen every few seconds; press the 'q' key to exit.) The 'VIRT' column shows the amount of virtual memory used -- here my firefox process is taking up the most virtual memory: 304 megabytes. The 'RES' column shows the amount of physical memory used; my firefox process leads there too with 95 megabytes.
The system resource limits should let you run one process with very large virtual or physical memory use, but probably not several processes like that at once.
BE A GOOD CITIZEN -- check your
processes before logging out.
Note that some processes can be killed
only by root. Lab is happy to kill stuff off if pointed in the right
direction.