Cmjv03i01p0019

Page 1

J. Comp. & Math. Sci. Vol.3 (1), 19-35 (2012)

Prediction of Multiple String Searching Algorithm Performance on two Beowulf Cluster Configurations PRASAD J. C.1 and K. S. M. PANICKER2 1

Research Scholar, Dr. M.G.R. University, Chennai, cum Asst. Professor, Dept of Computer Science and Engineering, Federal Institute of Science and Technology[FISAT] Cochin, India 2 Professor, Dept of Computer Science and Engineering, [FISAT], Cochin, India. (Received on: 8th December, 2011) ABSTRACT This paper study various factors in the performance of static multiple pattern searching algorithms and predict the searching time for the operation to be performed in a cluster computing environment. Asynchronous parallel string search (APSS) model of parallel computation and communication is designed for searching algorithms with PVM and MPI technologies. Prediction and analysis is based on Aho-Corasick (AC), Wu-Manber, ACBitmap, q grams and Modified BRBMH algorithm to understand the performance of multiple string pattern searching. Performance have compared and discussed the results. Theoretical and practical results have been presented. This work consists of implementation of the same algorithms in two different cluster architecture environments. This has improved the reliability of the prediction method. The result of algorithms help to predict and implement this technology in the areas of text search, DNA search and Web related fields in a cost effective manner. Keywords: Beowulf cluster configuration, Aho-Corasick (AC), Wu-Manber, AC-Bitmap.

1. INTRODUCTION The importance of multiple pattern searching and its prediction is more relevant with the latest advancements in DNA sequencing, web search engines, database operations, signal processing, error detection,

speech recognition, intrusion detection system and pattern recognition areas, which require multiple string searching problem to process Terabyte of data. Most of the researchers usually focus on achieving high throughput with expensive resources of software and hardware. The cluster

Journal of Computer and Mathematical Sciences Vol. 3, Issue 1, 29 February, 2012 Pages (1-130)


20

Prasad J. C., et al., J. Comp. & Math. Sci. Vol.3 (1), 19-35 (2012)

architecture considered with this experiment is based on Beowulf architecture1 with open source technologies with 1 Gbps speed of networks. During the benchmark test2 of HP Linpack system, the system worked with a speed of 80 Gigaflops, 93 Gigaflops with Dakshina-I and Dakshina-II Beowulf cluster. Therefore, this research paper focuses on providing a high-speed but low-cost string matching implementation details with limited resources. The implementation is based Parallel Virtual machine standard3,4,5 based parallel programming technology. 2. MULTIPLE STRING SEARCHING ENVIRONMENT

Main node decompose the text in to r subtexts and distributed to available workers (nodes)[6]. Each subtext contains k = [(n-mj+1) / r] + mj-1, characters, where k is the successive characters of the complete text. The value of j ranges from 1 to r. In multiple string searching problems there is an overlap of m-1 successive characters between successive sub texts for each pattern. So there will be a redundancy of r(m1+m2+……+mr)-r] characters for multiple pattern processing. This redundancy of searching has also considered in this performance prediction method. 3. RELATED WORKS

A multiple string pattern matching problem can be defined as follows. Let T be a large text of n number of character size and P be set of r patterns of length m1, m2, ……mr. The characters of Text T, and r patterns stored in arrays as T[1], T[2] ,……..T[n] and Pattern P=P[1,1], P[1, 2]…….P[1, m1], P[2, 1] , P[2, 2], …….P[2, m2] , ...... P[r, 1], P[r, 2],…….P[r, mr]. The characters of both T and P belong to a finite set of elements of the set S, m1, m2, ……mr << n and o is the size of the alphabet. Searching processes, each is done with preprocessing and searching stage. Preprocessing stage compute the hash function (or any signature method) of each pattern and store them. During searching stage for each text position i compute signature function and search for the signature value from the saved values of the patterns, and identify all the occurrence of the pattern P in text T. The actual task of searching is done parallel among the processors from 0 to p-1 in asynchronous manner.7

The Aho-Corasick (AC) algorithm8 is the seminal work in the field of multiple string matching algorithms. Tuck et al. proposed novel techniques9 to reduce the memory requirements of the AC algorithm by using bitmap compression and path compression. Wu-Manber algorithm10 is significantly faster, unless the patterns are very small or there are very few of them. Qgram algorithm11 is designed for searching for large pattern sets. A comparative study on the performance of Aho-Corasick, the AC algorithm – bitmap, Wu -Manber algorithm modified BRBMH algorithm and Q-gram algorithm are presented below to identify the parameters involved in searching. Considered two Beowulf cluster configuretions12 in which, second configuration is the software upgradation with better speed performance and better resource management in hardware systems. Second configuration utilizes heterogeneous operating systems of

Journal of Computer and Mathematical Sciences Vol. 3, Issue 1, 29 February, 2012 Pages (1-130)


21

Prasad J. C., et al., J. Comp. & Math. Sci. Vol.3 (1), 19-35 (2012)

customized Debian5 of Linux with BSD as Firewall systems. Sungrid engine acts as a main node in the second configuration. Beowulf architecture is used with both configurations. This work compares the results of searching with sequential and two Beowulf

cluster configuration (Dakshina I & Dakshina II) implementations to identify the parameters involved in searching. To get a reliable and consistent performance result, the average of ten executions for different pattern of constant length is given in the table as result values.

Table 1: Aho-Corasick NFA Multiple Pattern Search Algorithm Execution Time in Second for a file size 60 MB Sequential Method Number of Patterns

Pattern length: m m1=5 m2=10 m3=15 m4=20 m5=25 m6=50 m7=100 m8=250 m9=500 m10= 750 m11=1000 m12=2000 m13=5000 m14=10000

Dakshina-I Number of Patterns

Dakshina-II Number of Patterns

1

5

10

20

50

1

5

10

20

50

1

5

10

20

50

10.26 13.34 14.26 16.42 17.65 20.12 24.94 29.72 32.27 34.56 36.78 39.17 44.33 45.22

30.68 40.93 42.24 49.38 52.73 60.22 74.28 89.61 96.78 103.9 110.4 117.2 133.3 135.7

44.89 59.1 63.07 72.58 78.05 88.14 110.1 131.5 142.3 153 162.8 173.5 196.7 201.3

60.24 78.97 83.58 96.84 103.5 117.2 146.8 175 189.4 202.7 215.8 229.9 259.1 265.5

72.45 94.05 100.9 116.6 124.4 142.3 176.3 210.6 228.1 244.2 260.2 277.5 313.8 320.7

2.12 2.98 3.15 3.74 3.96 4.51 5.73 6.81 7.71 7.72 8.22 8.77 9.87 10.08

6.73 8.93 9.92 11 11.8 13.5 16.8 19.7 21.2 23.1 24.7 26.3 29.6 30.3

10.8 13.3 14.3 16.2 17.4 19.5 24.7 29.3 31.2 34 36.2 38.6 43.6 44.7

13.5 17.4 18.8 21.4 22.8 26.2 32.1 38.8 42.1 45.5 48 51.3 57.8 59

16.2 21 22.6 25.9 27.9 31.8 39.2 46.8 50.7 54.4 57.9 61.3 69.6 71.5

1.87 2.44 2.65 3.03 3.23 3.66 4.65 5.22 5.87 6.32 6.73 7.35 8.87 8.88

5.61 7.32 7.78 9.05 9.78 11.3 13.9 16.2 17.3 18.7 20.2 21.7 24.2 25

8.28 10.8 11.5 13.4 14.7 16.5 20.7 24.6 26.3 27.5 29.5 32 35.8 37

11 14.2 15.2 17.6 19 21.7 26.2 31.3 34.8 38 39.4 41.4 47.3 48.9

13.9 17.2 18.8 21.3 22.9 26.1 32.6 38.6 41.5 44.3 47.2 50.8 57.8 58.2

Table 2: Wu-Manbar Multiple Pattern Search Algorithm Execution Time in Second for a file size 60 MB Pattern length: m m1=5 m2=10 m3=15 m4=20 m5=25 m6=50 m7=100 m8=250 m9=500 m10= 750 m11=1000 m12=2000 m13=5000 m14=7500 m15=10000

1 3.44 4.44 4.77 5.55 5.95 6.77 8.45 9.93 10.8 11.4 12.3 13.5 14.8 15.8 14.2

Sequential Method Number of Patterns 5 10 20 10.3 13.7 14.9 16.7 17.7 20.7 24.9 29.9 32.3 34.7 36.4 39.3 44.6 47.3 44.1

14.4 19.8 21.2 24.5 26.3 29.7 36.6 43.9 47.5 51.2 54.6 58 65.9 68.5 64.6

20.4 26.4 27.9 32.5 34.9 39.8 48.9 58.2 63.4 67.7 71.9 76.3 86.7 90 86.3

50

1

24.22 31.67 33.68 38.97 41.55 47.54 58.69 70.78 76.04 81.48 86.55 92.84 104.8 107.9 104.8

0.8 1 1.1 1.3 1.3 1.5 1.9 2.2 2.4 2.6 2.8 2.9 3.3 3.6 3.2

Dakshina-I Number of Patterns 5 10 20 2.23 3.05 3.23 3.69 3.95 4.52 5.52 6.72 7.25 7.66 8.38 8.73 9.81 10.4 9.29

3.3 4.45 4.77 5.44 5.84 6.55 8.17 9.92 10.6 11.4 12 12.7 14.5 15.2 14.2

