Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 03 Feb 2008 13:58:07 +0100
From:      =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= <des@des.no>
To:        hackers@freebsd.org
Subject:   sort(1) memory usage
Message-ID:  <8663x6mc2o.fsf@ds4.des.no>

next in thread | raw e-mail | index | archive | help
I've been trying to figure out why some periodic scripts consume so much
memory.  I've narrowed it down to sort(1).

At first, I thought the scripts were using it inefficiently, feeding it
more data than was really needed.  Then I discovered this:

des@ds4 ~% (sleep 10 | sort) & (sleep 5 ; top -o res | grep sort)
[1] 66024
66024 des          1  -8    5 54796K 52680K piperd 1   0:00  0.88% sort

That's right - sort(1) consumes 50+ MB of memory doing *nothing*.

(roughly half that on a 32-bit box)

Something is rotten in the state of GNU...

DES
--=20
Dag-Erling Sm=C3=B8rgrav - des@des.no



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?8663x6mc2o.fsf>