Home > Articles > Home & Office Computing > The Web/Virtual Worlds/Social Networking

This chapter is from the book

This chapter is from the book

3.4 Optimization Techniques

3.4.1 Request Migration

By migrating one or more requests from a group with zero idle slots to a group with many idle slots, the system can minimize the possible latency incurred by a future request. For example, in Figure 3.8, if the system migrates a request for X from G4 to G2 then a request for Z is guaranteed to incur a maximum latency of one time period. Migrating a request from one group to another increases the memory requirements of a display because the retrieval of data falls ahead of its display. Migrating a request from G4 to G2 increases the memory requirement of this display by three buffers. This is because when a request migrates from G4 to G2 (see Figure 3.8), G4 reads X0 and sends it to the display. During the same time period, G3 reads X1 into a buffer (say, B0) and G2 reads X2 into a buffer (BI). During the next time period, G2 reads X3 into a buffer (B2) and X1 is displayed from memory buffer B0. (G2 reads X3 because the groups move one cluster to the right at the end of each time period to read the next block of active displays occupying its servers.) During the next time period, G2 reads X4 into a memory buffer (B3) while X2 is displayed from memory buffer B1. This round-robin retrieval of data from clusters by G2 continues until all blocks of X have been retrieved and displayed.

03fig08.gifFigure 3.8 Load balancing.

With this technique, if the distance from the original group to the destination group is B then the system requires B + 1 buffers. However, because a request can migrate back to its original group once a request in the original group terminates and relinquishes its slot (i.e., a time slot becomes idle), the increase in total memory requirement could be reduced and become negligible.

3.4.2 Object Replication

Full Replication (FR)

To reduce the startup latency of the system, one may replicate objects. The simplest way is to replicate entire objects in the database so that all blocks have the same number of replicas. Let the original copy of an object X be its primary copy, XP. All other copies of X are termed its secondary copies. The system may construct r secondary copies for object X. Each of its copies is denoted as Xi where 1 ≤ i ≤ r. The number of instances of X is the number of copies of X, r + 1 (r secondary plus one primary). Assuming two instances of an object, by starting the assignment of X1 with a disk different than the one containing the first block of its primary copy (xop.gif), the maximum startup latency incurred by a display referencing X can be reduced by one half. This also reduces the expected startup latency. The assignment of the first block of each copy of X should be separated by a fixed number of disks in order to maximize the benefits of replication. Assuming that the primary copy of X is assigned starting with an arbitrary disk (say di contains xop.gif), the assignment of secondary copies of X is as follows. The assignment of the first block of copy Xj should start with disk 03inl04.gif mod d. For example, if there are two secondary copies of object Y (Y1, Y2) assuming its primary copy is assigned starting with disk d0. 03inl05.gif is assigned starting with disk d2 while 03inl06.gif is assigned starting with disk d4 when d = 6.

With two instances of an object, the expected startup latency for a request referencing this object can be computed as follows. To find an available slot, the system simultaneously checks two groups corresponding to the two different disks that contain the first blocks of these two instances. A failure happens only if both groups are full, reducing the number of failures for a request. The maximum number of failures before a success is reduced to 03inl07.gif due to two simultaneous searching of groups in parallel. Therefore, the probability of i failures in a system with each object having two instances is identical to that of a system consisting of 03inl07.gif disks with 2N servers per disk. A request would experience a lower number of failures with more instances of objects.

This also reduces the expected startup latency. The assignment of the first block of each copy of Oi should be separated by a fixed number of disks in order to maximize the benefits of replication. Let 03inl08.gif denote the disk that stores the first block of jth replica of object Oi. Then, assuming Ri copies of Oi, from Eq. 3.2,

Equation 3.16

03equ16.gif


The location of an object, Oi, with Ri replicas can be represented by the set Ti:

Equation 3.17

03equ19.gif


For example, in a six-disk system, if there are two secondary copies of object Oi (03inl09.gif and 03inl10.gif) assuming its primary copy, 03inl11.gif is assigned starting with disk d0. 03inl09.gif is assigned starting with disk d2 while 03inl10.gif is assigned starting with disk d4. Thus, Ti = {0, 2, 4}.

With two instances of an object, the expected startup latency for a request referencing this object can be computed as follows. To find an available server, the system simultaneously checks two groups corresponding to the two different disks that contain the first blocks of these two instances. A failure happens only if both groups are full, reducing the number of failures for a request. The maximum number of failures before a success is reduced to 03inl12.gif due to two simultaneous searching of groups in parallel. Therefore, the probability of i failures in a system with each object having two instances is identical to that of a system consisting of 03inl07.gif disks with 2N servers per disk. A request would experience a lower number of failures with more instances of objects. With j instances of an object in the system, the probability of a request referencing this object to observe i failures is:

Equation 3.18

03equ20.gif


where 03inl13.gif. Hence, the expected startup latency of requests that reference an object with j instances is:

Equation 3.19

03equ21.gif


Selective Replication (SR)

Object FR greatly increases the storage requirement of an application. One important observation in real applications is that objects may have different access frequencies. For example, in a video-on-demand system, more than half of the active requests might reference only a handful of recently released movies [2]. [34] models the empirical distribution of video rental frequency using a Zipf distribution. By replicating frequently referenced objects more times than less popular ones, i.e., selectively determine the number of replicas of an object based on its access frequency, we could significantly reduce the startup latency without a dramatic increase in storage space requirement of an application.

The optimal number of secondary copies per object is based on its access frequency and the available storage capacity. The formal statement of the problem is as follows. Assuming n objects in the system, let S be the total amount of disk space for these objects and their replicas. Let Rj be the optimal number of instances for object j, Sj to denote the size of object j and Fj to represent the access frequency (%) of object j. The problem is to determine Rj for each object j (1 ≤ j ≤ n) while satisfying 03inl14.gif .Sj ≤ S.

There exist several algorithms to solve this problem [93]. A simple one known as the Hamilton method computes the number of instances per object j based on its frequency by calculating the quota for an object (Fj × S). It rounds the remainder of the quota to compute Rj. However, this method suffers from two paradoxes, namely, the Alabama and Population paradoxes. Generally speaking, with these paradoxes, the Hamilton method may reduce the value of Rj when either S or Fj increases in value. The divisor methods provide a solution free of these paradoxes (see Figure 3.9). For further details and proofs of this method, see [93]. Using a divisor method named Webster (d(Rj) = Rj + 0.5), we classify objects based on their instances. Therefore, objects in a class have the same instances. The expected startup latency in this system with n objects is:

Equation 3.20

03equ22.gif


03fig09.gifFigure 3.9 Divisor method to compute the number of replicas per object.

where 03inl17.gif is the expected startup latency for object having Ri instances.

Partial Replication (PR)

FR and SR replicate all blocks in an object. Considering the size of large SM objects and a bounded amount of available space for replication, replicating only the first small portion of each object several times could greatly reduce the extra space requirement while providing a much shorter startup latency. For example, we can replicate only the first 10 blocks of an object X when the number of blocks of X is 100. The placement of blocks follows the same way in the previous replication techniques. The assignment of requests is similar as in FR and SR but the system allocates a new request into the group which is currently accessing the disk where the first block of the primary copy of the requested object resides (gxop.gif) whenever it is possible. In other words, when both gxop.gif and 03inl16.gif have at least one empty slot, a new request should be assigned to gxop.gif. However, if gxop.gif is full and 03inl16.gif has empty slots, a request goes to 03inl16.gif. Only when both have no empty slot, a request experiences a failure. This provides a same impact on the startup latency as in FR with two copies per object. The only difference is that a request assigned to 03inl16.gif should be relocated to gxop.gif before it reaches the last block of the partially replicated copy (tenth block in the previous example). The newly relocated request will retrieve the primary copy until the end of its display. For example, in Figure 3.10, a request for X arrives and is assigned to 03inl16.gif because gxop.gif is full. For the next seven time periods, the request is serviced in 03inl16.gif until gxop.gif releases a slot when a display ends. Then, the request is relocated from 03inl16.gif to gxop.gif and is serviced until the end of display. With PR, if we replicate the first 10% of an object 10 times, it takes two times of the original storage requirement (the size of the primary copy). As we discussed in the previous section, this can greatly reduce the startup latency as if the system has ten full copies of the object requiring ten times of the original storage requirement. However, there is a chance that a request assigned to the partially replicated copy could not be relocated to primary copy until the display reaches the end of partially replicated copy. Then, hiccups happen.

03fig10.gifFigure 3.10 Partial replication technique.

If a disk drive can support N simultaneous displays and s is average display time (service time) of objects, the service rate of a disk drive (a group) is N/s. Hence, ideally, if we replicate the first s/N portion of an object, no hiccup happens. However, due to the statistical variation of time when requests arrive at and leave the system, there exists a probability that a request experiences hiccup in this technique. To reduce this probability, we should replicate more portion than s/N, resulting in a higher space requirement.

Request migration with temporary buffering can eliminate this hiccup problem. In Figure 3.11, assume that a request in G4 is accessing a partially replicated copy of X while G1 is accessing the primary copy of X. A hiccup happens when G1 does not have any idle slots until G4 reaches to the last block of a secondary copy. Request migration utilizes buffers to avoid a potential hiccup situation. For example, while G4 accesses the last block of the secondary copy X9, G0 reads the block X10 from the disk drive d0 and stores it into a temporary buffer in the same time period. From the next time period on, G0 retrieves the remaining blocks sequentially until the group G1 releases a time slot. Then the scheduler migrates the request to the group G1 and the temporary buffers are freed. Hence, hiccups don't happen even though G1 is full, as long as there exists at least one available slot in the entire groups. Note that there is a tradeoff between the amount of required buffers and the number of hiccups. Extra buffers increase system cost per display.

03fig11.gifFigure 3.11 Request migration in the partial replication technique.

Partial Selective Replication (PSR)

This is a hybrid approach of PR and SR discussed in the previous subsections. By taking advantage of utilizing skewed access frequencies of an application and reduced storage requirement of PR, this approach determines the number of partially replicated secondary copies of an object based on its access frequency. Modifying the divisor method for partial replication is trivial and straightforward.

Comparison

We compare four replication techniques using simulation studies. Assuming two different access frequency models: 1) uniform and 2) skewed (Zipf), the average startup latency of each technique is quantified as a function of available extra disk storage space. In these experiments, we assumed that the entire database was disk resident. A server was configured with twelve Seagate Cheetah ST39103LW/LC disks. Each disk has 9 GBytes of disk space and 80 Mb/s of data transfer rate. We assumed that each video clip was encoded using MPEG2 with a 4 Mb/s of display rate. The database consisted of 30 1-hour video clips with a total of 54 GByte disk space. A video clip consisted of 3600 blocks with one second of time period. For FR and SR, the entire 3600 blocks were replicated while first 720 blocks (20%) were replicated for PR and PSR.

We assumed a uniform distribution of access frequency for 30 video clips, and also analyzed a skewed distribution (Zipf) of access as a simplified model of real access frequencies (Figure 3.12). The bandwidth of each disk can support sixteen simultaneous displays (N = 16). Hence, the maximum throughput of this configuration (12 disks) is 192 simultaneous displays. We assumed that request arrivals to the system followed a Poisson pattern with an arrival rate of λ = 0.05req/sec for a 95% system utilization. Upon the arrival of a request, if the scheduler fails to find an idle slot in the system then this request is rejected.

03fig12a.gifFigure 3.12 Two access frequency distributions.

Figure 3.13 shows the quantified average startup latency from our simulations using both uniform and Zipf access distributions. The X axis represents the storage space of a system as a multiple of database size. For example, 1.1 on X axis means an extra space of 10% of DB size. The y axis shows resulting average startup latency. Note that, when x = 1, it shows an average startup latency without any replication. Due to statistical variance in request arrivals, the system could reach to its maximum capacity, 192 simultaneous displays, then newly arrived requests were rejected during such a peak time. The rejection rate was 2.5% on the average for all experiments.

03fig13a.gifFigure 3.13 Average startup latency (ρ = 0.95).

As we increase extra disk space for replication, the average startup latency decreases as a function of it. PR and PSR provides the shortest startup latency with both uniform and Zipf distribution. In the best case, when x = 2, 79% and 77% of reduction in the average startup latency were observed with uniform and Zipf distribution, respectively. FR and PR show steps downward because they cannot create more number of replicas when the increase of extra space is not enough to replicate all objects in database. However, SR and PSR continuously decrease as extra space grows.

One observation is that the average startup latency can be significantly reduced even with a small amount of extra space. In Figure 3.13.b, with only 20% increase of storage requirement, SR, PR, and PSR provide 45%, 59%, and 56% of reduction, respectively, comparing to one without replication (2.39 seconds). This implies that the system does not require a huge amount of extra space to achieve a smaller startup latency to meet the latency criteria of many applications. While PR and PSR provide the shortest startup latency, they require more memory space because of increased number of buffers for request migration. Thus, for a cost-effective solution, SR works fine without any increase in system cost, especially for applications with highly skewed access frequency.

InformIT Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from InformIT and its family of brands. I can unsubscribe at any time.

Overview


Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information


To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.

Surveys

Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites, develop new products and services, conduct educational research and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.

Newsletters

If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email information@informit.com.

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information


Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.

Security


Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.

Children


This site is not directed to children under the age of 13.

Marketing


Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information


If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service@informit.com and we will process the deletion of a user's account.

Choice/Opt-out


Users can always make an informed choice as to whether they should proceed with certain services offered by InformIT. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive: www.informit.com/u.aspx.

Sale of Personal Information


Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest@pearson.com.

Supplemental Privacy Statement for California Residents


California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure


Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.

Links


This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact


Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice


We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020