4.44 5.88 6.33 7.27 7.71 8.78 10.9 12.9 14.2 15.1 15.9 17.2 19.2 20.2 19.6

50

1

5.33 6.99 7.55 8.84 9.32 10.7 13 15.5 16.9 18.2 19.2 20.5 23.2 23.8 23.3

0.7 0.8 0.9 1 1.1 1.3 1.5 1.8 2 2.1 2.2 2.4 2.7 2.9 2.6

Dakshina-II Number of Patterns 5 10 20 1.9 2.5 2.6 3 3.1 3.7 4.5 5.5 5.9 6.4 6.7 7.2 8.1 8.7 8.1

2.76 3.62 3.86 4.45 4.77 5.42 6.72 8.05 8.72 9.36 9.88 10.6 12 12.6 11.9

Journal of Computer and Mathematical Sciences Vol. 3, Issue 1, 29 February, 2012 Pages (1-130)

3.69 4.83 5.13 5.93 6.35 7.19 8.97 10.7 11.6 12.4 13.1 14.1 15.9 16.5 15.8

50 4.41 5.76 6.17 7.14 7.65 8.73 10.8 12.9 13.5 14.9 15.8 17 19.2 19.7 19.2


22

Prasad J. C., et al., J. Comp. & Math. Sci. Vol.3 (1), 19-35 (2012) Table 3: AC-Bitmap Multiple Pattern Search Algorithm Execution Time in Second for a file size 60MB

Pattern length: m m1=5 m2=10 m3=15 m4=20 m5=25 m6=50 m7=100 m8=250 m9=500 m10= 750 m11=1000 m12=2000 m13=5000 m15=10000

Sequential Method Number of Patterns 5 10 20

1

Dakshina-I Number of Patterns 5 10 20

Dakshina-II Number of Patterns 5 10 20

50

6.21

13.9

50

1

50

1

13.3

34.07

48.02

63.76

75.87

2.98

7.71

10.8

14.7

16.9

2.4

16.5

44.24

62.98

82.15

97.23

3.77

9.93

14.2

18.7

21.5

3

8.23

11.5

15.1

17.8

17.8

45.65

66.27

86.93

104.2

3.99

10.3

14.9

19.6

21.8

3.3

8.37

12.1

15.9

19.1

19.3

52.44

76.67

99.94

120.1

4.37

11.7

17.3

22.2

26.8

3.6

9.62

14.1

18.3

22

20.9

55.92

82.65

107.1

127.4

4.64

12.5

18.4

23.8

28.3

3.9

10.3

15.2

19.6

23.3

24.1

63.44

91.54

120.5

146.1

5.42

14.3

20.4

27

33

4.4

11.7

16.8

22.1

26.8

27.9

77.57

113.9

149.5

179.8

6.33

17.3

25.2

33.2

40

5.1

14.2

20.9

27.4

32.9

32.8

92.75

134.9

178

213.9

7.33

20.7

29.9

39.8

47.8

6

17

24.7

32.6

39.2

35.8

99.96

145.9

193.1

231.3

8.01

22.5

32.4

42.9

51.4

6.6

18.3

26.7

35.4

42.3

37.8

107

156.1

206.7

247.6

8.47

23.9

34.8

46

55.1

6.9

19.6

28.6

37.8

45.3

40

113.9

166

219

263.8

8.91

25.5

36.9

48.8

58.8

7.3

20.9

30.4

40.1

48.3

42.5

119.9

176.9

232.4

279.9

9.17

26.9

39.6

51.3

62.4

7.8

22

32.4

42.5

51.2

47.2

136.8

199.2

263.1

317.2

10.7

30.7

44.4

58.5

70.5

8.7

25.1

36.5

48.2

58.1

48.4

139.9

204.5

268.6

323.9

10.9

31.5

45.8

59.8

72.4

8.9

25.6

37.4

49.2

59.3

8.81

11.7

Table 4: q-Grams Multiple Pattern Search Algorithm Execution Time in Second for a file size 60 MB Pattern length: m m1=5 m2=10 m3=15 m4=20 m5=25 m6=50 m7=100 m8=250 m9=500 m10= 750 m11=1000 m12=2000 m13=5000 m15=10000

1

Sequential Method Number of Patterns 5 10 20

Dakshina-I Number of Patterns 5 10 20

50

1

2.33

5.44

0.7

Dakshina-II Number of Patterns 5 10 20

50

1.98

2.87

3.78

4.55 5.83

50

1

3.56

10.6

15.4

20.5

24.7

0.8

4.46

13.8

19.9

26.4

31.7

0.9

3.11

4.45

5.91

7.14

0.9

2.56

3.68

4.87

4.33

14.3

21.2

27.9

34

1

3.22

4.74

6.24

7.57

0.8

2.66

3.92

5.15

6.26

5.62

16.7

24.8

32.5

38.9

1.3

3.76

5.55

7.27

8.66

1.1

3.09

4.58

5.99

7.16

5.93

17.6

26

34.5

41.7

1.4

3.97

5.83

7.71

9.32

1.1

3.27

4.79

6.37

7.69

6.84

19.1

29

38.8

47

1.6

4.29

6.47

8.65

10.5

1.3

3.53

5.37

7.13

8.63

8.52

24.2

36.2

48.2

58.2

1.9

5.42

8.08

10.8

13

1.6

4.48

6.66

8.87

10.7

9.45

29.7

43.7

58.1

69.2

2.1

6.63

9.78

12.9

15.4

1.8

5.45

8.05

10.7

12.7

10.2

32

47

63

76.9

2.3

7.15

10.5

14.1

17.1

1.9

5.89

8.63

11.6

14.1

11.8

34.8

51.2

69.3

81.9

2.7

7.79

11.5

15.5

18.3

2.2

6.42

9.39

12.7

15.2

11.3

34.9

53.2

70.9

84.6

2.5

7.79

11.9

15.8

18.9

2.1

6.43

9.78

13

15.5

12.5

38.8

55.3

74.8

90.3

2.8

8.65

12.3

16.7

20.1

2.3

7.11

10.2

13.7

16.6

13.5

43.4

64.3

84.4

103

3.1

9.71

14.4

18.8

23.1

2.5

7.99

11.8

15.5

19

14.7

44.3

66.3

86.1

105

3.1

9.95

14.8

19.2

23.3

2.7

8.16

12.2

15.8

19.2

3.45

4.56

Journal of Computer and Mathematical Sciences Vol. 3, Issue 1, 29 February, 2012 Pages (1-130)


23

Prasad J. C., et al., J. Comp. & Math. Sci. Vol.3 (1), 19-35 (2012) Table 5: Modified BRBMH Multiple Pattern Search Algorithm Execution Time in Second for a file size 60 MB Sequential Method Number of Patterns

Pattern length: m

Dakshina-I Number of Patterns

Dakshina-II Number of Patterns

1

5

10

20

50

1

5

10

20

50

1

5

10

20

50

m1=5

3.1

9.5

13.6

19.6

23.7

0.7

2.2

3.2

4.4

5.2

0.6

1.8

2.7

3.6

4.3

m2=10

4.0

12.6

18.6

25.4

31.0

1.0

3.0

4.4

5.8

6.9

0.8

2.4

3.5

4.7

5.6

m3=15

4.3

13.7

19.9

26.8

33.0

1.1

3.2

4.7

6.2

7.4

0.9

2.5

3.7

5.0

6.0

m4=20

5.0

15.4

23.0

31.2

38.2

1.2

3.6

5.3

7.1

8.7

1.0

2.9

4.3

5.8

6.9

m5=25

5.4

16.2

24.7

33.5

40.7

1.3

3.9

5.7

7.6

9.1

1.0

3.0

4.6

6.2

7.4

m6=50

6.1

19.1

27.9

38.2

46.6

1.5

4.4

6.4

8.6

10.4

1.2

3.6

5.3

7.0

8.5

m7=100

7.6

22.9

34.4

46.9

57.5

1.8

5.4

8.0

10.7

12.8

1.5

4.4

6.5

8.7

10.4

m8=250

8.9

27.5

41.2

55.9

69.4

2.2

6.6

9.7

12.7

15.2

1.8

5.3

7.8

10.4

12.5

m9=500

9.7

29.7

44.7

60.9

74.5

2.3

7.1

10.4

13.9

16.6

1.9

5.8

8.5

11.3

13.0

m10= 750

11.7

36.0

54.3

73.1

88.8

2.6

7.7

11.5

15.2

18.4

2.2

6.4

9.5

12.5

15.1

m11=1000

12.6

38.3

57.8

77.6

94.3

2.9

8.8

12.6

16.7

20.2

2.3

7.0

10.4

13.8

16.6

m12=2000

13.9

40.8

61.5

82.4

101.2

3.0

9.2

13.3

18.1

21.6

2.5

7.5

11.1

14.8

17.9

m13=5000

15.2

46.4

69.8

93.6

114.2

3.5

10.3

15.2

20.2

24.3

2.8

8.5

12.6

16.6

20.1

m14=7500

16.3

49.2

72.6

97.2

117.6

3.7

11.0

16.0

21.2

24.9

3.0

9.1

13.2

17.3

20.7

m15=10000

14.7

45.9

68.4

93.2

114.2

3.4

9.8

14.9

20.5

24.5

2.8

8.5

12.5

16.6

20.2

