How diagnose why my computer's running much slower than before with opensuse 11.3?

Yes, I know of “top” and such commands but I have no way of really figuring out what I do/do not need to speed up my computer. I’ve noticed that:

  1. A lot of programs take a lot longer to load than they used to
  2. There seems to be less RAM available than previously with the same programs

I’m sure I can shut some programs/services down, but I’m not sure which ones. Any help is greatly appreciated. :slight_smile:

The problem is likely the activity of strighi. If you have a valid graphic card at least. Try to go into desktop setting and to deactivate the “desktop search service”. This should lower to a greater extent the consumption of RAM and speed. One note: If you want to have clear indications you should get used to formulate clear questions and give sufficient information. That is:

  • age of the machine
  • chip-set
  • ram size
  • graphic card processor and graphic memory
  • driver of graphic card installed
  • space available on the partition.
  • is this a fresh install or did you do an upgrade
  • if you did an upgrade, which method did you follow
  • do you use KDE or Gnome and what version of it
  • try to quantify slower…

You see, with a bit more information, more people will try to help.

Thanks! Nepomuk is already off (or at least unchecked).

Also, one thing that definitely has slowed down in the last month or so is VLC startup. I notice that vlc now takes a good 15 seconds before the window even shows up after I click a video file. (It’s not the only thing slower, but the most noticeable)

Here’s my info:

CPU : AMD Sempron™ Processor 3100+, 1,808.59 MHz
RAM: 1.4 GiB
Free memory: 51.7 MiB (+ 96.9 MiB Caches)
Free swap: 1.8 GiB

Kernel: Linux 2.6.34.10-0.4-default i686
OS: openSUSE 11.3 (i586)

Desktop: 4.4.4 (KDE 4.4.4) “release 3”
Display Model: nVidia Corporation GeForce 8400 GS
2D driver: nvidia
3D driver: NVIDIA 290.10

  • Is fresh install
  • Root folder partition ("/") has 12.7 GB available
  • home has 175 GB available
  • Both are ext4
  • Computer is 6 years old, but has new RAM, 2+ year old graphics card, new HD

Your machine is quite slow and has not much RAM. How much free space do you have on the root directory and on the /home?
Do you have an encrypted /home file system with LUKS?
Did you have crashes before this did start?

Sure, but this slowness is new.

Root folder partition ("/") has 12.7 GB available

No

No

Are all partitions (but swap) Ext3? Did you switch on journaling?
Try to look whether in your system when this happens are running multiple instances of the same program. Sometimes, if a program crashes and stays resident, it may cause this issue if it opens a new working instance. You will then have two voir three simultaneous instances running.
Have a look also on RAM. If your machine has 4 banks and one of the 4 is not able to hold synchronization, the system will down-grade RAM speed (and therefore the speed of all banks). This could be an issue, I had it on one machine. You could run memtest or mprime to find out whether the RAM is good. (Just trying to think about all possible origins).

Ext4

How do I check this? And if it’s not on, how do I turn it on?

Where shold I look for this? I don’t know what a ton of programs in “top” actually are.

How do I run memtest?

Thanks!

Are you running Desktop Effects?

I have a thread discussing a noticeable slowdown I observed in two particular applications having migrated from 11.3 to 12.1: http://forums.opensuse.org/forums/english/get-technical-help-here/applications/469196-noticable-deterioration-libreoffice-i-o-performance-12-1-a.html#post2415199 As I just mentioned in that thread, turning off DE (after having run with it on since the new installation) has actually significantly increased the perceived responsiveness not only in the two apps in which I noticed the slowdown, but of the system as a whole.

memtest is a bootable app …you can either download an memdisc image and burn it to disc, or grab one of the many bootable utility discs that also include memdisc … come to think of it, doesn’t the openSUSE install disc? Also the BIOS from some mainboard manufacturers also have a memory diagnostic feature via also packaging memdisc.

The problem exists with/without desktop effects.

perhaps you should try xfce. It seems to run programs a lot faster than kde or gnome.

So, to understand well. You have an installation with 11.3 running. You are using EXT4. At the time when 11.3 came out, for what I recall it was the first time that EXT4 was used in the distro. I do not think that this is necessarily a EXT4 Problem, but still, at this point I am suggesting a complete backup of your data in /home. You can do this easily using an external HDD using the command line. I do not think you are comfortable using the CLI (command line) by reading you. If this is the case and you have to do a backup, do not worry. I can help you to do it, it is a very easy and straightforward procedure…and afterwards you feel much more “at ease” with it. You will tell me if you wish to proceed with this.

You can check if journaling is activated by yast. But as you apparently did not change anything since install and the problem manifested after long time, spontaneously without crash, I would not change anything there. We can have a look in a different thread to give you an idea about what partitions really are, how they are named and what “journaling”, “ordered” and other options mean. But as it is something where you can effectively damage your system if you work without watching your steps, I would rather advice not to discuss it now and instead focus on a good backup.

