Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Memory problems, system slow
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
kirikou
Tux's lil' helper
Tux's lil' helper


Joined: 03 Nov 2006
Posts: 83

PostPosted: Mon Apr 21, 2008 9:05 am    Post subject: Memory problems, system slow Reply with quote

Hello,
I have a big problem with my gentoo installation. I can almost not run more than one applications at the same time, because my system becomes so slow that it is impossible to use it.
I did a free -m with no applications launched and I got the following result. Surprinsigly, my memory was almost fully used...
Code:
free -m

             total       used       free     shared    buffers     cached
Mem:          1010        841        168          0        110        460
-/+ buffers/cache:        271        739
Swap:          980          0        980


Moreover, I can't compile azureus, because I get the following error:
Code:
[javac] The system is out of resources.
[javac] Consult the following stack trace for details.
[javac] java.lang.OutOfMemoryError: Java heap space


I tried the trick suggested in another thread (ANT_OPTS="-Xmx512M") but it doesn't work.

I don't know which files are relevant, so please ask me and I will post them.

Here is the output of emerge --info
Code:
Portage 2.1.5_rc5 (default-linux/x86/2007.0, gcc-4.1.1, glibc-2.7-r2, 2.6.24-gentoo-r3 i686)
=================================================================
System uname: 2.6.24-gentoo-r3 i686 Intel(R) Pentium(R) M processor 1.70GHz
Timestamp of tree: Mon, 21 Apr 2008 07:15:01 +0000
ccache version 2.4 [enabled]
app-shells/bash:     3.2_p33
dev-java/java-config: 1.3.7, 2.1.5
dev-lang/python:     2.4.4-r11, 2.5.2-r2
dev-python/pycrypto: 2.0.1-r6
dev-util/ccache:     2.4-r7
sys-apps/baselayout: 2.0.0
sys-apps/openrc:     0.2.2
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.62
sys-devel/automake:  1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1
sys-devel/binutils:  2.18-r1
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.25-r1
ACCEPT_KEYWORDS="x86 ~x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=pentium-m -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-O2 -march=pentium-m -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="ccache collision-protect distlocks metadata-transfer parallel-fetch sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="ftp://mirror.switch.ch/mirror/gentoo ftp://ftp.solnet.ch/mirror/Gentoo http://gentoo.mirror.solnet.ch"
LANG="en_US.utf8"
LC_ALL="en_US.utf8"
LDFLAGS=""
LINGUAS="en fr"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/portage/local/layman/java-overlay /usr/local/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="X a52 aac acl acpi alsa apache2 bash-completion berkdb bonobo bzip2 cddb cdparanoia cdr cli cracklib crypt cscope cups dbus dri dv dvd dvdr dvdread encode exif fam fbcon ffmpeg firefox flac fortran ftp gcj gdbm gif gnome gphoto2 gpm gstreamer gtk hal hardened iconv imagemagick imap imlib ipod isdnlog java javascript jpeg jpeg2k junit lm_sensors mad matroska midi mime mmx mng mp3 mpeg mplayer mudflap musepack ncurses nls nptl nptlonly nsplugin nvidia ogg opengl openmp pam pcre pdf perl pmu png pppd python quicktime readline reflection ruby sdl session speex spell spl sse sse2 ssl svg svga tcpd tetex theora threads tiff truetype unicode usb vcd vim-syntax vorbis wifi win32codecs wxwindows x264 x86 xinerama xml xorg xv xvid xvmc zlib" ALSA_CARDS="intel8x0" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic auth_digest authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en fr" USERLAND="GNU" VIDEO_CARDS="nvidia vesa fbdev"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS


I can post my kernel's config file if needed (it didn't do it because it's quite a big file)

Any help would be very apreciated, because I have absolutely no idea about the reason of this slowliness.

Thank you very much.
Back to top
View user's profile Send private message
BradN
Advocate
Advocate