4. FACTORS AFFECTING THE SEARCHING PROCESS There are both hardware and software factors13 which affect the searching process results. These factors can be classified in to Algorithmic factors, Architectural factors, network factors and I/O factors. Only one user login in the cluster acts with the interconnection network during the searching process. Timing function used was getrusage system call to find the running time of the algorithms. Data are accessed from main memory before the timing function begins. In string matching algorithm, length of the searched patterns (mi), the length of the text being searched (n) and the size of the alphabet (o) are the direct

parameters affecting the performance14 of searching operations. In cluster computing environment, with large number of computer nodes, the result doesn’t become attractive because of the network traffic in the interconnection network. The speedup of a program using multiple processors in parallel computing is limited by the time needed for the sequential fraction of the program as per Amdajl’s law15. Amdahl's law states that if P is the percentage (proportion) of the program that can be made parallel (i.e. benefit from parallelization), and (1 − P) is the proportion (percentage) that cannot be parallelized (remains serial), then the maximum speedup that can be achieved by using N processors is S = N/(N-NP+P). Reverse factor (Against Amdajl’s law) says16,17, the problem size

Journal of Computer and Mathematical Sciences Vol. 3, Issue 1, 29 February, 2012 Pages (1-130)


24

Prasad J. C., et al., J. Comp. & Math. Sci. Vol.3 (1), 19-35 (2012)

scales with the number of processors. When more powerful processors are given, the problem generally expands to make use of the increased facilities. Users have control over such things as grid resolution, number of time steps, difference operator complexity, and other parameters that are usually adjusted to allow the program to be run in some desired amount of time. Hence, it may be most realistic to assume that run time, not problem size, is constant. Resource manager used with Dakshina-I is Torque where as the Dakshina-II configuration used is Sun Grid Engine. SGE need the "tight integration whereas The TORQUE18 Resource Manager is a distributed resource manager providing control over batch jobs and distributed compute nodes. The Parallel Virtual Machine (PVM)19 is a software tool for parallel networking of heterogeneous computers in the Dakshina-I. Dakshina-II, uses Sun Grid Engine which perform scalable parallel job startup with qrsh as a replacement for rsh or ssh for starting the remote tasks. It is possible to start binaries with qrsh. If a special command line option -inherit is specified, qrsh will start a subtask in an existing Grid engine parallel job. Size of RAM of Dakshina-I is 256 MB whereas the same in Dakshina-II is 1.23 GB. RAM memory does not have the power of making the computer processor work faster. In our work nodes, it takes the CPU approximately 200ns (nanoseconds) to access RAM compared to 12,000,000ns to access the hard drive18. When there is more RAM memory in the computer, the probability of “running out� of RAM memory and having the necessity to make a change with the hard disk swap file is smaller and, thus the computer performance increases.

File system used with Dakshina-I is PVFS where as the same in Dakshina-II is NFS. PVFS consists of a server process and a client library, both of which are written entirely of user-level code. A Linux kernel module and pvfs-client process allow the file system to be mounted and used with Network File standard utilities20. System(NFS) originally developed by Sun, allowing a user on a client computer to access files over a network in a manner similar to how local storage is accessed. NFS, builds on the Open Network Computing Remote Procedure Call (ONC RPC) system. Authentication system used with configuration1 is NIS where as the same in configuration-2 is LDAP. NIS do not provide a distributed administration capability nor hierarchical data administration. LDAP organizes data into a hierarchy, and allows distributed administration21. Linux kernel used with configuration 1 is customised Debian of 2.6.18 whereas for configuration 2 is of the version 2.6.26. During HPL benchmarking2, the speed of Dakshina-II has recorded 9600 cores floating operations in a second where as Dakshina-I performed 7000 cores floating point operations per second. 5. SEARCHING TIME PREDICTION Based on the above mentioned factors, a theoretical prediction method for multiple string searching process has formed. This formula will help to decide the optimum number of processors to be used for searching process in cluster computing environment, because of computingcommunication ratio limit of Amdahl’s law. The string matching problem can achieve data parallelism with the following

Journal of Computer and Mathematical Sciences Vol. 3, Issue 1, 29 February, 2012 Pages (1-130)


Prasad J. C., et al., J. Comp. & Math. Sci. Vol.3 (1), 19-35 (2012)

simple data partitioning technique in an asynchronous parallel string search (APSS) mechanism. The text string is decomposed into a number of subtexts according to the number of processors allocated. These subtexts are stored in local disks of the processors. According this partitioning approach the APSS model is followed: First, the server distributes the pattern string to all the nodes. In the second step, each nodes and reads its subtext from the local disk in main memory and search using multiple string matching algorithms in asynchronous manner. (Finally, in the third step,) the nodes send the number of occurrences back to server asynchronously and parallel with dual quad core processing servers. Let T1 be the time required for the initial setup22 of the server node. Server node read the text of length n and multiple patterns of length mi. Then Server node divide the text into subparts based on the availability of work nodes for broadcasting. Thus reading of the text requires n accesses. Let tavg be the average time to perform one I/O step. However PVM does not read all the values from these files during startup always, but when division of text become a requirement it reads the text and then send them to all nodes in the job for Dhakshina II, but Dhakshina I used PVM which reads both text and pattern initially. In the case of Dakshina II, master node does not waste time for reading multiple string patterns. The files are read on each node during each process' startup. This is intended behavior: It allows for per-node customization, which is especially relevant in heterogeneous environments. Thus for configuration -I is, T1 = tavg * (n + ∑ mi) + Є1 Equation (1). and for configuration II, T1= tavg* n+Є1 Equation (2).

25

T2 be the average of asynchronous time required for communication from server node to slave nodes. The cluster nodes in the Configuration I and II are interconnected using the Gigabit Ethernet LAN, Realtek 8169 Gigabit Network Card on each compute nodes and HP ProCurve 1400-24G(39078A) Switch X 2. Performance of switch is less than 4.7 µs (64-byte packets) and less than 3.0 µs (64-byte packets)18. The switch has a maximum throughput of 35.7 million packets per second (pps). The data transfer takes place at the speed of around 990 Megabit per second among the servers and around 665 Mb per second among the client nodes. In the ideal multicomputer architecture, the cost of sending a message between two tasks located on different processors can be represented by two parameters: the message startup time, which is the time required to initiate the communication, and the transfer time per (typically four-byte) word, which is 32 bit in both configuration. The time23 required to send a message of size ∑ mi includes the communication time to broadcast the multiple pattern string to all processors involved in the processing of the string matching. Let l1 is the latency time, a fixed startup overhead time needed to prepare sending a message from one processor to the other. Let assume that the function MPI_Bcast is completed in log 2 p steps. In each step, one or two parallel send operations per processor are performed. The size of ∑ mi pattern string is rm bytes. The transmission time is proportional to the size of pattern string. Let c1 be the incremental communication time per byte. Therefore, the broadcast transfers rm bytes to the other p-1 processors. The expression for this amount of the time is given by25,26.

Journal of Computer and Mathematical Sciences Vol. 3, Issue 1, 29 February, 2012 Pages (1-130)


26

Prasad J. C., et al., J. Comp. & Math. Sci. Vol.3 (1), 19-35 (2012)

T2 = log 2 p (l1 + r m c1 ). Equation (3). T3 be the average I/O time for reading the subtext from the local disk of a slave processors of Intel Pentium 4 (3.6 GHz), with 1.23 GB RAM and 80 GB SATA HDD. I/O time is proportional to the length of the text. Each node processor has to reads the subtext from the local disk into a buffer in main memory with size [(n - mi +1) / p] + mi -1 characters, the I/O time on each

client is given by: T3 = ( [(n − mi + 1) / p] + mi −1) tavg. Equation (4). T4 be the maximum computation time = (Max. computation step) X s. Equation (5).

Searching steps required for string matching of an multiple pattern string with n text string requires for different algorithms are given the following table

Table 6: Searching steps required for multiple string matching for different algorithms in worst case situation Algorithms Maximum computation step required

AC- NFA Wu-Manber AC-Bitmap q grams n

We can substitute the maximum computation step from the above table and s is the average time to perform one search (computation) step. The value of n in each computation node will be the length of the subtext of n with size [(n-mi+1)/p] + mi-1 characters. T5 be the average of result gathering time from nodes (asynchronously) to server nodes. Server node/SGE Server/LDAP Servers are of IBM X series Quad Core Xeon processors with SAS HDD, 2 GB RAM and NIC 2G. T5 be the computation of consolidating time of server node and to compute the final result. This IBM Server collects the result (count value of pattern match) from all p nodes simultaneously24. The function PVM_Reduce is completed in log2P steps. Thus the communication time to gather the results22 is

Logσ 2rN

n+ r mi

T5 = log 2P (l1+c1).

n r mi

Modified BRBMH r mi (n+1)-2

Equation (6).

Thus the maximum searching time can be predicted after considering all the above factors will be the sum of T1 + T2 + T3 + T4+ T5 . To determine this result, the following parameters have to be found. tavg be the average time to perform one I/O step, s the average time to perform one search (computation) step, Є1, time required for division of subtext, l1 the latency time, a fixed startup overhead time needed to prepare sending a message from one processor to the other, c1, the incremental communication time per byte. tavg , s and Є is found by measuring the time taken which performs n steps27. tavg = Time taken by the processor to read k character / k Equation (7).

Journal of Computer and Mathematical Sciences Vol. 3, Issue 1, 29 February, 2012 Pages (1-130)


27

Prasad J. C., et al., J. Comp. & Math. Sci. Vol.3 (1), 19-35 (2012)

The average tavg value for different character length is 4.7E-10 seconds. s = Time taken by searching the text of length n / n. Equation (8).

Following algorithms results with several pattern length and nodes will have different s value for Configuration I and Configuration II when p=10.

Table 7: Average time taken for Aho-Corasick NFA Multiple Pattern Search Algorithm searching character (s)

Pattern

Sequential Method

Dakshina-I

Dakshina-II

Number of Patterns

Number of Patterns

Number of Patterns

length: m

m1=5

m2=10

m3=15

m4=20

m5=25

m6=50

m7=100

m8=250

m9=500

m10 = 750

m11 =1000

m12 =2000

m13 =5000

m14 =10000

1

5

10

20

50

1

5

10

20

50

1

10

20

50

1.65

5.03

7.65

1.04

1.29

3.36

1.10

1.84

2.32

2.89

2.96

9.16

5

1.41

1.89

2.48

E-07

E-07

E-07

E-06

E-06

E-08

E-07

E-07

E-07

E-07

E-08

E-08

E-07

E-07

E-07

2.14

6.72

1.01

1.36

1.68

4.75

1.46

2.26

2.99

3.74

3.88

1.20

1.84

2.44

3.06

E-07

E-07

E-06

E-06

E-06

E-08

E-07

E-07

E-07

E-07

E-08

E-07

E-07

E-07

E-07

2.29

6.93

1.08

1.44

1.80

5.02

1.62

2.43

3.23

4.03

4.22

1.27

1.96

2.61

3.35

E-07

E-07

E-06

E-06

E-06

E-08

E-07

E-07

E-07

E-07

E-08

E-07

E-07

E-07

E-07

2.64

8.11

1.24

1.67

2.08

5.97

1.80

2.76

3.68

4.62

4.83

1.48

2.28

3.03

3.80

E-07

E-07

E-06

E-06

E-06

E-08

E-07

E-07

E-07

E-07

E-08

E-07

E-07

E-07

E-07

2.84

8.66

1.33

1.78

2.22

6.33

1.93

2.96

3.92

4.97

5.15

1.60

2.50

3.27

4.08

E-07

E-07

E-06

E-06

E-06

E-08

E-07

E-07

E-07

E-07

E-08

E-07

E-07

E-07

E-07

3.24

9.89

1.50

2.02

2.54

7.21

2.21

3.32

4.51

5.67

5.84

1.85

2.81

3.73

4.65

E-07

E-07

E-06

E-06

E-06

E-08

E-07

E-07

E-07

E-07

E-08

E-07

E-07

E-07

E-07

4.01

1.22

1.88

2.53

3.15

9.18

2.75

4.21

5.52

6.99

7.44

2.28

3.53

4.51

5.81

E-07

E-06

E-06

E-06

E-06

E-08

E-07

E-07

E-07

E-07

E-08

E-07

E-07

E-07

E-07

4.78

1.47

2.24

3.01

3.76

1.09

3.23

4.99

6.68

8.35

8.36

2.66

4.19

5.38

6.88

E-07

E-06

E-06

E-06

E-06

E-07

E-07

E-07

E-07

E-07

E-08

E-07

E-07

E-07

E-07

5.19

1.59

2.43

3.26

4.07

1.24

3.48

5.32

7.24

9.04

9.41

2.84

4.48

5.99

7.40

E-07

E-06

E-06

E-06

E-06

E-07

E-07

E-07

E-07

E-07

E-08

E-07

E-07

E-07

E-07

5.56

1.71

2.61

3.49

4.36

1.24

3.79

5.80

7.83

9.70

1.01

3.07

4.69

6.54

7.90

E-07

E-06

E-06

E-06

E-06

E-07

E-07

E-07

E-07

E-07

E-07

E-07

E-07

E-07

E-07

5.92

1.81

2.78

3.72

4.64

1.32

4.05

6.17

8.26

1.03

1.08

3.31

5.03

6.78

8.42

E-07

E-06

E-06

E-06

E-06

E-07

E-07

E-07

E-07

E-06

E-07

E-07

E-07

E-07

E-07

6.31

1.92

2.96

3.96

4.95

1.41

4.32

6.58

8.83

1.09

1.18

3.56

5.45

7.12

9.06

E-07

E-06

E-06

E-06

E-06

E-07

E-07

E-07

E-07

E-06

E-07

E-07

E-07

E-07

E-07

7.14

2.19

3.36

4.46

5.60

1.58

4.86

7.43

9.95

1.24

1.42

3.97

6.10

8.14

1.03

E-07

E-06

E-06

E-06

E-06

E-07

E-07

E-07

E-07

E-06

E-07

E-07

E-07

E-07

E-06

7.28

2.23

3.43

4.57

5.72

1.62

4.97

7.62

1.02

1.28

1.43

4.10

6.31

8.41

1.04

E-07

E-06

E-06

E-06

E-06

E-07

E-07

E-07

E-06

E-06

E-07

E-07

E-07

E-07

E-06

Journal of Computer and Mathematical Sciences Vol. 3, Issue 1, 29 February, 2012 Pages (1-130)


28

Prasad J. C., et al., J. Comp. & Math. Sci. Vol.3 (1), 19-35 (2012) Table 8: Average time taken for Wu-Manber Multiple Pattern Search Algorithm searching character (s) Sequential Method Number of Patterns

Pattern length: m m1=5 m2=10 m3=15 m4=20 m5=25 m6=50 m7=100 m8=250 m9=500 m10= 750 m11=1000 m12=2000 m13=5000 m14=10000

1 1.03 E+00 1.34 E+00 1.44 E+00 1.67 E+00 1.80 E+00 2.05 E+00 2.56 E+00 3.00 E+00 3.27 E+00 3.45 E+00 3.72 E+00 4.09 E+00 4.48 E+00 4.79 E+00

5 2.93 E+00 3.89 E+00 4.24 E+00 4.75 E+00 5.03 E+00 5.89 E+00 7.09 E+00 8.51 E+00 9.19 E+00 9.88 E+00 1.04 E+01 1.12 E+01 1.27 E+01 1.35 E+01

10 4.11 E+00 5.65 E+00 6.05 E+00 6.99 E+00 7.51 E+00 8.48 E+00 1.04 E+01 1.25 E+01 1.36 E+01 1.46 E+01 1.56 E+01 1.66 E+01 1.88 E+01 1.96 E+01

20 5.69 E+00 7.37 E+00 7.79 E+00 9.07 E+00 9.75 E+00 1.11 E+01 1.37 E+01 1.63 E+01 1.77 E+01 1.89 E+01 2.01 E+01 2.13 E+01 2.42 E+01 2.51 E+01

Dakshina-I Number of Patterns 50 6.72 E+00 8.78 E+00 9.34 E+00 1.08 E+01 1.15 E+01 1.32 E+01 1.63 E+01 1.96 E+01 2.11 E+01 2.26 E+01 2.40 E+01 2.58 E+01 2.91 E+01 2.99 E+01

1 2.33 E-01 2.94 E-01 3.24 E-01 3.85 E-01 3.85 E-01 4.45 E-01 5.67 E-01 6.58 E-01 7.19 E-01 7.79 E-01 8.40 E-01 8.70 E-01 9.92 E-01 1.08 E+00

5 6.26 E-01 8.60 E-01 9.11 E-01 1.04 E+00 1.12 E+00 1.28 E+00 1.56 E+00 1.91 E+00 2.06 E+00 2.17 E+00 2.38 E+00 2.48 E+00 2.79 E+00 2.95 E+00

10 9.34 E-01 1.26 E+00 1.35 E+00 1.55 E+00 1.66 E+00 1.86 E+00 2.33 E+00 2.83 E+00 3.02 E+00 3.25 E+00 3.42 E+00 3.62 E+00 4.13 E+00 4.33 E+00

20 1.23 E+00 1.63 E+00 1.76 E+00 2.02 E+00 2.15 E+00 2.45 E+00 3.04 E+00 3.60 E+00 3.96 E+00 4.21 E+00 4.44 E+00 4.80 E+00 5.36 E+00 5.64 E+00

Dakshina-II Number of Patterns 50 1.47 E+00 1.93 E+00 2.09 E+00 2.45 E+00 2.58 E+00 2.96 E+00 3.60 E+00 4.30 E+00 4.68 E+00 5.04 E+00 5.32 E+00 5.68 E+00 6.43 E+00 6.60 E+00

1 2.03 E-01 2.33 E-01 2.63 E-01 2.94 E-01 3.24 E-01 3.85 E-01 4.45 E-01 5.36 E-01 5.97 E-01 6.28 E-01 6.58 E-01 7.19 E-01 8.10 E-01 8.70 E-01

5 5.32 E-01 7.03 E-01 7.32 E-01 8.46 E-01 8.74 E-01 1.05 E+00 1.27 E+00 1.56 E+00 1.67 E+00 1.81 E+00 1.90 E+00 2.04 E+00 2.30 E+00 2.47 E+00

10 7.80 E-01 1.03 E+00 1.09 E+00 1.26 E+00 1.35 E+00 1.54 E+00 1.91 E+00 2.29 E+00 2.48 E+00 2.67 E+00 2.81 E+00 3.02 E+00 3.42 E+00 3.59 E+00

20 1.02 E+00 1.34 E+00 1.43 E+00 1.65 E+00 1.77 E+00 2.00 E+00 2.50 E+00 2.98 E+00 3.23 E+00 3.46 E+00 3.65 E+00 3.93 E+00 4.43 E+00 4.60 E+00

50 1.22 E+00 1.59 E+00 1.70 E+00 1.97 E+00 2.12 E+00 2.42 E+00 2.99 E+00 3.57 E+00 3.74 E+00 4.13 E+00 4.38 E+00 4.71 E+00 5.32 E+00 5.46 E+00

Table 9: Average time taken AC-Bitmap Multiple Pattern Search Algorithm searching character (s) Sequential Method Number of Patterns

Pattern length: m m1=5 m2=10 m3=15 m4=20 m5=25 m6=50 m7=100 m8=250 m9=500 m10= 750 m11=1000 m12=2000 m13=5000 m14=10000

1 2.14 E-07 2.65 E-07 2.86 E-07 3.10 E-07 3.36 E-07 3.88 E-07 4.49 E-07 5.28 E-07 5.76 E-07 6.09 E-07 6.44 E-07 6.84 E-07 7.60 E-07 7.79 E-07

5 5.59 E-07 7.26 E-07 7.49 E-07 8.61 E-07 9.18 E-07 1.04 E-06 1.27 E-06 1.52 E-06 1.64 E-06 1.76 E-06 1.87 E-06 1.97 E-06 2.25 E-06 2.30 E-06

10 8.19 E-07 1.07 E-06 1.13 E-06 1.31 E-06 1.41 E-06 1.56 E-06 1.94 E-06 2.30 E-06 2.49 E-06 2.66 E-06 2.83 E-06 3.02 E-06 3.40 E-06 3.48 E-06

20 1.10 E-06 1.41 E-06 1.50 E-06 1.72 E-06 1.84 E-06 2.07 E-06 2.57 E-06 3.06 E-06 3.32 E-06 3.56 E-06 3.77 E-06 4.00 E-06 4.52 E-06 4.61 E-06

Dakshina-I Number of Patterns 50 1.35 E-06 1.73 E-06 1.86 E-06 2.14 E-06 2.27 E-06 2.61 E-06 3.21 E-06 3.82 E-06 4.13 E-06 4.42 E-06 4.70 E-06 4.99 E-06 5.64 E-06 5.74 E-06

1 4.75 E-08 6.02 E-08 6.38 E-08 6.99 E-08 7.42 E-08 8.68 E-08 1.01 E-07 1.18 E-07 1.29 E-07 1.36 E-07 1.43 E-07 1.47 E-07 1.72 E-07 1.75 E-07

5 1.26 E-07 1.63 E-07 1.69 E-07 1.92 E-07 2.05 E-07 2.34 E-07 2.84 E-07 3.40 E-07 3.69 E-07 3.92 E-07 4.18 E-07 4.41 E-07 5.04 E-07 5.17 E-07

10 1.84 E-07 2.42 E-07 2.54 E-07 2.95 E-07 3.13 E-07 3.47 E-07 4.29 E-07 5.10 E-07 5.52 E-07 5.93 E-07 6.29 E-07 6.75 E-07 7.56 E-07 7.80 E-07

20 2.53 E-07 3.21 E-07 3.37 E-07 3.82 E-07 4.09 E-07 4.64 E-07 5.71 E-07 6.85 E-07 7.38 E-07 7.91 E-07 8.39 E-07 8.82 E-07 1.01 E-06 1.03 E-06

Dakshina-II Number of Patterns 50 3.01 E-07 3.83 E-07 3.89 E-07 4.78 E-07 5.05 E-07 5.88 E-07 7.13 E-07 8.53 E-07 9.17 E-07 9.82 E-07 1.05 E-06 1.11 E-06 1.25 E-06 1.28 E-06

1 3.81 E-08 4.78 E-08 5.26 E-08 5.75 E-08 6.23 E-08 7.04 E-08 8.16 E-08 9.61 E-08 1.06 E-07 1.11 E-07 1.17 E-07 1.25 E-07 1.40 E-07 1.43 E-07

5 1.01 E-07 1.35 E-07 1.37 E-07 1.58 E-07 1.69 E-07 1.92 E-07 2.33 E-07 2.79 E-07 3.00 E-07 3.21 E-07 3.43 E-07 3.61 E-07 4.12 E-07 4.20 E-07

10 1.50 E-07 1.96 E-07 2.06 E-07 2.40 E-07 2.59 E-07 2.86 E-07 3.56 E-07 4.21 E-07 4.55 E-07 4.87 E-07 5.18 E-07 5.52 E-07 6.22 E-07 6.36 E-07

Journal of Computer and Mathematical Sciences Vol. 3, Issue 1, 29 February, 2012 Pages (1-130)

20 2.01 E-07 2.59 E-07 2.73 E-07 3.15 E-07 3.37 E-07 3.80 E-07 4.71 E-07 5.61 E-07 6.09 E-07 6.50 E-07 6.90 E-07 7.31 E-07 8.28 E-07 8.44 E-07

50 2.48 E-07 3.17 E-07 3.40 E-07 3.92 E-07 4.15 E-07 4.78 E-07 5.87 E-07 6.99 E-07 7.54 E-07 8.08 E-07 8.61 E-07 9.12 E-07 1.03 E-06 1.05 E-06


29

Prasad J. C., et al., J. Comp. & Math. Sci. Vol.3 (1), 19-35 (2012) Table 10: Average time taken for q grams Multiple Pattern Search Algorithm searching character (s) Pattern length: m m1=5 m2=10 m3=15 m4=20 m5=25 m6=50 m7=100 m8=250 m9=500 m10= 750 m11=1000 m12=2000 m13=5000 m14=10000

Sequential Method Number of Patterns 1 1.14 E-08 7.13 E-09 4.62 E-09 9.00 E-08 9.50 E-08 1.10 E-07 1.37 E-07 1.52 E-07 1.64 E-07 1.90 E-07 1.82 E-07 2.01 E-07 2.17 E-07 2.36 E-07

5 6.94 E-09 2.26 E-07 3.13 E-09 2.74 E-07 2.31 E-09 3.13 E-07 7.94 E-10 4.87 E-07 2.10 E-10 5.71 E-07 1.15 E-10 6.37 E-07 2.85 E-11 7.27 E-07

10 5.24 E-09 3.39 E-09 2.41 E-09 2.11 E-09 1.77 E-09 9.88 E-10 6.17 E-10 2.98 E-10 1.60 E-10 1.16 E-10 9.07 E-11 4.71 E-11 2.19 E-11 1.13 E-11

Dakshina-I Number of Patterns 20 3.52 E-09 4.54 E-07 1.60 E-09 5.59 E-07 1.19 E-09 6.68 E-07 4.15 E-10 1.00 E-06 1.08 E-10 1.19 E-06 6.10 E-11 1.29 E-06 1.45 E-11 1.48 E-06

50 1.76 E-09 5.65 E-07 8.08 E-10 6.94 E-07 5.95 E-10 8.38 E-07 2.08 E-10 1.23 E-06 5.49 E-11 1.46 E-06 3.02 E-11 1.61 E-06 7.35 E-12 1.86 E-06

1 2.47 E-09 1.40 E-09 1.04 E-09 1.02 E-09 8.81 E-10 5.05 E-10 3.01 E-10 1.33 E-10 7.31 E-11 5.73 E-11 3.98 E-11 2.23 E-11 9.88 E-12 4.94 E-12

5 1.51 E-09 1.01 E-09 6.98 E-10 6.12 E-10 5.18 E-10 2.80 E-10 1.77 E-10 8.67 E-11 4.68 E-11 3.40 E-11 2.55 E-11 1.42 E-11 6.36 E-12 3.26 E-12

10 1.17 E-09 7.54 E-10 5.36 E-10 4.71 E-10 3.96 E-10 2.20 E-10 1.37 E-10 6.65 E-11 3.57 E-11 2.61 E-11 2.02 E-11 1.05 E-11 4.90 E-12 2.52 E-12

Dakshina-II Number of Patterns 20 7.80 E-10 5.06 E-10 3.56 E-10 3.12 E-10 2.64 E-10 1.48 E-10 9.27 E-11 4.43 E-11 2.42 E-11 1.78 E-11 1.36 E-11 7.17 E-12 3.23 E-12 1.65 E-12

50 3.86 E-10 2.54 E-10 1.79 E-10 1.54 E-10 1.33 E-10 7.48 E-11 4.63 E-11 2.19 E-11 1.22 E-11 8.70 E-12 6.74 E-12 3.58 E-12 1.65 E-12 8.30 E-13

1 2.15 E-09 1.40 E-09 8.24 E-10 8.60 E-10 6.88 E-10 4.08 E-10 2.53 E-10 1.14 E-10 6.02 E-11 4.66 E-11 3.33 E-11 1.83 E-11 7.95 E-12 4.30 E-12

5 1.28 E-09 8.31 E-10 5.76 E-10 5.02 E-10 4.26 E-10 2.30 E-10 1.46 E-10 7.12 E-11 3.85 E-11 2.80 E-11 2.10 E-11 1.16 E-11 5.23 E-12 2.67 E-12

10 9.69 E-10 6.23 E-10 4.42 E-10 3.88 E-10 3.25 E-10 1.82 E-10 1.13 E-10 5.47 E-11 2.93 E-11 2.13 E-11 1.66 E-11 8.67 E-12 4.02 E-12 2.08 E-12

20 6.46 E-10 4.17 E-10 2.94 E-10 2.57 E-10 2.18 E-10 1.22 E-10 7.61 E-11 3.67 E-11 1.99 E-11 1.45 E-11 1.12 E-11 5.88 E-12 2.66 E-12 1.36 E-12

