[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
programs linked against libpthread have high VSZ
From: |
rwhron |
Subject: |
programs linked against libpthread have high VSZ |
Date: |
Sun, 14 Oct 2001 20:45:58 -0400 |
User-agent: |
Mutt/1.2.5i |
I noticed that programs that use libpthread appear to use more virtual
memory than the same program linked against the pth library. Example
program mp3blaster-3.0:
glibc-2.2.4 with glibc-linuxthreads-2.2.4:
ldd /usr/local/bin/mp3blaster
libvorbisfile.so.0 => /usr/local/lib/libvorbisfile.so.0 (0x4001f000)
libvorbis.so.0 => /usr/local/lib/libvorbis.so.0 (0x40024000)
libncurses.so.5 => /lib/libncurses.so.5 (0x4003a000)
libpthread.so.0 => /lib/libpthread.so.0 (0x4007d000)
libstdc++-libc6.2-2.so.3 => /usr/lib/libstdc++-libc6.2-2.so.3
(0x40091000)
libm.so.6 => /lib/libm.so.6 (0x400dc000)
libc.so.6 => /lib/libc.so.6 (0x400ff000)
libogg.so.0 => /usr/local/lib/libogg.so.0 (0x40222000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
Here is mp3blaster at startup.
address@hidden:/usr/src/sources/m# ps aux|egrep 'mp3|VSZ'
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
hrandoz 28961 0.1 0.2 10976 1508 tty5 S 19:09 0:00 mp3blaster
hrandoz 28962 0.0 0.2 10976 1508 tty5 S 19:09 0:00 mp3blaster
hrandoz 28963 0.0 0.2 10976 1508 tty5 S 19:09 0:00 mp3blaster
Play a few big mp3's:
ps aux|egrep 'mp3|VSZ'
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
hrandoz 28961 0.0 0.8 46356 4320 tty5 S 19:09 0:00 mp3blaster
hrandoz 28962 0.0 0.8 46356 4320 tty5 S 19:09 0:00 mp3blaster
hrandoz 28963 3.4 0.8 46356 4320 tty5 S 19:09 0:04 mp3blaster
hrandoz 28977 0.3 0.8 46356 4320 tty5 S 19:11 0:00 mp3blaster
See how the VSZ got big?
Actually, I didn't play a bunch of mp3's. I just started to play some
mp3's and hit <Enter> to restart, etc, etc. If I was patient and actually
listened to the mp3's, the same behavior would be seen.
glibc-2.2.4 with pth-1.40:
------
Recompile mp3blaster:
./configure --disable-nls --with-pthreads=no --with-pth=yes
ldd /usr/local/bin/mp3blaster
libvorbisfile.so.0 => /usr/local/lib/libvorbisfile.so.0 (0x4001f000)
libvorbis.so.0 => /usr/local/lib/libvorbis.so.0 (0x40024000)
libncurses.so.5 => /lib/libncurses.so.5 (0x4003a000)
libpth.so.14 => /usr/lib/libpth.so.14 (0x4007d000)
libstdc++-libc6.2-2.so.3 => /usr/lib/libstdc++-libc6.2-2.so.3
(0x4008f000)
libm.so.6 => /lib/libm.so.6 (0x400da000)
libc.so.6 => /lib/libc.so.6 (0x400fd000)
libogg.so.0 => /usr/local/lib/libogg.so.0 (0x40220000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
Before playing anything:
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
hrandoz 30442 0.0 0.2 2940 1504 tty5 S 19:16 0:00 mp3blaster
Note, there is only one thread.
After playing a bunch of mp3's:
address@hidden:/usr/src/sources/m/mp3blaster-3.0# ps aux|egrep 'VSZ|mp3'
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
hrandoz 30442 4.1 0.3 3004 1744 tty5 S 19:16 0:05 mp3blaster
It's much smaller.
I do note that under extreme load, mp3blaster skips more with pth than
glibc-linuxthreads.
Another program compiled with libpthread that has a larger VSZ than I
expected is iplog-2.3.3:
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 39 0.0 0.0 26100 144 ? S 02:10 0:00 /usr/sbin/iplog
root 40 0.0 0.0 26100 144 ? S 02:10 0:00 /usr/sbin/iplog
root 42 0.0 0.0 26100 144 ? S 02:10 0:00 /usr/sbin/iplog
root 43 0.0 0.0 26100 144 ? S 02:10 0:00 /usr/sbin/iplog
root 44 0.0 0.0 26100 144 ? S 02:10 0:00 /usr/sbin/iplog
--
Randy Hron
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- programs linked against libpthread have high VSZ,
rwhron <=