Joined: 19 Apr 2002
Posts: 2391
Location: Wisconsin (USA)

PostPosted: Mon Apr 21, 2008 5:36 pm    Post subject: Reply with quote

Actually, your memory's not almost full - you need to go by the "-/+ buffers/cache:" line, which says that about 3/4 of your memory is available (linux uses it for disk cache when programs don't need it). Additionally, none of your swap memory is used.

As far as the slowness goes, that I'm not sure what would be causing it. If you've got a P4 system or a laptop with a clogged fan, it may be thermally throttling the speed down to avoid overheating, but that's all I can think of off the top of my head.

I would try watching the memory usage of javac while you compile azureus - it could be that it's requesting a huge chunk of memory (I see this often with compiling certain C++ apps) and is a bit unreasonable with its requirements. A workaround may be switching to a newer/older java version to compile azureus, then switching it back.
Back to top
View user's profile Send private message
kirikou
Tux's lil' helper
Tux's lil' helper


Joined: 03 Nov 2006
Posts: 83

PostPosted: Mon Apr 21, 2008 6:26 pm    Post subject: Reply with quote

I've got a Pentium-M system.
I thought that this slowness might be due to a kernel misconfiguration, and therefore I tried compiling a kernel with genkernel, but it remains slow.
I can see no other reasons for my system being so slow...
Quote:
I would try watching the memory usage of javac while you compile azureus

How do I do that?

Thank you very much!
Back to top
View user's profile Send private message
BradN
Advocate
Advocate


Joined: 19 Apr 2002
Posts: 2391
Location: Wisconsin (USA)

PostPosted: Mon Apr 21, 2008 7:25 pm    Post subject: Reply with quote

I'd recommend using a utility like "top" in another shell - if you run that and then type the letters O q (that's the capital o, not the number), it will sort by resident memory usage, which is what you'd be interested in here.
Back to top
View user's profile Send private message
kirikou
Tux's lil' helper
Tux's lil' helper


Joined: 03 Nov 2006
Posts: 83

PostPosted: Mon Apr 21, 2008 7:42 pm    Post subject: Reply with quote

I did what you suggested.
java uses only about 8.7% of the memory, but between 50 and 60% of the CPU.
I forgot to say that I set PORTAGE_NICENESS to 15.
During the compilation (before it fails), my system become almost unresponsive, despite the high niceness of portage...
Back to top
View user's profile Send private message
coolsnowmen
Veteran
Veteran


Joined: 30 Jun 2004
Posts: 1479
Location: No.VA

PostPosted: Mon Apr 21, 2008 9:10 pm    Post subject: Reply with quote

are you out of hard drive space?
Code:
df -h

_________________
emerge: there are no ebuilds to satisfy "moo"
Back to top
View user's profile Send private message
mantoo
Tux's lil' helper
Tux's lil' helper


Joined: 08 Dec 2007
Posts: 98
Location: Germany

PostPosted: Mon Apr 21, 2008 9:14 pm    Post subject: Re: Memory problems, system slow Reply with quote

kirikou wrote:


I tried the trick suggested in another thread (ANT_OPTS="-Xmx512M") but it doesn't work.



this is a prob which i found first time on my machine, while trying to update from azureus 3.0.5.0 to 3.0.5.2

i also tried that option, further i also tried that:
Code:
export ANT_OPTS="-Xms512m -Xmx512m"

and even tried to raise to 1024 mb... (ive got 2 gigs of ram, dualcore 2x2 ghz....)

didnt find any soultion yet.... ??

oh, my output:
Code:
free -m
             total       used       free     shared    buffers     cached
Mem:          2026       1727        299          0         93       1170
-/+ buffers/cache:        463       1563
Swap:          980          3        976
Back to top
View user's profile Send private message
kirikou
Tux's lil' helper
Tux's lil' helper


Joined: 03 Nov 2006
Posts: 83

PostPosted: Mon Apr 21, 2008 9:43 pm    Post subject: Reply with quote

