International Journal of Advanced Research in Engineering and Technology (IJARET) Volume 11, Issue 9, September 2020, pp. 602-611, Article ID: IJARET_11_09_061 Available online at http://iaeme.com/Home/issue/IJARET?Volume=11&Issue=9 ISSN Print: 0976-6480 and ISSN Online: 0976-6499 DOI: 10.34218/IJARET.11.9.2020.061

© IAEME Publication Scopus Indexed

IMPROVING PERFORMANCE OF THE DISTRIBUTED FILE SYSTEM USING SPECULATIVE READ ALGORITHM AND SUPPORT-BASED REPLACEMENT TECHNIQUE

Rathnamma Gopisetty Research Scholar at Jawaharlal Nehru Technological University, Anantapur, India.

Thirumalaisamy Ragunathan Department of Science and Engineering, SRM University, Andhra Pradesh, India.

C Shoba Bindu Department of Computer Science and Engineering, Jawaharlal Nehru Technological University, Anantapur, India.

ABSTRACT systems use distributed file systems (DFSs) to store and large data generated in the organizations. The users of the web-based information systems very frequently perform read operations and infrequently carry out write operations on the data stored in the DFS. Various caching and prefetching techniques are proposed in the literature to improve performance of the read operations carried out on the DFS. In this paper, we have proposed a novel speculative read algorithm for improving performance of the read operations carried out on the DFS by considering the presence of client-side and global caches in the DFS environment. The proposed algorithm performs speculative executions by reading the data from the local client-side cache, local collaborative cache, from global cache and global collaborative cache. One of the speculative executions will be selected based on the time stamp verification process. The proposed algorithm reduces the write/update overhead and hence performs better than that of the non-speculative algorithm proposed for the similar DFS environment. Key words: Distributed file system, Client side caching, Prefetching, Hierarchical Caching, Replacement Algorithms, Speculative Execution

http://iaeme.com/Home/journal/IJARET 602 [email protected] Improving Performance of the Distributed File System Using Speculative Read Algorithm and Support-Based Replacement Technique

Cite this Article: Rathnamma Gopisetty, Thirumalaisamy Ragunathan and C Shoba Bindu, Improving Performance of the Distributed File System Using Speculative Read Algorithm and Support-Based Replacement Technique, International Journal of Advanced Research in Engineering and Technology, 11(9), 2020, pp. 602-611. http://iaeme.com/Home/issue/IJARET?Volume=11&Issue=9

1. INTRODUCTION In the emerging big data scenario, web-based information systems (WISs) are being deployed in cloud computing systems to serve millions of online users efficiently. Cloud computing systems provide scalable storage and computing power so that deploying WIS will be beneficial to the owners of the organizations and also the users of the WIS. Cloud computing system uses distributed file system (DFS) at the back end to store the large data in a distributed manner so that storage will be scalable. The distributed file system (DFS) environment consists of data nodes (DNs) and name nodes (NNs). The DNs are used to store the data permanently in the hard disks and NNs are used to store metadata. Note that, the read or update requests submitted by the users are carried out in the DNs. The WIS receives very frequently the read requests and less frequently the write/update requests. Hence, improving performance of the read operations carried out on the DFS has become an important issue in the current context.

2. RELATED WORK In this section, we discuss regarding the speculative techniques which have been proposed in the literature for improving the performance of distributed file systems. Modern processors use Speculative execution technique to alleviate pipeline stall problem by executing the next likely instructions in advance [1]–[5]. A large body of research has been dedicated to improve the performance of storage systems by reducing the disk Input/Output operations. A speculation-based method discussed in [6], starts the speculative execution using the local cache contents first. The timestamps obtained from the server disk and local caches are compared to commit the execution. An aggressive hint-driven prefetching system [7] is proposed to speculatively pre-execute the application’s code in order to discover and issue hints for its future read accesses, but the applications need to be manually modified to issue hints. Big Data systems such as Google MapReduce, Apache Hadoop, rely on speculative execution [8, 9] to mask slow tasks in turn to shorten job execution times.

3. PROPOSED SPECULATIVE READ ALGORITHM Speculative execution is an important issue in computer architecture, which enables parallel execution of serial programs. Executing instructions ahead of their typical schedule is called as speculative execution. This section describes how the proposed speculative read algorithm works. Speculative execution is a method that permits serial tasks to be executed in parallel. To implement speculative execution, the system anticipates the result of a particular operation and continues with its execution based on that predicted value. When the operation execution completes, the actual result obtained is compared with the predicted result. The system commits the speculative state, if the prediction was correct. Otherwise, the system rollback the system state to a consistent state prior point in time. Speculative execution has been used to improve performance in many systems including distributed file systems [6].