You can get a good and comprehensive explanation of the “top” window on this page](http://www.go2linux.org/top-linux-command-line-to-show-running-processes-in-real-time). It is well done and gives examples. If you have question about the content please ask specifically which part you do not understand. Once read this (not long) you will have solved this point I think.

The easiest way to run memtest86 to get a first idea, is to use the distribution DVD, put it in the drive before booting up. Boot from DVD and choose in the menu given: test memory.
You could do this before going to bed. You let it run. No errors should occur when you come back in the morning. If you have an error it should also tell you where it is (the location in banks of the module) so you know already which one to take off.

One note, sorry for not answering you yesterday, but your post (probably for technical reasons) appeared only after I went off-line. We have another time zone so sometimes I will answer like now only the day after.

You are welcome.

I am comfortable using the command line, I’m just not very knowledgeable about partitions, journaling, process-management and other sys admin stuff. Please do help me with this, it’s greatly appreciated.

That’s fine but do feel free to pass on links to info on that stuff and I’d love to read it and learn more on journaling, etc.

Unfortunately, no. I know how to use top. But I have no idea what the many, many things it lists are and whether or not I need those things running.

Not a problem! :slight_smile:

Ok, we will go for the backup. I will take you step by step. I suggest we make a “perfect copy” of your /home on an external usb-hdd. The latter should be formatted Ext4 (or 3). The space available must at least be the same as the amount of space filled on your /home. We will not compress the data but perfectly copy all files to it, but without changing the attributes (permissions) of the files. If we would simply copy via the command line or via the file manager, you would risk a permission problem. And some files you cannot copy them while you use them. The best is therefore to do the process of copying in runlevel 1. That means that no other user is there but root. You do not have X and you do not have a graphical interface. Since this is so, and since has its account in /root and not in /home, no file in /home will be in use. All will be copied. In order to get confident with the runlevel you may play a bit. To play, save all what you are working on in KDE, and do not have any suspended work open (as the command will close the desktop, I do not want you to loose your work). You open a terminal window. Then you type:

su -

This tells the system that you want to switch user and to become another one. If you ommitt the user, in openSUSE the system assumes you writing:

su – root

Without the minus you would execute the command with root rights but you would not load the environment variables of root, but your own one.
If you want to play with the command before doing the nest steps, just do a:

su – yeti

assuming that the yeti user is not part of your system (I hope so), the command line will return

the user yeti doesn't exit

Or in French as in your case.
Once you are root (with su -) you type

 init 1

. This will bring you to the runlevel 1 (only one user, no network, just the basic system). The system will go down to this runlevel and then it will ask you just for the root password. You give it…and you are root in runlevel 1.
Now imagine you are finished with the backup and you want to go back to the desktop. Do you have to restart the machine? No, you don’t. Just type

 init 5

it takes you to runleve 5. If now you put in your login, you may work with your account as command line. But why would you bother, you want to go back to business and to KDE. So you do… just nothing. Instead of putting a user to login, you wait. After a few seconds KDM will come up and offer you the usual login screen. You login and voilà, you have your desktop back. Later when you have time, you can look at yast where you find an indications on what service is started in what runlevel. You can attain the respective runlevel by just putting the number: 1, 2, 3 etc, as in the case of “init 1”. So if you know that e.g. the system failes at runlevel 5 you can work in runlevel 3 and try to fix it.
I am writing you all this to make you feel confortable and to tell you what you actually do. If this is all known to you and too easy, just tell me, I will then be synthetic. But I think, if it should by chance not be the case, as you will work with runlevels you will use them and you will a) know what you are doing and b) be able after to remember and therefore c) be free.
So that is the idea. If instead you prefer in shorthand the code I can do this too. You will tell me. As I do not know your skills, I have to guess what you prefer. BTW. read the article of the link for top anyway. It helps. Afterwards we can still have a look about what is what and why you do need it, or not. Fair enough?

Thank you very much, this is perfect, I’m able to follow along with everything so far. :slight_smile:

We want now to mount the external HDD. First of all, once it is connected, you want to know how it is identified. You open a terminal and write:

mount

This should give you a list of all devices mounted in this moment. In my case, without an external usb key:

mount 
/dev/sda3 on / type ext3 (rw,acl,user_xattr) 
proc on /proc type proc (rw) 
sysfs on /sys type sysfs (rw)
 debugfs on /sys/kernel/debug type debugfs (rw)
 udev on /dev type tmpfs (rw)
 devpts on /dev/pts type devpts (rw,mode=0620,gid=5)
 /dev/sda1 on /boot type ext3 (rw,acl,user_xattr)
 /dev/mapper/cr_sda4 on /home type ext3 (rw,acl,user_xattr)
 fusectl on /sys/fs/fuse/connections type fusectl (rw)
 securityfs on /sys/kernel/security type securityfs (rw)
 none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
 proc on /var/lib/ntp/proc type proc (ro)

But when I join now an usb-key (in shocking pink):

