LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Why is searching in linux so slow? (https://www.linuxquestions.org/questions/linux-general-1/why-is-searching-in-linux-so-slow-150231/)

Braveheart1980 02-25-2004 01:38 AM

Why is searching in linux so slow?
 
I use mandrake 9.2 and whenever i search my hard disk for a file or something it takes quite some time to finish. Also it uses much cpu cause my system responds rather slow when searching. What am i doin' wrong?

Tinkster 02-25-2004 01:39 AM

First thing would be to use locate
rather than find ...

Next thing would be to check whether
you have DMA enabled for your HDD(s).

man hdparm

hdparm /dev/<hdd in question>


Cheers,
Tink

Braveheart1980 02-25-2004 04:05 AM

Thanx Tinkster

I've tried hdparm and it says my dma settings in 1 (on). So that's ok.
Is there a graphical front end for locate btw ?

Tinkster 02-25-2004 10:35 AM

Probably ... but since I only run Flux to have several
xterms open I wouldn't know :)

Search freshmeat! http://freshmeat.net


Cheers,
Tink

natalinasmpf 02-25-2004 01:17 PM

Graphical frontends are even slower because they have to correspond to a GUI.

Do they really take that slow? What is the speed of your hard disk under hdparm?

Braveheart1980 02-26-2004 06:11 PM

Here's hdparm's output

"
[root@localhost george]# hdparm /dev/hda5

/dev/hda5:
multcount = 16 (on)
IO_support = 0 (default 16-bit)
unmaskirq = 0 (off)
using_dma = 1 (on)
keepsettings = 0 (off)
readonly = 0 (off)
readahead = 8 (on)
geometry = 9729/255/63, sectors = 107988867, start = 27824643
"

Chris H 02-26-2004 06:23 PM

Using 'find' under mandrake/kde is indeed slow as it does use the 'find' command. Much better to open up a terminal and use 'whereis' IMO.

Braveheart1980 02-26-2004 06:41 PM

Hmm.I tried locate and it said i have to update my database with the updatedb command.I've su and run updatedb. Do i have to updatedb manually each time i wanna search something?

heema 02-26-2004 06:55 PM

if u wanna search something new or after the time u did update then u will have to do it again

vincebs 02-26-2004 08:15 PM

No, updatedb just updates the search database so that when you type "locate <file>" you get results instantly.

You only need to updatedb when you've added/deleted a lot of files.


All times are GMT -5. The time now is 05:31 AM.