A friend of mine is running a LAMP application that's on its knees, and would like to know what to do about it: Either make changes to the PHP or MySQL code, or order a faster server.

Here's what top says:
top - 21:20:49 up  3:35,  1 user,  load average: 61.88, 51.08, 74.30

Tasks: 476 total,   7 running, 467 sleeping,   0 stopped,   2 zombie
Cpu(s): 78.8% us, 18.7% sy,  0.0% ni,  0.7% id,  0.3% wa,  0.5% hi,  1.0% si
Mem:   1015484k total,   993344k used,    22140k free,    76920k buffers 
Swap:   514040k total,   101032k used,   413008k free,   208496k cached
Can you tell what's wrong?

Thank you for any tip.