Project

General

Profile

Search prototype » History » Version 6

Greg Burri, 06/24/2009 10:41 PM

1 1 Greg Burri
h1. Search prototype
2
3
directory : source:/prototypes/03_Search
4
5
h2. Goals
6
7 3 Greg Burri
8 1 Greg Burri
* Search with glob pattern.
9
* Measure the time for searching among 50'000 files. There is always two measures to test the caching capacity of the OS.
10 2 Greg Burri
** A solution is to generate randomly empty files and folders and create an iso with it which will be stored in the repo.
11
* If time is above 1 minute for the first time and above 3 seconds for the seconds then an another solution must be found like an indexing system.
12 3 Greg Burri
13
14 4 Greg Burri
h2. Setup
15 3 Greg Burri
16 6 Greg Burri
The file source:/prototypes/03_Search/files.iso.bzip2 contains about 50'000 files and can be mounted with the following commands.
17
<pre>
18
$> bunzip2 files.iso.bzip2
19
$> mkdir files
20
$> sudo mount -o loop files.iso files
21
</pre>
22
It will bunzip the file, create a directory _files_ and mount the iso file.
23 3 Greg Burri
24 1 Greg Burri
25 4 Greg Burri
h2. Reference times
26
27
Here is some reference times given by the _find_ command.
28
29 1 Greg Burri
<pre>
30 4 Greg Burri
<flynux:~/code/projects/aybabtu/prototypes/03_Search $> sudo mount -o loop files.iso files/
31 3 Greg Burri
[sudo] password for gburri: 
32 5 Greg Burri
33 4 Greg Burri
<flynux:~/code/projects/aybabtu/prototypes/03_Search $> time find files/ -iname "*1234*"
34 3 Greg Burri
tree2/tree/055cba22/005f1168/20fe14e1/221234aa
35
tree2/tree/055cba22/0bc10022/de8ccd6d/31234116
36
tree2/tree/055cba22/78da82a9/c634ba77/881234a0
37
tree2/tree/055cba22/b7a538f2/caaf9076/212349d5
38 1 Greg Burri
39 3 Greg Burri
real    0m1.932s
40
user    0m0.140s
41
sys     0m1.716s
42 5 Greg Burri
43 4 Greg Burri
<flynux:~/code/projects/aybabtu/prototypes/03_Search $> time find files/ -iname "*1234*"
44 3 Greg Burri
tree2/tree/055cba22/005f1168/20fe14e1/221234aa
45
tree2/tree/055cba22/0bc10022/de8ccd6d/31234116
46
tree2/tree/055cba22/78da82a9/c634ba77/881234a0
47
tree2/tree/055cba22/b7a538f2/caaf9076/212349d5
48
49
real    0m0.382s
50
user    0m0.200s
51
sys     0m0.176s
52
</pre>