mount 
/dev/sda3 on / type ext3 (rw,acl,user_xattr)
 proc on /proc type proc (rw)
 sysfs on /sys type sysfs (rw)
 debugfs on /sys/kernel/debug type debugfs (rw)
 udev on /dev type tmpfs (rw)
 devpts on /dev/pts type devpts (rw,mode=0620,gid=5)
 /dev/sda1 on /boot type ext3 (rw,acl,user_xattr)
 /dev/mapper/cr_sda4 on /home type ext3 (rw,acl,user_xattr)
 fusectl on /sys/fs/fuse/connections type fusectl (rw)
 securityfs on /sys/kernel/security type securityfs (rw)
 none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
 proc on /var/lib/ntp/proc type proc (ro)
 **/dev/sdb1 on /media/USB Drive-1 type fuseblk (rw,nosuid,nodev,allow_other,default_permissions,blksize=4096)**

As you see, every hdd is recongized as “sd” (green) and then attributed a *letter. *The first physical HDD is sda, the second sdb. Every partition is given a *number. *The first partition on sda is given the “1” so sda1, second is sda2…etc. You may think of the HDD as a cake. The slices you cut into that cake are the partitions. Since I have one hdd drive with several partitions and one external usb key with only one partition the latter is shown as /dev/sdb1 on /media/USB_Drive-1. The first one is the device node (that is the physical device, you will need to remember what is is called for the backup later) and the second one is the URL, given up to now automatically by your system, at which we can reach the mounted devicė. A physical device is “per se” not usable You need to mount it to some folder available in the file system to be able to access it. So first of all we will create our folder to make later our external drive available. We will create it in the directory /mnt and call it /mnt/temp. Open a terminal and write:

su - 
cd.. 
md /mnt/temp
exit

That is, change user to superuser, change directory to / and create a subdirectory (make a direktory) called temp in the direktory /mnt.It is good practice to exit the superuser mode after you are done (exit). When you have arrived here, we are now very close to our backup, you can have a look at your directory “ / “ by using the dolphin or whatever file-manager you wish to see that your directory is there. You can play with the “md” command in your home directory in order to create one or two “bogus directory”. Do not create them as superuser of course but as yourself, as you will wish to have the ownership over them. When you are comfortable with the results, with your /mnt/temp created, we will go on.

So, am I correct that in the example above, we have:

  1. Physical device: /dev/sdb
  2. Physical device/partition: /dev/sdb1
  3. Mount point/url: /media/USB Drive-1

Is that right?

Yep, I follow this.

Perfect, everything is right. Then we can proceed if you wish.

O.K. We are going to the backup.

We will assume that your harddisk is /dev/sdb1. If it is not please change the code accordingly. The sign # stands for comment. So I do not have to go out of “code” tags all the time. Here we go: branch your external hdd. Wait that it has been recognized. Then just right click and tell the system to “safely remove”. Then leave it attached. Open a terminal. Type



 **su -
**
**init 1**
 #wait, then give pwd. Once you are root:

**mount /dev/sdb1 /mnt/temp**


 #between the first and the second expression there is a space. You order to mount your external hdd to the directory /mnt/temp. Now:


**cp -ax /home /mnt/temp**


 #This will copy all (cp x) user accounts and files contained in /home to /mnt/temp while conserving the attributes (a). But you remember that you did mount sdb1 to /mnt/temp? Therefore in reality it copies all the user accounts of /home to /dev/sdb1. This will take a big while. During the copy your system will not show the prompt. It may be that the monitor goes in power savings mode. If you press the space bar you can see if the prompt has returned. It does not disturb the process. Now when it has finished and the prompt is there, nice and red on your screen. And you go:

 

 **cd /mnt/temp** #change to the directory /mnt/temp – voir /dev/sdb1

 **dir **# show all the content of that directory

 #you should see all your files and directories of the backup flying by. Then you go:

 

 **umount /dev/sdb1**

 

 #you unmount your external hdd, so it will mount automatically with the kde desktop when you will return to it. You return to runlevel 5:

 

 **init 5**

 

 #wait for kdm coming up, login.
 

 

Now you should have a perfect backup with all the attributes conserved on your external hdd. If something happens you will simply “copy it back”. We will “play” this recovery scenario once you tell me you arrived here.

NOTE: ! for 300 GB e.g. that can take the whole night if it is usb 2.0. e-sata and usb 3.0 will be slightly faster.

Thanks again! So I have a few questions, but first, I believe these are all my steps, right?

#This logs in as root
su -

#switch to run lebel 1: no network, one user, no x-11
init 1

#find external usb drive's name
mount

#create folder ot mount it at (below is example name)
md /mnt/temp

#mount it
mount /dev/sdb1 /mnt/temp

#Copy entire home folder to external drives
cp -ax /home /mnt/temp

#change to external hd
cd /mnt/temp

#show files just backed up
dir

#unmount the external disk
umount /dev/sdb1

#return to normal (wait a few seconds for KDE to reload)
init 5

My questions:

  1. If I want to put the backup into a subfolder on the external drive (and I haven’t created that yet) can I do:
#Create folder on already mounted drive
md /mnt/temp/backup_09_12_2011

#Now backup to that folder instead of to external hd's base folder
cp -ax /home /mnt/temp/backup_09_12_2011
  1. After I backup /home folder, can I reset it back to what it was when I first installed it (or some sort of clean default) and see if that fixes my issues?