# Replicas Strategy and Cache Optimization of Video Surveillance Systems Based on Cloud Storage
## 6 Experiments and Analysis
### Dynamic Redundant Replicas Mechanism Based on Security Levels  
In this experiment, we evaluate dynamic redundant replicas mechanism based on security levels (SL-DRM). The SL-DRM strategy is compared with static replicas mechanism (SRM) and two dynamic replicas strategies (CDRM and ADRS).  
We use three cameras, camera-1's \(I_{x}\) is 0, which video file will not be accessed; camera-2's \(I_{x}\) is 1 and camera-3's \(I_{x}\) is 2. Unlike camera-1, we accessed the video file of camera-2 on day 2, 3 and camera-3 on day 2, 3, 8, 9. The cameras are used to test the number of redundant replicas of video files. Then, we select a video file for the same period from different cameras; the size of the video file is 2 G. To ensure the safety of the video file, we defined each file initially hold two redundant replicas in SRM and one replica in CDRM and ADRS respectively. The experiment is repeated five times, which result is showed in Figure 4.  
Figure 3: Cache pool status.  
For SL-DRM strategy, in the beginning, surveillance system detected that something was passing through the monitoring area. Hence, in SL-DRM strategy, the \(A_{x}\) was 1, security level increased. After that, due video file of camera-1 had not been accessed, \(S_{x}\) also reduced, the camera-1 had not kept redundant replicas. We accessed the video file of camera-2 and camera-3 on day 2, 3. Therefore, the security level went higher, the number of redundant replicas also increased. After that, we had not accessed video file of camera-2, the security level was finally reduced to 0 too. Due to camera-3 being accessed on day 8, 9, the number of redundant replicas is changed from two to three for SL-DRM strategy. As the retention time grew, camera-3 had one redundant replica on the day 15. When the security level rises, the number of replicas will increase again. Otherwise, the redundant replicas will be deleted.  
CDRM maintains minimal replica number for a given availability requirement. Availability requirement is defined by users [19]. CDRM strategy can increase the number of replicas but cannot address replica replace issue. ADRS strategy can change the number of replicas, but is not as flexible as SL-DRM. As a result, SL-DRM can adapt to the change of scenario. It guarantees important data security as well as reduces unnecessary replication.  
In the next experiment, we investigate the replication rate, which is determined as the ratio of replicas to the total files (original files and replicas). The lower value indicates that strategies are better at saving storage. 50 video files (total file size is around 15 GB) are all from the same camera, and the size of the file is the same. In 15 days, we randomly select seven days to visit all the files. On the 15 th day, we count the number of replicas. We repeat this experiment 5 times.  
The results of the replication rate are shown in Figure 5. The replication rate of CDRM and ADRS is more than 0.5. That is, under the CDRM strategy [19] and ADRS strategy [20], each file at least have one replica. The SL-DRM strategy considered all the factors affecting the number of replicas of the video file, so the replication rate is less than 0.2. The SL-DRM strategy shows better storage usage performance, compared with other two strategies (CDRM, ADRS).  
Figure 4: The first set of experiment data records.  
Figure 5: Replication rate of the dynamic replication algorithms.