| TIP : Anti-Blocker Strategies | |
|
back |
Autor : Sancho Fock No reasonable strategy for the resolution of concrete blocking problems can be found until one has determined the precise nature of the scale block. The most obvious criterion for distinguishing between different scale blocks is their average duration. The following categories emerge as a result of this division:
These four different types of scale blocks are discussed below in terms of their possible causes and in reference to appropriate strategies for resolving them. top of page Short time scale blocks These kinds of situations are inevitable in multiuser databases; normally they represent no problem for the operation of an application. Nevertheless, these types of scale block should be investigated in cases where they have begun to occur to only a few users or where they occur very frequently. If these scale blocks appear very frequently, it can lead to snowball effects and eventually paralyze the entire system. Even in cases where it is likely that the problem cannot be completely solved, one should nevertheless at least attempt to defuse it. Causes: Short-time scale blocks which occur very frequently can be traced back to the following basic problem: the total performance capacity of the system is not enough for the current user load. Resolution strategies: Such problems can best be met by carrying out an extensive performance tuning of the server and of the application. If this situation does not occur until there is a very high user load, then one should begin the investigation by examining the server and the network. However, if this situation already begins to occur with low user load levels, then one should investigate whether certain use cases of the client application are able to block either one another or even themselves in conceptual terms. If this should be found to be the case in a concrete situation, then an investigation needs to be carried out to determine whether the probability of the occurrence of this unwanted situation can be reduced through atomic transactions or the use of "row level locking" or similar strategies. top of page Mid time scale blocks This type of scale block is the most difficult to find. It lasts long enough to bring the operation of an application to a stop, but at the same time is still generally too short for manual analysis. Support is available with the THS software SQL Guard 2000. A demo version of SQL Guard 2000 can be downloaded free-of-charge here. Causes: The possible causes for this type of block are the following:
Resolution strategies: Once one has established which transactions are blocking other processes - e.g. with the help of SQL Guard - determination must be made as to which type of error is present. The following questions emerge in cases of complex transactions:
These questions offer approaches for solving the problem. Should it happen that all of the questions are to be answered in the negative, then one is faced with the choice of either accepting the situation as it is or of thinking through the business processes to find a way to replace the problematic transactions with others as necessary. Additional resolution strategies:
top of page Long time scale blocks These blocks are very similar to mid-time scale blocks. As a general principle, they can also have the same causes as the mid-time scale blocks. In addition, they can have the following causes:
The following applies to both causes: their durations could fall within the mid-time scale block range if, for example, transaction timeouts have been defined or if the end user shuts down his client. Resolution strategy: The resolution strategy for both of the additional causes is clear: eliminate the error(s). top of page The special case of deadlocks In view of the fact that a great deal of information concerning deadlocks is readily available in the relevant literature, they will be treated only briefly here: deadlocks are a special case in terms of scale blocks, because there is no unambiguously "guilty party" in such situations. One can never completely exclude deadlocks from larger systems. The strategies used to reduce their quantity are the same as those which can be used to avoid scale blocks in general. In addition, one can take care to ensure that there are no transactions present which require the same resources in the reverse order. Man kann Deadlocks in größeren Systemen niemals vollkommen ausschließen. Die Strategien, um Ihre Quantität zu verringern, sind die gleichen, die man anwenden kann, um Blocksituationen allgemein zu vermeiden. Zudem kann man darauf achten, dass es keine Transaktionen gibt, die die gleichen Ressourcen in umgekehrter Reihenfolge benötigen. Seitenanfang General strategies and guidelines for making scale blocks as infrequent as possible
top of page back |