http://iaeme.com/Home/journal/IJARET 603 [email protected] Rathnamma Gopisetty, Thirumalaisamy Ragunathan and C Shoba Bindu

The hierarchical global collaborative caching (HCGC) algorithm proposed in [12], the read operation invoked, searches for the requested file block to complete, in a sequential fashion starting from lower level cache to higher level cache of the multi level caches available in the system. It would be beneficial if we execute the read operation concurrently as the hierarchical caches present in the system are pre-filled with the popular file blocks and the possibility to find these file blocks in any one (or more ) of the caches of the system. The motivation behind speculative read algorithm is to reduce the read latency. The proposed speculative read algorithm allows the application to concurrently execute the read operation on the contents of local cache (LC), the collaborative local cache (LCC), the global cache (GC), the collaborative global cache (GCC) and disk to reduce the read operation latency. The proposed speculative read algorithm along with the support based prefetching [11], hierarchical collaborative global caching and the support based replacement algorithms [12] works as follows. Whenever a client application program running in a DN requests for a file block Fb, then the local cache manager simultaneously verifies with the local cache (LC), the collaborative local cache (LCC), the global cache (GC) and the collaborative global cache (GCC) for the file block, by communicating with the appropriate cache managers and by creating speculative executions (SPs). Speculative threads are created on behalf of each speculative execution and named as SP1, SP2, SP3, SP4, SP5, SP6, and SP7. Speculative SP1 represents the speculative execution initiated at local cache (LCDN). SP2 is a speculative thread, which represents the speculative execution initiated at one of the local cache on the same rack (local collaborative cache-LCC). The speculative execution started at global cache (GC) present on same rack is carried out by the speculative thread SP3. SP4 is the speculative thread created to represent the speculative execution started at global collaborative cache (global cache present on any rack-GCC). Speculative execution started at a nearest data node (DN) is represented by the speculative thread SP5. Speculative thread SP1 starts its execution if the requested file block Fb is available in the local cache (LCDN) otherwise it will get terminated. SP2 execution will be started if the requested Fb is available in any one of the local cache present on the same rack i.e the collaborative local cache (LCC). SP3 execution will be started if the requested Fb is available in the global cache (GC) connected to the same rack. SP4 execution will be started if the requested Fb is available in any one of the global cache present on any rack i.e. the global collaborative cache (GCC). Simultaneously, the DFS client program running in that DN starts the speculative execution by invoking SP5 thread to communicate with the NN to read the metadata (addresses of the data nodes where the file block is available and timestamp of the file block). Next, the time stamp value returned by the NN is checked up with the time stamp values of the copies in the local cache, collaborative local cache, global cache, and collaborative global cache. If the time stamp value of any one of the cached copies is matching then the speculative execution initiated in that cache will be allowed to continue and the speculative executions initiated in the remaining caches will be terminated. If time stamp value is not matching with that of all the cached copies then the speculative execution initiated at the disk is committed. Algorithm 1 describes the speculative read algorithm.

http://iaeme.com/Home/journal/IJARET 604 [email protected] Improving Performance of the Distributed File System Using Speculative Read Algorithm and Support-Based Replacement Technique

3.1. Algorithm 1 Speculative read algorithm /* A client application program AP executes in the data node DN has to read a File block Fb of file F */ 1: Timestamp t1=getNameNodeTimeStamp(Fb) 2: Timestamp t2=get-LC-TimeStamp(Fb) 3: Timestamp t3=get-LCC-TimeStamp(Fb) 4: Timestamp t4=get-GC-TimeStamp(Fb) 5: Timestamp t5=get-GCC-TimeStamp(Fb) 6: Timestamp t6=get-closest DNs-TimeStamp(Fb) /* Create speculative execution threads SP1,SP2,SP3,SP4, and SP5 and all these threads will be executed in parallel */ 7: if (fb is present in the LCDN) then SP1 starts execution 8: else SP1 is terminated 9: end if 10: if (fb is present in the LCC) then SP2 starts execution 11: else SP2 is terminated 12: end if 13: if (fb is present in the GC (present on same rack) ) then SP3 starts execution 14: else SP3 is terminated 15: end if 16: if (fb is present in the GCC (GC present on any rack) ) then SP4 starts execution 17: else SP4 is terminated 18: end if 19: if (fb is present in the closest DNs disk)) then SP5 starts execution 20: else SP5 is terminated 21: end if 22: if ( t1!=null) and ( t2!=null) and (t2 == t1) then 23: Terminate SP2, SP3, SP4, SP5 24: Wait for SP1 to complete 25: else if ( t3!=null and t3 == t1) then 26: Terminate SP1, SP3, SP4, SP5 27: Wait for SP2 to complete 28: else if ( t4!=null and t4 == t1 ) then 29: Terminate SP1, SP2, SP4, SP5 30: Wait for SP3 to complete 31: else if ( t5!=null and t5 == t1 ) then 32: Terminate SP1, SP2, SP3, SP5 33: Wait for SP4 to complete 34: else if (t6!=null and t6 == t1) then 35: Terminate SP1, SP2, SP3, SP4 36: Wait for SP5 to complete

http://iaeme.com/Home/journal/IJARET 605 [email protected] Rathnamma Gopisetty, Thirumalaisamy Ragunathan and C Shoba Bindu

37: else File not found

4. WRITE PROCEDURE The procedure followed for implementing write operation is discussed in this section. When a client application program executing in the data node has issued a write operation on file block then the file block is first copied into the local cache, global cache and to fulfill the requirement of replication factor the file block is written to local disk, remote disk on same rack and remote disk on different rack. The write procedure is described in algorithm 2. The traditional write procedure writes the data only to the disks available in the DFS. We have modified the write operation such that the newly written copy of the data is also placed in the local cache and in the global cache along with one or more disks according to the replication factor followed in the DFS. So that the subsequent read operations invoked on the new blocks will get benefited from the data copies available in the local cache and global cache and also avoids the disk accesses. This will also increases the system performance by reducing the read operation latency.

4.1. Algorithm 2 Write Procedure /* A client application program AP executes in the data node DN has to write/update a File block fb of file F */ 1: if (write (new file block fb) then 2: Write in local cache 3: Write in global cache 4: write to local disk 5: Write in remote disk on same rack (replica on same rack) 6: Write in remote disk on different rack (replica on different rack) 7: end if

5. PERFORMANCE EVALUATION In this section, we cover the assumptions that we have made for implementing the speculative read algorithm. The implementation details of the proposed algorithms are covered next.

5.1. Assumptions 1) To avoid the communication overhead cache synchronization or invalidation protocol is not used. 2) The DFS client program communicates with the NN to collect the addresses of the DNs where the requested file copies are available. 3) Local and global caches have got fixed capacity. 4) Whenever a new file block has to be added to a file first that file block is written to the local cache, global cache and then it is copied to the disk by following the write through policy. 5) 80% of read and 20% of write processes are running in the DFS. 6) The minimum threshold value considered for prefetching is 0.6.

5.2. Experimental Setup In this section, we present implementation details of the proposed algorithms. The computing and storage infrastructure of the DFS considered to conduct the experiments consists of 10

http://iaeme.com/Home/journal/IJARET 606 [email protected] Improving Performance of the Distributed File System Using Speculative Read Algorithm and Support-Based Replacement Technique racks R1, R2... R10 and each rack consist of ten DNs. Each rack also consists of a cache node with the global cache to facilitate the implementation of HCGC algorithm. We have also assumed that NN is connected to rack R1.

5.2.1. Specifications We have considered the following specifications for computing average read access time for a file block. We have considered that the file block size as 4 KB for the DFS and the average communication delay (ACD) requisite for transferring a file block from a remote data node to the local data node as 4 milliseconds. Based on the specifications of the switched local area network [13], the time requisite to transfer time stamp and metadata information is considered as 0.125 milliseconds. By considering the latest Seagate disk storage devices [14], the average time requisite to access a file block from the local disk storage system is 12 milliseconds. We have considered that the average time required for accessing a file block from the main memory as 0.005 milliseconds, by considering latest DDR4 dynamic random access memory technologies [15]. The time required to read 4KB of file block from the remote memory as 4.01 milliseconds. And access time for transferring metadata as 0.125 milliseconds. The average communication delay (ACD) requisite for transferring a file block from a remote data node (present in a different rack) to a local data node is 6 milliseconds.