50 3.23 E-10 2.07 E-10 1.48 E-10 1.27 E-10 1.09 E-10 6.14 E-11 3.81 E-11 1.81 E-11 1.00 E-11 7.22 E-12 5.52 E-12 2.96 E-12 1.35 E-12 6.84 E-13

Table 11: Average time taken for Modified BRBMH Multiple Pattern Search Algorithm searching character (s) Pattern length: m m1=5 m2=10 m3=15 m4=20 m5=25 m6=50 m7=100 m8=250 m9=500 m10= 750 m11=1000 m12=2000 m13=5000 m14=10000

Sequential Method Number of Patterns 1 5 9.87 6.22 E-09 E-09 6.39 4.12 E-09 E-09 4.58 2.99 E-09 E-09 4.00 2.52 E-09 E-09 3.43 2.13 E-09 E-09 1.95 1.25 E-09 E-09 1.22 7.51 E-09 E-10 5.74 3.61 E-10 E-10 3.11 1.95 E-10 E-10 2.50 1.58 E-10 E-10 2.03 1.26 E-10 E-10 1.11 6.70 E-10 E-11 4.89 3.04 E-11 E-11 2.61 1.62 E-11 E-11

10 4.62 E-09 3.17 E-09 2.27 E-09 1.96 E-09 1.68 E-09 9.51 E-10 5.86 E-10 2.81 E-10 1.52 E-10 1.23 E-10 9.86 E-11 5.24 E-11 2.38 E-11 1.24 E-11

20 3.37 E-09 2.18 E-09 1.53 E-09 1.34 E-09 1.15 E-09 6.58 E-10 4.03 E-10 1.92 E-10 1.05 E-10 8.38 E-11 6.68 E-11 3.54 E-11 1.61 E-11 8.36 E-12

50 1.69 E-09 1.11 E-09 7.85 E-10 6.81 E-10 5.81 E-10 3.32 E-10 2.05 E-10 9.90 E-11 5.32 E-11 4.23 E-11 3.37 E-11 1.81 E-11 8.15 E-12 4.20 E-12

Dakshina-I Number of Patterns 1 5 2.24 1.41 E-09 E-09 1.48 9.72 E-09 E-10 1.10 6.86 E-09 E-10 9.51 5.89 E-10 E-10 8.10 5.05 E-10 E-10 4.68 2.89 E-10 E-10 2.89 1.77 E-10 E-10 1.37 8.61 E-10 E-11 7.40 4.65 E-11 E-11 5.61 3.38 E-11 E-11 4.63 2.88 E-11 E-11 2.42 1.50 E-11 E-11 1.10 6.75 E-11 E-12 5.95 3.59 E-12 E-12

10 1.09 E-09 7.39 E-10 5.28 E-10 4.52 E-10 3.88 E-10 2.18 E-10 1.36 E-10 6.61 E-11 3.54 E-11 2.60 E-11 2.15 E-11 1.13 E-11 5.19 E-12 2.72 E-12

20 7.44 E-10 4.93 E-10 3.54 E-10 3.05 E-10 2.59 E-10 1.48 E-10 9.19 E-11 4.35 E-11 2.40 E-11 1.74 E-11 1.43 E-11 7.77 E-12 3.47 E-12 1.82 E-12

50 3.71 E-10 2.43 E-10 1.75 E-10 1.54 E-10 1.30 E-10 7.43 E-11 4.54 E-11 2.17 E-11 1.18 E-11 8.74 E-12 7.19 E-12 3.84 E-12 1.73 E-12 8.89 E-13

Dakshina-II Number of Patterns 1 5 1.96 1.18 E-09 E-09 1.24 7.90 E-09 E-10 8.92 5.43 E-10 E-10 7.55 4.79 E-10 E-10 6.36 3.95 E-10 E-10 3.80 2.33 E-10 E-10 2.31 1.43 E-10 E-10 1.12 6.94 E-10 E-11 6.11 3.77 E-11 E-11 4.55 2.80 E-11 E-11 3.69 2.30 E-11 E-11 1.99 1.23 E-11 E-11 9.07 5.59 E-12 E-12 4.85 2.98 E-12 E-12

10 9.03 E-10 5.94 E-10 4.22 E-10 3.66 E-10 3.14 E-10 1.78 E-10 1.11 E-10 5.31 E-11 2.88 E-11 2.14 E-11 1.76 E-11 9.46 E-12 4.28 E-12 2.25 E-12

Journal of Computer and Mathematical Sciences Vol. 3, Issue 1, 29 February, 2012 Pages (1-130)

20 6.11 E-10 4.01 E-10 2.84 E-10 2.46 E-10 2.11 E-10 1.20 E-10 7.46 E-11 3.57 E-11 1.94 E-11 1.44 E-11 1.18 E-11 6.35 E-12 2.86 E-12 1.49 E-12

50 3.03 E-10 1.98 E-10 1.42 E-10 1.23 E-10 1.06 E-10 6.03 E-11 3.72 E-11 1.78 E-11 9.29 E-12 7.15 E-12 5.92 E-12 3.19 E-12 1.43 E-12 7.38 E-13


30

Prasad J. C., et al., J. Comp. & Math. Sci. Vol.3 (1), 19-35 (2012)

Time taken by searching a character in a large text of length n depends on the searching algorithm and number of nodes used [28]. The above table is the average value of s for 10 nodes. Now theoretical and

predicted searching time for the same text file of 60MB used with Configuration I and Configuration II is given below. The following result is obtained by adding T1, T2, T3, T4 and T5.

Table 12: Theoretical Parallel Execution Time for Aho-Corasick NFA Multiple Pattern Search Algorithm Searching Pattern length: mi 5 10 15 20 25 50 100 250 500 750 1000 2000 5000 10000

Sequential Method Number of Patterns 1 10.5 13.6 14.5 16.7 18.0 20.5 25.4 30.3 32.9 35.3 37.5 40.0 45.2 46.1

5 31.9 42.6 43.9 51.4 54.8 62.6 77.3 93.2 100.7 108.1 114.8 121.9 138.6 141.1

10 48.5 63.8 68.1 78.4 84.3 95.2 118.9 142.0 153.7 165.2 175.8 187.4 212.4 217.4

20 65.7 86.1 91.1 105.6 112.8 127.7 160.0 190.8 206.4 220.9 235.2 250.6 282.4 289.4

Dakshina-I Number of Patterns 50 81.9 106.3 114.0 131.8 140.6 160.8 199.2 238.0 257.8 275.9 294.0 313.6 354.6 362.4

1 2.2 3.0 3.2 3.8 4.0 4.6 5.8 6.9 7.9 7.9 8.4 8.9 10.1 10.3

5 7.0 9.3 10.3 11.4 12.3 14.0 17.5 20.5 22.0 24.0 25.7 27.4 30.8 31.5

10 11.7 14.4 15.4 17.5 18.8 21.1 26.7 31.6 33.7 36.7 39.1 41.7 47.1 48.3

20 14.7 19.0 20.5 23.3 24.9 28.6 35.0 42.3 45.9 49.6 52.3 55.9 63.0 64.3

Dakshina-II Number of Patterns 50 18.3 23.7 25.5 29.3 31.5 35.9 44.3 52.9 57.3 61.5 65.4 69.3 78.6 80.8

1 1.9 2.5 2.7 3.1 3.3 3.7 4.7 5.3 6.0 6.4 6.9 7.5 9.0 9.1

5 5.8 7.6 8.1 9.4 10.2 11.8 14.5 16.8 18.0 19.4 21.0 22.6 25.2 26.0

10 8.9 11.7 12.4 14.5 15.9 17.8 22.4 26.6 28.4 29.7 31.9 34.6 38.7 40.0

20 12.0 15.5 16.6 19.2 20.7 23.7 28.6 34.1 37.9 41.4 42.9 45.1 51.6 53.3

50 15.7 19.4 21.2 24.1 25.9 29.5 36.8 43.6 46.9 50.1 53.3 57.4 65.3 65.8

Table 13: Theoretical Parallel Execution Time for Wu-Manber Multiple Pattern Search Algorithm Searching Pattern length: mi 5 10 15 20 25 50 100 250 500 750 1000 2000 5000 10000

Sequential Method Number of Patterns 1 3.5 4.5 4.9 5.7 6.1 6.9 8.6 10.1 11.0 11.6 12.5 13.8 15.1 16.1

5 10.7 14.2 15.5 17.4 18.4 21.5 25.9 31.1 33.6 36.1 37.9 40.9 46.4 49.2

10 15.6 21.4 22.9 26.5 28.4 32.1 39.5 47.4 51.3 55.3 59.0 62.6 71.2 74.0

Dakshina-I Number of Patterns 20 22.2 28.8 30.4 35.4 38.0 43.4 53.3 63.4 69.1 73.8 78.4 83.2 94.5 98.1

50 27.4 35.8 38.1 44.0 47.0 53.7 66.3 80.0 85.9 92.1 97.8 104.9 118.4 121.9

1 0.8 1.0 1.1 1.3 1.3 1.5 1.9 2.2 2.4 2.7 2.9 3.0 3.4 3.7

5 2.3 3.2 3.4 3.8 4.1 4.7 5.7 7.0 7.5 8.0 8.7 9.1 10.2 10.8

10 3.6 4.8 5.2 5.9 6.3 7.1 8.8 10.7 11.4 12.3 13.0 13.7 15.7 16.4

Dakshina-II Number of Patterns 20 4.8 6.4 6.9 7.9 8.4 9.6 11.9 14.1 15.5 16.5 17.3 18.7 20.9 22.0

50 6.0 7.9 8.5 10.0 10.5 12.1 14.7 17.5 19.1 20.6 21.7 23.2 26.2 26.9

1 0.7 0.8 0.9 1.0 1.1 1.3 1.5 1.8 2.0 2.1 2.2 2.4 2.8 3.0

5 2.0 2.6 2.7 3.1 3.2 3.8 4.7 5.7 6.1 6.7 7.0 7.5 8.4 9.0

10 3.0 3.9 4.2 4.8 5.2 5.9 7.3 8.7 9.4 10.1 10.7 11.4 13.0 13.6

Journal of Computer and Mathematical Sciences Vol. 3, Issue 1, 29 February, 2012 Pages (1-130)

20 4.0 5.3 5.6 6.5 6.9 7.8 9.8 11.7 12.6 13.5 14.3 15.4 17.3 18.0

50 5.0 6.5 7.0 8.1 8.6 9.9 12.2 14.6 15.3 16.8 17.9 19.2 21.7 22.3


31

Prasad J. C., et al., J. Comp. & Math. Sci. Vol.3 (1), 19-35 (2012) Table 14: Theoretical Parallel Execution Time for AC-Bitmap Multiple Pattern Search Algorithm Searching Pattern length: mi

Sequential Method

Dakshina-I

Dakshina-II

Number of Patterns

Number of Patterns

Number of Patterns

1

5

10

20

50

1

5

10

20

50

1

5

10

20

50

5

13.6

35.4

51.9

69.5

85.7

3.0

8.0

11.7

16.0

19.1

2.4

6.5

9.5

12.8

15.7

10

16.8

46.0

68.0

89.5

109.9

3.8

10.3

15.3

20.4

24.3

3.1

8.6

12.4

16.5

20.1

15

18.2

47.5

71.6

94.8

117.7

4.1

10.7

16.1

21.4

24.6

3.4

8.7

13.1

17.3

21.6

20

19.7

54.5

82.8

108.9

135.7

4.5

12.2

18.7

24.2

30.3

3.7

10.0

15.2

19.9

24.9

25

21.3

58.2

89.3

116.7

144.0

4.7

13.0

19.9

25.9

32.0

4.0

10.7

16.4

21.4

26.3

50

24.6

66.0

98.9

131.3

165.1

5.5

14.9

22.0

29.4

37.3

4.5

12.2

18.1

24.1

30.3

100

28.5

80.7

123.0

163.0

203.2

6.5

18.0

27.2

36.2

45.2

5.2

14.8

22.6

29.9

37.2

250

33.5

96.5

145.7

194.0

241.7

7.5

21.5

32.3

43.4

54.0

6.1

17.7

26.7

35.5

44.3

500

36.5

104.0

157.6

210.5

261.4

8.2

23.4

35.0

46.8

58.1

6.7

19.0

28.8

38.6

47.8

750

38.6

111.3

168.6

225.3

279.8

8.6

24.9

37.6

50.1

62.3

7.0

20.4

30.9

41.2

51.2

1000

40.8

118.5

179.3

238.7

298.1

9.1

26.5

39.9

53.2

66.4

7.4

21.7

32.8

43.7

54.6

2000

41.7

115.1

162.7

211.5

243.5

9.0

25.8

36.4

46.7

54.3

7.6

21.1

29.8

38.7

44.5

5000

46.3

131.3

183.3

239.4

276.0

10.5

29.5

40.8

53.2

61.3

8.5

24.1

33.6

43.9

50.5

10000

47.4

134.3

188.1

244.4

281.8

10.7

30.2

42.1

54.4

63.0

8.7

24.6

34.4

44.8

51.6

Table 15: Theoretical Parallel Execution Time for q-Grams Multiple Pattern Search Algorithm Searching Pattern length: mi

Sequential Method

Dakshina-I

Dakshina-II

Number of Patterns

Number of Patterns

Number of Patterns

1

5

10

20

50

1

5

10

20

50

1

5

10

20

50

5

3.6

11.0

16.6

22.3

27.9

0.8

2.4

3.7

5.0

6.1

0.7

2.1

3.1

4.1

5.1

10

4.5

14.4

21.5

28.8

35.8

0.9

3.2

4.8

6.4

8.1

0.9

2.7

4.0

5.3

6.6

15

4.4

14.9

22.9

30.4

38.4

1.0

3.3

5.1

6.8

8.6

0.8

2.8

4.2

5.6

7.1

20

5.7

17.4

26.8

35.4

44.0

1.3

3.9

6.0

7.9

9.8

1.1

3.2

4.9

6.5

8.1

25

6.0

18.3

28.1

37.6

47.1

1.4

4.1

6.3

8.4

10.5

1.1

3.4

5.2

6.9

8.7

50

7.0

19.9

31.3

42.3

53.1

1.6

4.5

7.0

9.4

11.9

1.3

3.7

5.8

7.8

9.8

100

8.7

25.2

39.1

52.5

65.8

1.9

5.6

8.7

11.8

14.7

1.6

4.7

7.2

9.7

12.1 14.4

250

9.6

30.9

47.2

63.3

78.2

2.1

6.9

10.6

14.1

17.4

1.8

5.7

8.7

11.7

500

10.4

33.3

50.8

68.7

86.9

2.3

7.4

11.3

15.4

19.3

1.9

6.1

9.3

12.6

15.9

750

12.0

36.2

55.3

75.5

92.5

2.8

8.1

12.4

16.9

20.7

2.2

6.7

10.1

13.8

17.2

1000

11.5

36.3

57.5

77.3

95.6

2.6

8.1

12.9

17.2

21.4

2.1

6.7

10.6

14.2

17.5

2000

12.8

40.4

59.7

81.5

102.0

2.9

9.0

13.3

18.2

22.7

2.3

7.4

11.0

14.9

18.8

5000

13.8

45.1

69.4

92.0

116.4

3.2

10.1

15.6

20.5

26.1

2.6

8.3

12.7

16.9

21.5

10000

15.0

46.1

71.6

93.8

118.7

3.2

10.3

16.0

20.9

26.3

2.8

8.5

13.2

17.2

21.7

Journal of Computer and Mathematical Sciences Vol. 3, Issue 1, 29 February, 2012 Pages (1-130)


32

Prasad J. C., et al., J. Comp. & Math. Sci. Vol.3 (1), 19-35 (2012) Table 16: Theoretical Parallel Execution Time for Modified BRBMH Multiple Pattern Search Algorithm Searching

Pattern length: mi

Sequential Method

Dakshina-I

Dakshina-II

Number of Patterns

Number of Patterns

Number of Patterns

1

5

10

20

50

1

5

10

20

50

1

5

10

20

50

5

3.2

9.9

14.7

21.4

26.8

0.7

2.3

3.5

4.7

5.9

0.7

1.9

2.9

3.9

4.8

10

4.1

13.1

20.1

27.7

35.1

1.0

3.1

4.7

6.3

7.7

0.8

2.5

3.8

5.1

6.3

15

4.4

14.2

21.5

29.2

37.3

1.1

3.3

5.0

6.8

8.4

0.9

2.6

4.0

5.4

6.8

20

5.1

16.0

24.9

34.0

43.2

1.2

3.8

5.8

7.8

9.8

1.0

3.1

4.7

6.3

7.8

25

5.5

16.9

26.7

36.5

46.0

1.3

4.0

6.2

8.2

10.3

1.0

3.2

5.0

6.7

8.4

50

6.2

19.8

30.1

41.7

52.6

1.5

4.6

6.9

9.4

11.8

1.2

3.7

5.7

7.6

9.6

100

7.8

23.8

37.1

51.1

65.0

1.9

5.6

8.6

11.7

14.4

1.5

4.6

7.0

9.5

11.8

250

9.1

28.6

44.5

60.9

78.4

2.2

6.8

10.5

13.8

17.2

1.8

5.5

8.4

11.3

14.1

500

9.9

30.9

48.3

66.4

84.2

2.4

7.4

11.2

15.2

18.7

2.0

6.0

9.1

12.3

14.7

750

11.9

37.5

58.6

79.6

100.4

2.7

8.0

12.4

16.6

20.8

2.2

6.7

10.2

13.7

17.0

1000

12.9

39.8

62.4

84.6

106.6

3.0

9.2

13.6

18.2

22.8

2.4

7.3

11.2

15.0

18.8

2000

14.1

42.5

66.4

89.8

114.4

3.1

9.5

14.4

19.7

24.4

2.5

7.8

12.0

16.1

20.2

5000

15.5

48.2

75.4

102.0

129.0

3.5

10.7

16.5

22.0

27.5

2.9

8.9

13.6

18.1

22.7

10000

16.6

51.2

78.4

105.9

132.9

3.8

11.4

17.3

23.1

28.2

3.1

9.5

14.3

18.9

23.4

l1 is the latency time, a fixed startup overhead time needed to prepare sending a message from one processor to the other and c1 be the incremental communication time per byte. In order to find the values of l1 and c1, ping-pong test is performed [29] between two processors, which send/receive a number of messages between two processes on the same processor. Both processes do nothing but simply send and receive messages. All timings are average times over 100 separate rounds. The values of l1 and c1 can be found using the linear regression method to fit a straight line to the curve of the communication31. Gigabit Ethernet provides a reasonably high bandwidth given its low price, but suffers from relatively high latency. The average latency value l1 is 95.72 Âľs(95.72 x 10-6 Seconds)30. The average incremental communication time c1 is 0.02731 Âľs (0.02731 x 10 -6 Seconds).