My root partition is full at 89%, there is 1.6 Go space left...
Back to top
View user's profile Send private message
peakeyed
n00b
n00b


Joined: 18 Nov 2004
Posts: 60

PostPosted: Mon Apr 21, 2008 11:49 pm    Post subject: same problem Reply with quote

I have all the same symptoms that you have described on my newly built box. I don't have the time to investigate yet. I hope you find a fix. Good luck.
Back to top
View user's profile Send private message
energyman76b
Advocate
Advocate


Joined: 26 Mar 2003
Posts: 2048
Location: Germany

PostPosted: Tue Apr 22, 2008 1:59 am    Post subject: Reply with quote

kirikou wrote:
I did what you suggested.
java uses only about 8.7% of the memory, but between 50 and 60% of the CPU.
I forgot to say that I set PORTAGE_NICENESS to 15.
During the compilation (before it fails), my system become almost unresponsive, despite the high niceness of portage...


set portage niceness to 19. Its better in every aspect (have a look into /usr/src/linux/Documentation why it is a good choice for compiling).
check that your are not using some energy saving stuff that pins your mhz at the lowest number.
check your bios.
_________________
Study finds stunning lack of racial, gender, and economic diversity among middle-class white males

I identify as a dirty penismensch.
Back to top
View user's profile Send private message
kirikou
Tux's lil' helper
Tux's lil' helper


Joined: 03 Nov 2006
Posts: 83

PostPosted: Tue Apr 22, 2008 9:37 am    Post subject: Reply with quote

I set my portage niceness to 19 as recommended.
My CPU runs at full power 1.7 Ghz (pentium-m).

Quote:
check your bios.

What do you mean ?
Back to top
View user's profile Send private message
energyman76b
Advocate
Advocate


Joined: 26 Mar 2003
Posts: 2048
Location: Germany

PostPosted: Tue Apr 22, 2008 12:40 pm    Post subject: Reply with quote

well, make sure that your memory runs at the correct speed and that 'Spread Spectrum' stuff is disabled (won't help with speed, but does help with stability).
_________________
Study finds stunning lack of racial, gender, and economic diversity among middle-class white males

I identify as a dirty penismensch.
Back to top
View user's profile Send private message
BradN
Advocate
Advocate


Joined: 19 Apr 2002
Posts: 2391
Location: Wisconsin (USA)

PostPosted: Tue Apr 22, 2008 3:47 pm    Post subject: Reply with quote

Actually spread spectrum makes the clock signal slightly irregular on purpose, to reduce EMI interference on that specific frequency. By altering the signal, it spreads out the frequencies that end up emitted a bit, and depending how tight the timings already are for devices on the bus in question, this could actually hurt reliability slightly.
Back to top
View user's profile Send private message
Carsomyr
n00b
n00b


Joined: 24 Mar 2008
Posts: 36
Location: Pretoria, South-Africa

PostPosted: Tue Apr 22, 2008 6:02 pm    Post subject: Reply with quote

I've seen at east one install running very slowly due to frequency scaling keeping the CPU at minimum because no module was loaded.

Try
Code:
cat /proc/cpuinfo
and check that the CPU really is running at the correct speed.

Also try
Code:
modprobe acpi_cpufreq
and then check the speed again
Back to top
View user's profile Send private message
kirikou
Tux's lil' helper
Tux's lil' helper


Joined: 03 Nov 2006
Posts: 83

PostPosted: Wed Apr 23, 2008 9:13 am    Post subject: Reply with quote

I did a cat /proc/cpuinfo, all seems normal (my processor frequency varies between 600Mhz and 1.7Ghz.
I have no module acpi_cpufreq. However if I do a grep -i acpi_cpufreq /usr/src/linx/.config I got the following entries
Code:
CONFIG_X86_ACPI_CPUFREQ=m
# CONFIG_X86_ACPI_CPUFREQ_PROC_INTF is not set
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum