• 沒有找到結果。

In this section, simple soft lists are evaluated against linearly ordered lists. A linearly ordered list is a singly-linked list ordered by keys, and it is based on logical pointers, as mentioned in the last section. In the rest of this paper, let SSL refer to a simple soft list, and LOL be a linearly ordered list.

4.2.1 Read-Only Queries

In the first part of experiments, we are concerned with the usefulness of random forward skips. It is evaluated by performing read-only queries. For each run of experiments, all the keys are queried with three different patterns. In the first

0

SLS, 10^9-words reads LOL, 10^9-words reads

(a) Sequential (b) Random (C) Normal distribution

Figure 8: The total number of word reads of SSL and LOL with respect to different total numbers of keys. All the keys are queried with (a) a sequential pattern, (b) a random pattern, and (c) a normal distribution of query frequencies over keys.

(a) Sequential (b) Random distribution (c) Normal distribution

1

Figure 9: The total numbers of reads, writes, and block erasure of SSL and LOL with respect to different total numbers of keys and different access patterns.

Note that the Y-axes are of logarithmic scales.

pattern, all the keys are sequentially queried. The second pattern randomly queries all the keys. The third access pattern is a normal distribution of query frequencies over keys. The mean of the distribution is the median of all the keys, and the variance is one-sixth the total number of the keys. The total number of keys varies from 2,000 to 16,000.

Figure 8 shows the total number of word reads with difference access pat-terns. Read overheads comes from traversing SSL or LOL for locating a key and scanning spare pointers to find the valid pointer. LOL’s total number of reads increases linearly with the total number of keys, as it performs linear search.

Because of random forward skips, the total numbers of reads of SSL are sig-nificantly smaller than that of LOL in all the cases. Interestingly, SSL’s total number of reads gradually decrease as the total number of keys is large. The rationale is that, when the total number of keys is small, the possibility is high that a soft pointer’s buddy object is an invalid object. If an invalid object is probed, probing is carried on until an valid object is found. Very likely that the target object is found as the first valid object, and in this case random forward skips are not taken. If the total number of (valid) objects is large, then ran-dom forward skips are taken with high frequencies. It can be verified by results in Table 2, which show the average skip distance of SSL and LOL. The skip distances of SSL are much longer than that of LOL.

Another observation on Figure 8 is that SSL’s performance is not much

affected by different access patterns. It is a characteristic of using soft pointers.

Since the key of buddy objects are random objects, the total numbers of objects visited for finding different keys are close. On the other hand, LOL is very slow on sequential access because it uses linear search.

total # of keys 3,000 6,000 9,000 12,000

LOL 1.0 1.0 1.0 1.0

SSL 6.0 16.3 29.5 42.9

Table 2: The average skip distances of LOL and SSL with respect to different total numbers of keys. The access pattern is a normal distribution.

4.2.2 Insertions and Deletions

This part of experiments examine SSL’s performance with updates. Each run of experiments still uses the same setup procedure. After setup, all the keys are updated with the three access patterns. For updating a key, the key is first deleted and then re-inserted. It intends to introduce the needs for pointer updates.

Figure 9 shows the total numbers of reads, writes, and block erasure of SSL and LOL with respect to different total numbers of keys and different access patterns. Note that the Y-axes are of logarithmic scales. For reads, SSL still win its edge over LOL. Although it can not easily be seen in the figures, the advantage is not that significant as in read-only queries. That is because SSL spends extra reads to locate the immediate predecessor of a deleted/inserted object, as mentioned in Section 3.1.3. Nevertheless, SSL still reads a much smaller amount of words than LOL.

For writes, SSL writes slightly more words than LOL. Note that the over-heads of writes do not include those for garbage collection. In average SSL requires 20% more word writes than LOL. That is because logical pointers of LOL are not affected by out-place updates. We must emphasize that, since logical addresses are used, LOL serves as a trivial low bound for the total num-ber of writes. As to SSL, because objects are referred to by physical addresses, when objects are updated out of place, related soft pointers are revised by log-ging changes in spare slots. Necessary object rewrites to refresh spare slots are performed accordingly.

For garbage-collection overheads, it can be seen that SSL and LOL erase nearly the same number of blocks. It can also be noted that how many blocks erased by SSL is not much affected by using different access patterns. That is because free space is allocated from randomly selected blocks. As a result, invalid objects are evenly distributed over blocks, regardless the patterns of object updates. Also, both SSL and LOL erase a large number of blocks when the total number of keys is large. That is because erasing a block would involve a large number of valid objects, and the objects must be copied to before block erasure. The net amount of free space reclaimed every block erasure is relatively low, and many block erasure are needed to reclaim a specified amount of free space.

(a) (b)

Figure 10: The total numbers of reads, writes, and block erasure of SSL with (a) different turnstile sizes and (b) different numbers of spare pointers in an object. The access pattern is update with a normal distribution.

4.2.3 Turnstile Sizes and Spare-Pointer Numbers

This part of experiments aim at evaluating different organizations of simple soft lists. The setup procedure for experiments is the same as in prior sections. The access pattern is to update keys with a normal distribution.

First we vary the turnstile size (i.e., the total number of blocks in each turn-stile). As the results in Figure 10(a) show, the total number of reads increases with the turnstile size. That is because the finding of the predecessor of an object requires probing all the buddy objects. The larger the turnstiles are, the more number of probes are needed. Another source of the extra reads is invalid objects. Because each turnstile has one spare block, with large turnstiles the total number of non-spare blocks would be large. As a result, the total number of invalid objects is large too. In this case, when de-referencing a soft pointer, it is very possible that an invalid object is found as a buddy object. Since invalid object is of no use, extra reads are needed to probe until a valid objects is found.

As to writes (except those for garbage collection), they are irrelevant to turnstile sizes, so it can be seen that the total numbers of writes are all the same in experiments. For garbage collection, it is shown that, when turnstiles are small, the costs of block erasure become very high. As mentioned previously, the smaller the turnstiles are, the smaller the total numbers of non-spare blocks are. In this case, block erasure involves a large number of valid objects, and therefore the reclaiming of free space becomes very slow. It can be seen that the setting of the turnstile size is a trade off between read costs and garbage-collection overheads. As NOR flash erases much slower than it reads (see Table 1), one possible approach is to trade space for performance. That is, use larger NOR flash with small turnstiles.

Figure 10(b) shows the results of varying the total number of spare slots of an object. Note that the object size is not affected by the total number of spare slots in an object. Let us first consider the write costs. If there are many spare pointers in each object, then to rewrite an object to refresh all its spare pointers is not frequently needed. By this way then write overheads can be significantly reduced. However, as the results show, the total numbers of writes are not much affected by the numbers of spare pointers. It is an evidence on that an object is re-written before it runs out of spare pointers. In other words, the number of spare pointers in an object needs not be large.

(a) (b)

Figure 11: (a) The total number of words that MSL and SKL read with respect to different total numbers of levels. The access pattern is to query with a normal distribution. (b) The average skip distances at different levels of MSL and SKL.

The total number of levels is five. The Y-axes are of logarithmic scales.

(a) (b)

Figure 12: (a) The overheads of reads, writes, and erasure of MSL and SKL with respect to different total numbers of levels. The access pattern is to update with a normal distribution. (b) The average skip distances at different levels of MSL and SKL. The total number of levels is five. The Y-axes are of logarithmic scales.

4.3 Multilevel Soft Lists

In this section, multilevel soft lists are evaluated and compared against skip lists [10]. We are particularly interested in whether multilevel soft lists provide good scalability as skip lists do. In our experiments, skip lists are implemented based on pointers of logical addresses, as is LOL. In the rest of this paper, let multilevel soft lists be denoted as MSL, and SKL refer to skip lists.

We shall first confine our attention to read-only queries. The same setup procedure for SSL/LOL is used. The total number of keys inserted is 12,000, and the access pattern is a normal distribution of query frequencies over keys.

The probability parameter p is 0.25, as suggested in [10]. The total number of levels that MSL and SKL have vary from 1 to 6. Figure 11(a) shows the read overheads of MSL and SKL with respect to different total numbers of levels.

MSL uses much fewer word reads than SKL when the total number of level is small. As the total number of levels increases, as expected, the read overheads of SKL dramatically decrease. The read overheads of MSL also drop exponentially as the total number of levels increases. But MSL’s read overheads do not drop as fast as that of SKL, because MSL’s read overheads are already very low when there is only one level. For MSL, let the average skip distance be defined as the average number of objects in MSL skipped over when de-referencing a soft pointer. The average skip distance of SKL is defined accordingly. Figure

50

Figure 13: The distributions of erasure-cycle counts with random allocation (for MSL) and greedy allocation (for MSL). The access pattern is to update with a normal distribution.

11(b) shows the average skip distances with respect to different levels. The total number of levels is five. We can see that, even with the presence of short skips (as mentioned in 3.2.2), MSL still skips further than SKL at every level.

The next part of experiments are on update operations. Experimental setup is the same as that of SSL/LOL. Figure 12(a) shows the overheads of MSL and SKL with respect to different total numbers of levels. As Figure 12(a) shows, MSL still read much fewer words than SKL in all cases. Even with the extra cost of finding immediate predecessors for updates, the results in Figure 12(a) are close to that in Figure 11(a). It means that the overheads of finding predecessors are insignificant. Like the experiments for read-only queries, both MSL and SKL greatly reduce the read overheads as the total number of levels is large. MSL still outperforms SKL in terms of the average skip distances at every level, as shown in Figure 12(b). And, as expected, MSL writes slightly more words than SKL, but their erasure overheads are close.

Note that our results on MSL/SKL should not be interpreted as showing the benefits of using high-level SKL. After all, they are fundamentally different approaches. Not to mention that SKL requires RAM-resident translation tables and initialization scan.

相關文件