6. PERFORMANCE ANALYSIS Experimental results and estimates for the running time of multiple string searching algorithms are presented by assuming that both the text and the patterns are random strings with uniform distribution. In practice, texts and patterns are not random, but this estimate gives a rough idea about the performance of these algorithms. It is assumed that all patterns have the same length m for simplicity of description only; multiple pattern searh algorithms do not make such assumption. Time required for division of subtext Đ„1 is negligibly small when compared to the other factors. Reverse factor low is not relevant with this experiment because of the collision during the network traffic. The expected running time is higher than experimented case. This is because of the worst case computation values have considered in the formula

Journal of Computer and Mathematical Sciences Vol. 3, Issue 1, 29 February, 2012 Pages (1-130)


Prasad J. C., et al., J. Comp. & Math. Sci. Vol.3 (1), 19-35 (2012)

(Table 6). By fixing the value of s based on length of characters m, n and number of computations for different algorithms, is the significant part of this linear approach method to estimate static search time. Each experiment performed 10 times and the average value is taken (deviations were very small). 7. CONCLUSION The above mentioned method is a general method to find searching time in worst case situations. Different algorithms works in different ways. Running time of certain algorithms is independent of the keyword set. The experimental results show the close relationship with theoretical analyzed searching time. Nearly 90% of accuracy for searching prediction can be achieved with this method on this particular environment. When the number of pattern increases, accuracy reduces in these experiments. The effective application of this formula is for natural language searching and network security applications. The experimental results show that the proposed prediction method works effectively by considering worst case of these algorithms, especially in case of alphabets32 of ASCII codes, and thus the proposed method is quite applicable for exact and multiple pattern matching of natural language. The result of algorithms helps us to implement these technologies in the areas of text search, DNA search and web related fields in a cost effective manner.

33

REFERENCES 1. Thomas Sterling. Beowulf Cluster Computing with Linux, MIT Press. Page 25 (2006). 2. A. Petitet, R. C. Whaley, J. Dongarra, A. Cleary. HPL-A Portable Implementation of the High-Performance Linpack Benchmark for Distributed-Memory Computers, Innovative Computing Laboratory, University of Tenneesse. doi: http://www.netlib.org/benchmark/hpl/ (Sept 2008). 3. Peter S. Pacheco. Parallel Programming with MPI.. Morgan Kaufmann Publishers, Inc. Page 28 (1997). 4. Al Geist, Adam Beguelin, Jack Dongarra. PVM: a users' guide and tutorial for networked parallel computing, MIT Press. Page 103-107 (1996). 5. William Gropp, Ewing Lusk, Anthony Skjellum. Using MPI: Portable parallel programming with the message-passing interface.. MIT Press. Page 124 (1996). 6. Markus Weinhardt, Wayne Luk. TaskParallel Programming of Reconfigurable Systems’, Springer Berlin / Heidelberg, ISBN 978-3-540-42499-4, Page 172-181 (2002). 7. Michailidis, P. D., Margaritis, K. G. ‘Parallel text searching applications on a heterogeneous cluster architecture’, Int. J. Computational Science and Engineering, Vol. 1, No. 1, pp.45–59 (2005). 8. A. V. Aho and M. J. Corasick. “Efficient string matching: An aid to bibliographic search.” Communications of the ACM, 18(6), pp.333–340 (1975).

Journal of Computer and Mathematical Sciences Vol. 3, Issue 1, 29 February, 2012 Pages (1-130)


34

Prasad J. C., et al., J. Comp. & Math. Sci. Vol.3 (1), 19-35 (2012)

9. N. Tuck, T. Sherwood, B. Calder, G. Varghese, “Deterministic Memory Efficient String Matching Algorithms for Intrusion Detection,” Proceedings Of The Ieee Infocom Conference, PP. 333– 340 (2004). 10. Sun Wu , Udi Manber, A Fast Algorithm for Multi-Pattern Searching, http://Webglimpse.Net/Pubs/Tr9417.Pdf (1994). 11. L. Salmela, J. Tarhio, J. Kyt¨Ojoki, Multi-Pattern String Matching with qgrams, ACM Journal of Experimental Algorithmics, Volume 11 (2006). 12. Prasad J.C., K.S.M.Panicker. ‘Beowulf Dakshina Cluster Architecture with Linux Debian Operating system for MPI Programming’, Proceedings of International Conference on Information Processing,, Bangalore, India ISBN: 978-93-80026-75-2, Page 350 (2009). 13. P.D. Michailidis, K.G. Margaritis. Parallel String Matching Algorithm: A bibliographical review, Technical Report, Dept. of Applied Informatics, University of Macedonia (2000). 14. Panagiotis D. Michailidis and Konstantinos G. Margaritis. ‘Parallel Text Searching Application on a Heterogeneous Cluster of Workstations’, IEEE Computer Society Proceedings of the International Conference on Parallel Processing Workshops (ICPPW’01), Page. 153 (2001). 15. Amdahl, Gene. ‘Validity of the Single Processor Approach to Achieving Large-Scale Computing Capabilities’. AFIPS Conference Proceedings,: 483– 485. www.inst.eecs.berkeley.edu/~n252/pape r/Amdahl.pdf. (1967).

16. John L. Gustafson, Reevaluating Amdahl's Law, Ames Laboratory, Department of Energy, ISU, Ames, Iowa. www.scl.ameslab.gov/Publications/Gus/ AmdahlsLaw/Amdahls.html 17. Benner, R.E., Gustafson, J.L., Montry, G.R. Development and analysis of scientific application programs on a 1024-processor hypercube, Sandia National Laboratories, Page 0317 (1988). 18. Prasad J.C., KSM Panicker. ‘String Searching Algorithm ImplementationPerformance Study With Two Cluster Configurations’, International Journal of Computer Science and Communication, ISSN: 0973-7391, Page 551-555 (2010). 19. Recent Advances in Parallel Virtual Machine and Message Passing Interface. 12th European PVM/MPI Users’ Group Meeting Sorrento, Italy, September 1821. Proceedings, Springer, Volume 3666 (2005). 20. Prasad J. C, K. S. M. Panicker, International Journal of Research in Engineering & Applied Science(ISSN 2294-3905), Cluster Architecture for Parallelism Technologies, Volume1, Issue 2, 18-34 October, (2011). 21. Gerald Carter. LDAP System Administration, O'Reilly, page 2 (2003). 22. Panagiotis D. Michailidis, Konstantinos G. Margaritis. Parallel implementations for string matching problem on a cluster of distributed workstations, Neural, Parallel & Scientific Computations, Volume 10 , Issue 3, Pages: 287 – 312 (2002).

Journal of Computer and Mathematical Sciences Vol. 3, Issue 1, 29 February, 2012 Pages (1-130)


Prasad J. C., et al., J. Comp. & Math. Sci. Vol.3 (1), 19-35 (2012)

23. Ahmad Fadel Klaib, Hugh Osborne. ‘Searching Protien Sequence Databases Using BRBMH Matching Algorithm’, IJCSNS International Journal of Computer Science and Network Security, Vol.8, No 12, Page 59 (Dec 2008). 24. Garth A. Gibson, Rodney Van Meter. ‘Network attached storage architecture’, Communications of the ACM, Volume 43 , Issue 11, Pages: 37 – 45 (2000). 25. Yang Yu Bhaskar Krishnamachari Prasanna, V.K. ‘Issues in designing middleware for wireless sensor networks: Network, IEEE, Volume: 18, Issue: 1, page15- 21 (2004). 26. F Ashiya, M Matsumoto, S Nagasawa, S Tomita.Loop-network configuration and single-mode optical fiber cable technologies for subscriber network, International Journal of Digital & Analog Communication Systems, Volume 3. Issue 1, , John Wiley & Sons, Ltd, Pages 77 – 83 (2007). 27. J. Rodriguez De Souza, E. Argollo, A. Duarte, D. Rexachs, E. Luque. Fault Tolerant Master-Worker over a MultiCluster Architecture, Proceedings of the International Conference Parallel Computing: Current & Future Issues of High-End Computing, NIC Series, Vol.

28.

29.

30.

31.

32.

35

33, ISBN 3-00-017352-8, Pages. 465472 (2007). Smit, G.De V. “A comparison of three string matching algorithms”, Software Practice and Experience, Page57-66 (1982). Kiran Nagaraja, Neeraj Krishnan, Ricardo Bianchini, Richard P. Martin, Thu D. Nguyen, “Evaluating the Impact of Communication Architecture on the per formability of Cluster-Based Services’, Department of Computer Science, Rutgers University,NJ 08854, http://darkpanic.rutgers.edu/Research/mendosus/pu blications/commimpactHPCA-03.pdf Anderson, T., D. Culler, D. Patterson. A Case for NOW (Network of Workstations), IEEE Micro, Vol.15, pp. 54-64 (1995). Panagiotis D. Michailidis and Konstantinos G. Margaritis. “String Matching Problem On A Cluster of Personal Computers: Performance Modeling”, Intern. J. Computer Math., Taylor & Francis, Vol. 79(8), pp. 867– 888 (2002). Foster, Ian. Designing and Building Parallel Programs Addison-Wesley, ISBN 0201575949, Message Passing Interface, page 245 (1995).

Journal of Computer and Mathematical Sciences Vol. 3, Issue 1, 29 February, 2012 Pages (1-130)


Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.