Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
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
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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .