PDA

View Full Version : Ubuntu diventato mostruosamente lento


Rutenio
23-03-2008, 11:40
Salve a tutti, ho installato una distribuzione basata su ubuntu (7.04): linux mint che sul laptop e' rimasta per un annetto senza aver avuto nessun cenno di cedimento minimo. In occasione di una riempitura del disco (quindi non avviava piu' gnome perche' non poteva creare file temporanei) ed a una successiva pulitura da terminale dei file obsoleti (adesso ho 30 giga di spazio libero), il sistema e' diventato inspiegabilmente lento... Lento all'avvio, lento ad aprire le cartelle, lento ad avviare programmi (dopo il doppio click passano minimo 2 minuti).
Sapere dirmi dove poter guardare per risolvere senza reinstallare tutto? (la configurazione della scheda wireless, della stampante e dello scanner mi hanno fatto dannare per settimane)
Grazie in anticipo...

Gimli[2BV!2B]
23-03-2008, 12:12
Quanta RAM hai a disposizione all'avvio?
Ispeziona un attimo la situazione con questo programma:sudo apt-get install htop
htopIn particolare riporta i valori della seconda (Mem) e terza (Swp) riga, e controlla nell'elenco dettagliato sottostante quali sono i processi che sembrano mangiare più RAM.

Poi diamo un occhio ai demoni in avvio:sudo apt-get install rcconf
sudo update-rcconf-guide
sudo rcconfElenca quali demoni trovi attivati (nell'elenco sono i primi, quelli con l'asterisco nella prima colonna).

Rutenio
23-03-2008, 12:34
inanzitutto grazie infinite per la repentina risposta
Rispondentoti (dopo un quarto d'ora per installare ed effettuare la procedura elencata :p )
La memoria occupata e' 312 mb su 512
la swap 38 mb su 1024
Nessun processo pare occupare un quantitativo esagerato di memoria (o meglio nessun processo ha valori piu' alti di quelli indicati da "top", prima dell'accaduto di questo fatto...)

I demoni con asterisco sono:
915resolution
dbus
gdm
hplip
samba
usplash

Non sono riuscito a fare copia incolla degli screen che mi hai richiesto, tuttavia dopo sudo update-rcconf-guide ho ricevuto questi messaggi:
Reading /etc/init.d and getting package description ...
Writing package default guide to /var/lib/rcconf/guide.default ...
Use of uninitialized value in concatenation (.) or string at /usr/sbin/update-rcconf-guide line 101.
Use of uninitialized value in concatenation (.) or string at /usr/sbin/update-rcconf-guide line 101.
Use of uninitialized value in concatenation (.) or string at /usr/sbin/update-rcconf-guide line 101.
Use of uninitialized value in concatenation (.) or string at /usr/sbin/update-rcconf-guide line 101.
Use of uninitialized value in concatenation (.) or string at /usr/sbin/update-rcconf-guide line 101.
Use of uninitialized value in concatenation (.) or string at /usr/sbin/update-rcconf-guide line 101.
Use of uninitialized value in concatenation (.) or string at /usr/sbin/update-rcconf-guide line 101.
Use of uninitialized value in concatenation (.) or string at /usr/sbin/update-rcconf-guide line 101.
Use of uninitialized value in concatenation (.) or string at /usr/sbin/update-rcconf-guide line 101.
Use of uninitialized value in concatenation (.) or string at /usr/sbin/update-rcconf-guide line 101.
Use of uninitialized value in concatenation (.) or string at /usr/sbin/update-rcconf-guide line 101.
Use of uninitialized value in concatenation (.) or string at /usr/sbin/update-rcconf-guide line 101.
Done.

hai idea do cosa potrebbe avere il mio portatile?
Grazie di nuovo :)

Gimli[2BV!2B]
23-03-2008, 13:03
Ok, sembrano non esserci demoni succhiarisorse ne processi fuori di testa... (update-rcconf non fa altro che aggiornare le descrizioni di rcconf per renderlo più facilmente interpretabile, non preoccuparti di quelle righe).

Proviamo a controllare in che stato è il DMA del disco fisso:sudo hdparm -i /dev/hdaAh, /dev/hda va bene se hai un disco IDE, se hai un SATA usa /dev/sda.

Rutenio
23-03-2008, 13:21
allora, hdparm -i mi da questi risultati:

/dev/sda:

Model=TOSHIBA MK8034GSX , FwRev=AH301H , SerialNo= 274KFFPPS
Config={ Fixed }
RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=4
BuffType=unknown, BuffSize=0kB, MaxMultSect=16, MultSect=?16?
CurCHS=17475/15/63, CurSects=16513875, LBA=yes, LBAsects=156301488
IORDY=on/off, tPIO={min:240,w/IORDY:120}, tDMA={min:120,rec:120}
PIO modes: pio0 pio1 pio2 pio3 pio4
DMA modes: sdma0 sdma1 sdma2 mdma0 mdma1 mdma2
UDMA modes: udma0 udma1 udma2 udma3 udma4 *udma5
AdvancedPM=yes: unknown setting WriteCache=enabled
Drive conforms to: Unspecified: ATA/ATAPI-3 ATA/ATAPI-4 ATA/ATAPI-5 ATA/ATAPI-6 ATA/ATAPI-7

* signifies the current active mode

Gimli[2BV!2B]
23-03-2008, 13:53
Ufff! Anche il disco va ad UDMA5, pure lui è a posto!

Dunque, vediamo, le opzioni che mi sembravano più ovvie sono finite, ora andrò a largo spettro.

Non è che hai qualcosa di particolare in avvio in Gnome?
Hai aggiornato il sistema (sudo apt-get dist-upgrade)?
Che versione del kernel hai?
In cosa è consistita la "pulitura da terminale dei file obsoleti"?
Ogni tot di riavvii dovrebbe essere forzato un controllo dei filesystem, il file /var/log/fsck/checkroot dovrebbe contenere il risultato riguardante /, aprilo con sudo nano /var/log/fsck/checkroot e posta il contenuto.
Il file ~/.xsession-errors è grande (>2Kb)? Se lo apri trovi errori ripetuti?


Consigli molto generici per ripulire il filesystem:

rimozione di copie locali di deb obsoletesudo apt-get autoclean
individuazione di pacchetti orfani, rimasti inutilmente installati dopo disinstallazioni di programmiapt-get install deborphan
deborphan
Se nella lista che ottieni non trovi nulla che riconosci disinstalla tutto in automatico con:sudo dpkg -P `deborphan`ripetere fino a che deborphan non elenca più nulla.