5.3. Synthetic Log Generation In order to generate a more realistic log, we used MediSyn [16], [17]. We have assumed that, there are 100 files present in the DFS and each file consists of 25 to 1000 blocks. The file and block popularity ranks are generated by using the random permutation and rejection method. We have used a generalized Zipf distribution function to generate file and block frequencies. We have fixed popularity parameter (p) value as 0.8 and maximum file frequency (Mf) value as 500, maximum file block frequency (Mb) value as 1000, and scale parameter k as 30. The request arrival for a day is modeled as a non-homogeneous Poisson distribution function and each interval consists of 1000 requests. After sessions are generated, we have merged all the sessions according to the arrival time to build the complete log. For conducting simulation experiments, we have considered that a log consisting entries of 100000 sessions and each session has got a number of read or write requests. Note that, each read or write request consists of 5 to 15 file blocks. We have to calculate local and global support for each file by considering a DN. We have considered that files which have greater than 60% support value as popular files. Then, for each popular file, we have computed popular file blocks which have local and global support value greater than 60%. Popular file blocks local to each DN is stored in the local cache of that DN and the left over popular file blocks (if any) and the global popular file blocks are stored in the corresponding global cache present in the cache node of the rack in which that DN is present. In each simulation run, we have generated 100000 sessions using non-homogeneous poisson distribution function, and each interval consists of 1000 read and write requests and calculated the average read access time.

5.4. Results of the Simulation In this section we present the results of simulation experiments of speculative read algorithm using support based prefetching, hierarchical collaborative global caching, LRU replacement, and the support based replacement algorithms. Figure 1 depicts the average read access time performance of speculative read algorithm with LRU, support based replacement techniques. Figure 2 depicts the cache hit ratio of the

http://iaeme.com/Home/journal/IJARET 607 [email protected] Rathnamma Gopisetty, Thirumalaisamy Ragunathan and C Shoba Bindu speculative read algorithm with LRU, support based replacement techniques. To conduct these experiments, we have fixed the size of local cache as 100 global cache as 500, number of files present in the system as 100 and varied the file size as 25, 50, 75 and 100 file blocks and observed the performance.

Figure 1 Number of file blocks in a file Vs Average read access time (Local cache size is 100 and Global cache size is 500 blocks). Figure 3 depicts the average read access time performance of speculative read algorithm with LRU, support based replacement techniques. Figure 4 depicts the cache hit ratio of the speculative read algorithm with LRU, support based replacement techniques. To conduct these experiments, we have fixed the size of local cache as 500 global cache as 2000, number of files present in the system as 100 and varied the file size from 200 to 500 file blocks and observed the performance. For this and next experiments, we have fixed the local cache size as 1000 blocks, global cache size as 5000, varied the number file blocks in a file from 250 to 1000 and plotted the graph which are shown in Figure 5and Figure 6. In Figure 5 and Figure 6 we can observe the average read access time performance and cache hit ratio of the speculative read algorithm with LRU, support based replacement techniques. Through the experiments we can see that the proposed speculative read algorithm with support based replacement techniques performs better than speculative read algorithm with LRU replacement. The reason behind this is the cache content usually becomes stable, after filled with the file blocks of maximum support value.

Figure 2 Number of file blocks in a file Vs Cache hit ratio (Local cache size is 100 and Global cache size is 500 blocks).

http://iaeme.com/Home/journal/IJARET 608 [email protected] Improving Performance of the Distributed File System Using Speculative Read Algorithm and Support-Based Replacement Technique

Figure 3 Number of file blocks in a file Vs Average read access time (Local cache size is 100 and Global cache size is 500 blocks).

Figure 4 Number of file blocks in a file Vs Cache hit ratio (Local cache size is 100 and Global cache size is 500 blocks).

Figure 5 Number of file blocks in a file Vs Average read access time (Local cache size is 100 and Global cache size is 500 blocks).

http://iaeme.com/Home/journal/IJARET 609 [email protected] Rathnamma Gopisetty, Thirumalaisamy Ragunathan and C Shoba Bindu

Figure 6 Number of file blocks in a file Vs Cache hit ratio (Local cache size is 100 and Global cache size is 500 blocks). However, the proposed speculative read algorithm does not employ any cache synchronization or invalidation protocol, so cache invalidation time overhead problem will get resolved.

6. CONCLUSION Cloud computing systems use distributed file system at the back end for storing large data in a scalable manner. Improving performance of the read operations carried out on the distributed file system is an important research issue. In this paper, we have proposed a novel speculative read algorithm for hierarchical local and global caching environment to improve the performance of the read operations carried out on the distributed file system. We have conducted simulation experiments by considering the presence of local, global, collaborative local and collaborative global caches. The results of the simulation experiments indicate that the proposed speculative read algorithm can reduce the average read access time of the distributed file system in comparison with the algorithm that does not carry out speculative executions. In future, we plan to implement this algorithm in Hadoop distributed file system environment to prove its efficiency.

