One of my company's perl code uses lots of memories. Sometimes it may use up all the memory our live server has. This problems is probably caused by some arrays and/or hashes inside the code. These arrays/hashes can have more than 10 million data members. I have modified the codes and made the performance a bit better. But I want to find out how much memory those arrays/hashes are actually using during the run before/after my fix.
Can someone tell me how to do this?
In addition, I also want to know how much memory the whole program is using during the run. I know one way is using 'top' command. But each run may take quite some time to finish. So it is hard to keep my eye on the 'top' output. I suppose there must be a better way to monitor this?
Thank you very much for your help.
Can someone tell me how to do this?
In addition, I also want to know how much memory the whole program is using during the run. I know one way is using 'top' command. But each run may take quite some time to finish. So it is hard to keep my eye on the 'top' output. I suppose there must be a better way to monitor this?
Thank you very much for your help.