Gimli[2BV!2B]
23-03-2008, 14:16
Facendo una ricerca generica ho trovato qualche (http://ubuntuforums.org/showthread.php?t=362646) Ubuntuista (http://ubuntuforums.org/showthread.php?t=296443) che si lamenta degli stessi problemi. Sembra che la soluzione ai loro rallentamenti (http://ubuntuforums.org/showpost.php?p=1959816&postcount=10) abbia riguardato, inaspettatamente, il contenuto dei files /etc/hostname ed /etc/hosts.
Prova a postare il contenuto di questi files.

Rutenio
23-03-2008, 15:57
**** EDIT *****

RISOLTO! Grazie infinite!

Come suggerito dal post linkato, il problema pare esser stato questo:

/etc/hosts
127.0.0.1 localhost
127.0.1.1 stefano-laptop

# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts

Ho commentato tutte le voci eccetto la prima
Sistema scattante come e' sempre stato
Pero devo dire che ho effettuato la distallazione con deborfan, come consigliato...
GRAZIE ANCORA DI NUOVO! ti devo una birra :D

pero' ho questi errori in xsession.errors che non mi convincano...

/etc/gdm/PreSession/Default: Registering your session with wtmp and utmp
/etc/gdm/PreSession/Default: running: /usr/X11R6/bin/sessreg -a -w /var/log/wtmp -u /var/run/utmp -x "/var/lib/gdm/:0.Xservers" -h "" -l ":0" "giampaolo"
/etc/gdm/Xsession: Beginning session setup...
SESSION_MANAGER=local/stefano-laptop:/tmp/.ICE-unix/10888
Initializing gnome-mount extension
Initializing nautilus-open-terminal extension

(gnome-panel:10956): Gtk-WARNING **: gtk_widget_size_allocate(): attempt to allocate widget with width -3 and height 24
Initialising aMule
Checking if there is an instance already running...
No other instances are running.
Loading temp files from /home/giampaolo/.aMule/Temp.

Loading PartFile 1 of 23
Loading PartFile 2 of 23
Loading PartFile 3 of 23
Loading PartFile 4 of 23
Loading PartFile 5 of 23
Loading PartFile 6 of 23
Loading PartFile 7 of 23
Loading PartFile 8 of 23
Loading PartFile 9 of 23
Loading PartFile 10 of 23
Loading PartFile 11 of 23
Loading PartFile 12 of 23
Loading PartFile 13 of 23
Loading PartFile 14 of 23
Loading PartFile 15 of 23
Loading PartFile 16 of 23
Loading PartFile 17 of 23
Loading PartFile 18 of 23
Loading PartFile 19 of 23
Loading PartFile 20 of 23
Loading PartFile 21 of 23
Loading PartFile 22 of 23
Loading PartFile 23 of 23
All PartFiles Loaded.
ListenSocket: Ok.

External connections disabled in config file
*** Server UDP socket (TCP+3) at 0.0.0.0:14665
*** TCP socket (TCP) listening on 0.0.0.0:14662
*** Client UDP socket (extended eMule) at 0.0.0.0:14672
Adding file /home/giampaolo/.aMule/Temp/038.part.met to shares
Adding file /home/giampaolo/.aMule/Temp/030.part.met to shares
Adding file /home/giampaolo/.aMule/Temp/027.part.met to shares
Adding file /home/giampaolo/.aMule/Temp/026.part.met to shares
Adding file /home/giampaolo/.aMule/Temp/025.part.met to shares
Adding file /home/giampaolo/.aMule/Temp/024.part.met to shares
Adding file /home/giampaolo/.aMule/Temp/023.part.met to shares
Adding file /home/giampaolo/.aMule/Temp/022.part.met to shares
Adding file /home/giampaolo/.aMule/Temp/020.part.met to shares
Adding file /home/giampaolo/.aMule/Temp/019.part.met to shares
Adding file /home/giampaolo/.aMule/Temp/018.part.met to shares
Adding file /home/giampaolo/.aMule/Temp/017.part.met to shares
Adding file /home/giampaolo/.aMule/Temp/015.part.met to shares
Adding file /home/giampaolo/.aMule/Temp/014.part.met to shares
Adding file /home/giampaolo/.aMule/Temp/012.part.met to shares
Adding file /home/giampaolo/.aMule/Temp/011.part.met to shares
Adding file /home/giampaolo/.aMule/Temp/010.part.met to sThe program 'totem' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadMatch (invalid parameter attributes)'.
(Details: serial 5793 error_code 8 request_code 141 minor_code 13)
(Note to programmers: normally, X errors are reported asynchronously;
that is, you will receive the error a while after causing it.
To debug your program, run it with the --sync command line
option to change this behavior. You can then get a meaningful
backtrace from your debugger if you break on the gdk_x_error() function.)

** (gnome-cups-icon:10980): WARNING **: IPP request failed with status 1280

** (gnome-cups-icon:10980): WARNING **: IPP request failed with status 1280
The program 'totem' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadMatch (invalid parameter attributes)'.
(Details: serial 3349 error_code 8 request_code 141 minor_code 13)
(Note to programmers: normally, X errors are reported asynchronously;
that is, you will receive the error a while after causing it.
To debug your program, run it with the --sync command line
option to change this behavior. You can then get a meaningful
backtrace from your debugger if you break on the gdk_x_error() function.)
[mpeg4 @ 0xb5f9c8b4]slice end not reached but screenspace end (32 left EFBE2F, score= -41)
[mpeg4 @ 0xb5f9c8b4]concealing 1080 DC, 1080 AC, 1080 MV errors
The program 'totem' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadMatch (invalid parameter attributes)'.
(Details: serial 1803 error_code 8 request_code 141 minor_code 13)
(Note to programmers: normally, X errors are reported asynchronously;
that is, you will receive the error a while after causing it.
To debug your program, run it with the --sync command line
option to change this behavior. You can then get a meaningful
backtrace from your debugger if you break on the gdk_x_error() function.)
The program 'totem' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadMatch (invalid parameter attributes)'.
(Details: serial 1311 error_code 8 request_code 141 minor_code 13)
(Note to programmers: normally, X errors are reported asynchronously;
that is, you will receive the error a while after causing it.
To debug your program, run it with the --sync command line
option to change this behavior. You can then get a meaningful
backtrace from your debugger if you break on the gdk_x_error() function.)
[mpeg4 @ 0xb5f388b4]warning: first frame is no keyframe
The program 'totem' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadMatch (invalid parameter attributes)'.
(Details: serial 1300 error_code 8 request_code 141 minor_code 13)
(Note to programmers: normally, X errors are reported asynchronously;
that is, you will receive the error a while after causing it.
To debug your program, run it with the --sync command line
option to change this behavior. You can then get a meaningful
backtrace from your debugger if you break on the gdk_x_error() function.)
[mpeg4 @ 0xb5fcf8b4]frame skip 8
[mpeg4 @ 0xb5fcf8b4]frame skip 8
[mpeg4 @ 0xb5fcf8b4]frame skip 8
[mpeg4 @ 0xb5fcf8b4]frame skip 8
[mpeg4 @ 0xb5fcf8b4]frame skip 8
[mpeg4 @ 0xb5fcf8b4]frame skip 8
The program 'totem' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadMatch (invalid parameter attributes)'.
(Details: serial 1757 error_code 8 request_code 141 minor_code 13)
(Note to programmers: normally, X errors are reported asynchronously;
that is, you will receive the error a while after causing it.
To debug your program, run it with the --sync command line
option to change this behavior. You can then get a meaningful
backtrace from your debugger if you break on the gdk_x_error() function.)
gnome-mount 0.5
The program 'totem' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadMatch (invalid parameter attributes)'.
(Details: serial 740 error_code 8 request_code 141 minor_code 13)
(Note to programmers: normally, X errors are reported asynchronously;
that is, you will receive the error a while after causing it.
To debug your program, run it with the --sync command line
option to change this behavior. You can then get a meaningful
backtrace from your debugger if you break on the gdk_x_error() function.)
(synaptic:32171): Vte-WARNING **: Impossibile trovare il tipo di carattere appropriato per il carattere U+4e00.


(synaptic:32171): Vte-WARNING **: Impossibile trovare il tipo di carattere appropriato per il carattere U+4e8c.


(synaptic:32171): Vte-WARNING **: Impossibile trovare il tipo di carattere appropriato per il carattere U+4e09.


(synaptic:32171): Vte-WARNING **: Impossibile trovare il tipo di carattere appropriato per il carattere U+56db.


(synaptic:32171): Vte-WARNING **: Impossibile trovare il tipo di carattere appropriato per il carattere U+4e94.


(synaptic:32171): Vte-WARNING **: Impossibile trovare il tipo di carattere appropriato per il carattere U+ac00.


(synaptic:32171): Vte-WARNING **: Impossibile trovare il tipo di carattere appropriato per il carattere U+ac01.


(synaptic:32171): Vte-WARNING **: Impossibile trovare il tipo di carattere appropriato per il carattere U+ac04.


(synaptic:32171): Vte-WARNING **: Impossibile trovare il tipo di carattere appropriato per il carattere U+ac08.


(synaptic:32171): Vte-WARNING **: Impossibile trovare il tipo di carattere appropriato per il carattere U+ac10.

ERROR: ld.so: object 'libjvm.so' from LD_PRELOAD cannot be preloaded: ignored.
ERROR: ld.so: object 'libawt.so' from LD_PRELOAD cannot be preloaded: ignored.
X Error: BadDevice, invalid or uninitialized input device 169
Major opcode: 145
Minor opcode: 3
Resource id: 0x0
Failed to open device
X Error: BadDevice, invalid or uninitialized input device 169
Major opcode: 145
Minor opcode: 3
Resource id: 0x0
Failed to open device
ERROR: ld.so: object 'libjvm.so' from LD_PRELOAD cannot be preloaded: ignored.
ERROR: ld.so: object 'libawt.so' from LD_PRELOAD cannot be preloaded: ignored.
X Error: BadDevice, invalid or uninitialized input device 169
Major opcode: 145
Minor opcode: 3
Resource id: 0x0
Failed to open device
X Error: BadDevice, invalid or uninitialized input device 169
Major opcode: 145
Minor opcode: 3
Resource id: 0x0
Failed to open device
Avviso del window manager: Specificato un WM_TRANSIENT_FOR finestra 0x5d non valido per 0x2e00002 (Opera).
Avviso del window manager: Specificato un WM_TRANSIENT_FOR finestra 0x5d non valido per 0x2e0002a (Plug-ins).
Avviso del window manager: Specificato un WM_TRANSIENT_FOR finestra 0x5d non valido per 0x2e000d4 (Plug-in pa).
checking for valid crashreport now
checking for valid crashreport now

Gimli[2BV!2B]
23-03-2008, 16:38
Molto bene!

Non ho ben chiaro il motivo della cosa, nella mia Debian ho un /etc/hosts ben più popolato, ma non ho alcun problema:127.0.0.1 localhost
10.x.x.x adsl2mue
10.x.x.x phoenix
192.168.0.2 acubens
192.168.1.2 altarf


Per .xsession-errors direi che non vedo nulla di preoccupante: ci sono i massaggi di Amule, molti errori riguardano un filmato danneggiato, poi c'è Synaptic (installatore software o touchpad? mah...) che si lamenta di non so che caratteri, per finire ecco un po' di errorini di non altissima importanza.

Per quanto riguarda l'aggiornamento del sistema, direi che sarebbe meglio darci un'occhiata di tanto in tanto, ma in effetti se non incontri problemi particolari potresti risparmiarti qualche grattacapo lasciando le cose come sono.

Alla prossima! :cincin:

lele_75
01-01-2010, 21:18
ciao a tutti,
ho avuto lo stesso problema, risolto come detto, modificando il file hosts.
qualcuno gentilmente potrebbe chiarirmi il legame tra il rallentamento del sistema e il file hosts?
grazie
ciao

Gimli[2BV!2B]
02-01-2010, 00:22
Sembra che il problema nasca da queste due righe:
127.0.0.1 localhost
127.0.1.1 hostname

hostname dev'essere ciò che si trova nel file /etc/hostname


Qualsiasi indirizzo della rete loopback 127/8 (da 127.0.0.1 a 127.255.255.255) indica il pc su cui è installato il sistema operativo.

Alcuni programmi, erroneamente, si aspettano che il nome del pc sia associato all'indirizzo 127.0.0.1 andando in errore se lo trovano fuori posto.

Trovo improbabile che si tratti di un errore relativo all'hostname che dev'essere associato a 127.0.0.1, trattandosi di Gnome.
Inoltre non si osservano errori, ma tempi di attesa discreti (10 - 20 secondi esatti) che sembrano timeout.

Ipotesi: non è che hai impostato un firewall che consente traffico solo sull'indirizzo 127.0.0.1, bloccando il 127.0.1.1 e tutti gli altri indirizzi loopback?

gianlucab70
04-01-2010, 18:08
.....Che strano.
Io ho una debian 5 stable e questo è il mio /etc/hosts:
127.0.0.1 localhost
127.0.1.1 BLUM

# The following lines are desirable for IPv6 capable hosts
::1 localhost ip6-localhost ip6-loopback
#fe00::0 ip6-localnet
#ff00::0 ip6-mcastprefix
#ff02::1 ip6-allnodes
#ff02::2 ip6-allrouters
#ff02::3 ip6-allhosts

Come vedete è uguele a quello di rutenio che ha ubuntu.
Ho commentato pure io i file consigliati.
Tutto ok.

Gimli[2BV!2B]
04-01-2010, 19:58
Confermo che in Debian è così, con il 127.0.1.1 (http://qref.sourceforge.net/Debian/reference/ch-gateway.en.html#s-net-dns)

Io stesso ho il file impostato in quel modo e tutto funziona perfettamente.

Per questo ho ipotizzato il firewall con impostazioni errate.