REFERENCES [1] D. I. August et al., Integrated predicated and speculative execution in the IMPACT EPIC architecture, Proceedings. 25th Annual International Symposium on Computer Architecture (Cat. No.98CB36235), Barcelona, Spain, 1998, pp. 227-237, doi: 10.1109/ISCA.1998.694777. [2] J. Gonzalez and A. Gonzalez, Speculative execution via address prediction and data prefetching, Proceedings of the 11th International Conference on Supercomputing, 1997-July, pp. 196-203. [3] F. Gabbay and A. Mendelson, Speculative execution based on value prediction, Technical Report, EE Department TR 1080- Israel Institue of Technology, November 1996. [4] Marcuello P., González A. and Tubella J., Speculative Multithreaded Processors, 12th Int. Conf. on Supercomputing, Melbourne, Australia, July 1998, pp. 77-84. [5] Roth and Sohi G.S., Speculative Data-Driven Multithreading, In Proc. of the 7th. Int. Symp. On High Performance Computer Architecture, 2001, pp. 37-48. [6] E.B. Nightingale, P.M. Chen, and J.Flinn. Speculative execution in a distributed file system. ACM Trans. Comput. Syst., 24 (4): November 2006, pp.361-392.

http://iaeme.com/Home/journal/IJARET 610 [email protected] Improving Performance of the Distributed File System Using Speculative Read Algorithm and Support-Based Replacement Technique

[7] Fay Chang and Garth A. Gibson, Automatic I/O Hint Generation through Speculative Execution, In Operating Systems Design and Implementation, 1999, pp. 1-14. [8] Q. Chen, C. Liu and Z. Xiao, Improving MapReduce Performance Using Smart Speculative Execution Strategy, in IEEE Transactions on , vol. 63, no. 4, April 2014, pp. 954- 967, doi: 10.1109/TC.2013.15. [9] T. Phan, G. Pallez, S. Ibrahim, P. Raghavan, “ A New Framework for Evaluating Straggler Detection Mechanisms in MapReduce,” ACM Transactions on Modeling and Performance Evaluation of Computing Systems, 2019. [10] X Huang, C Li, Y Luo., Optimized Speculative Execution Strategy for Different Workload Levels in Heterogeneous Spark Cluster, Proceedings of the 4th International Conference on Big Data and Computing, May 2019, Pages 6-10. https://doi.org/10.1145/3335484.3335493. [11] Rathnamma Gopisetty T Ragunathan C.Shobha Bindu, Support-Based Prefetching Technique for Hierarchical Collaborative Caching Algorithm to Improve the Performance of a Distributed File System, Seventh International Symposium on Parallel Architectures, Algorithms and Programming, 2015 IEEE, pp. 97-103. DOI 10.1109/PAAP.2015.28, 2015. [12] Rathnamma Gopisetty T Ragunathan C.Shobha Bindu, “ Improving Performance of a Distributed File System using Hierarchical Collaborative Global Caching Algorithm with Rank Based Replacement Technique,” Article accepted for publication by International Journal of Communication Networks and Distributed Systems, IJCNDS 35604, 03 Mar 2020. [13] Mace, C., Limited, S.C., Latency on a switched ethernet network. 2014.https://w3.siemens.com/mcms/industrial-communication/en/ruggedcommunication/ Documents/AN8.pdf. [14] Konstantin V.Shvachko, “ HDFS : The Limits to Growth,” The USENIX Magzine April , Volume 35, Number 2,2010. [15] Yash Pal, Member, IAENG, “ An Analog Method to Study the Average Memory Access Time in a Computer System,” Proceedings of the World Congress on Engineering, London, U.K Vol II, July 3 - 5, WCE 2013. [16] Wenting Tang, Yun Fu, Ludmila Cherkasova, and Amin Vahdat, “ Medisyn:A synthetic streaming media service workload generator,” In NOSSDAV. ACM, 2003. [17] A. Narayanan, S. Verma, E. Ramadan, P. Babaie, and Z.-L. Zhang, “Deepcache: A deep learning based framework for content caching,” In Netw. Meets AI & ML. ACM, Budapest, Hungary, August 20-24, 2018, pp 4-53.

http://iaeme.com/Home/journal/IJARET 611 [email protected]