Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I wrote a parser to read the auth.log. For some reason while parsing auth.log I get that VSZ is larger than the total physical memory, which is 2GB. Depending on the size of auth.log and how long reader has been running, VSZ will increase (sometimes up to ~8GB).

How normal is it? What could be the reason of this memory consumption?

# ps aux
USER   PID  CPU %MEM     VSZ   RSS   TTY STAT START  TIME  COMMAND
root 17547  0.7  1.4 3123744 30820 pts/2  Sl+ Jul30 11:42 ./reader auth.log

# free
             total       used       free     shared    buffers     cached
Mem:       2063568    1842232     221336          0     179084    1057680
-/+ buffers/cache:     605468    1458100
Swap:      4032504        288    4032216
share|improve this question
    
Without seeing the script, the most likely reason is you are reading the entire log into memory, or you have a memory leak through not releasing resources. Would you like to add the script to the post? –  Paul Aug 1 '13 at 4:27
    
@Paul: Is that were true, why would his resident set size be so low? –  David Schwartz Aug 1 '13 at 4:32
    
@Paul: Thanks. Yes, I'm reading almost the entire log into memory. I'm not able to post it due to my job. –  Mike Darrow Aug 1 '13 at 12:50

1 Answer 1

up vote 1 down vote accepted

It's normal. Virtual memory is so cheap, effectively free, that there's pretty much no point in trying to reduce your consumption of it.

share|improve this answer
    
Thanks. Could this potentially crash the machine if it gets to large for one process? –  Mike Darrow Aug 1 '13 at 12:54
    
@MikeDarrow: No. Virtual memory is just address space. –  David Schwartz Aug 1 '13 at 15:17

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.