Project

General

Profile

Search prototype » History » Version 4

Greg Burri, 06/24/2009 10:31 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 4 Greg Burri
The file source:/prototypes/03_Search/files.iso contains about 50'000 files and can be mounted with the command @mount -o loop files.iso files@. The directory _files_ must be created prior.
17 3 Greg Burri
18 1 Greg Burri
19 4 Greg Burri
h2. Reference times
20
21
Here is some reference times given by the _find_ command.
22
23 1 Greg Burri
<pre>
24 4 Greg Burri
<flynux:~/code/projects/aybabtu/prototypes/03_Search $> sudo mount -o loop files.iso files/
25 3 Greg Burri
[sudo] password for gburri: 
26 4 Greg Burri
<flynux:~/code/projects/aybabtu/prototypes/03_Search $> time find files/ -iname "*1234*"
27 3 Greg Burri
tree2/tree/055cba22/005f1168/20fe14e1/221234aa
28
tree2/tree/055cba22/0bc10022/de8ccd6d/31234116
29
tree2/tree/055cba22/78da82a9/c634ba77/881234a0
30
tree2/tree/055cba22/b7a538f2/caaf9076/212349d5
31 1 Greg Burri
32 3 Greg Burri
real    0m1.932s
33
user    0m0.140s
34
sys     0m1.716s
35 4 Greg Burri
<flynux:~/code/projects/aybabtu/prototypes/03_Search $> time find files/ -iname "*1234*"
36 3 Greg Burri
tree2/tree/055cba22/005f1168/20fe14e1/221234aa
37
tree2/tree/055cba22/0bc10022/de8ccd6d/31234116
38
tree2/tree/055cba22/78da82a9/c634ba77/881234a0
39
tree2/tree/055cba22/b7a538f2/caaf9076/212349d5
40
41
real    0m0.382s
42
user    0m0.200s
43
sys     0m0.176s
44
</pre>