In computing, 'resource contention' refers to a conflict over a shared resource between several components. Resource contention often negatively affects the performance of components competing for the resource. It is a common concern in cloud computing.
Resource contention happens when demand exceeds supply for a certain resource. When multiple processes require the same resource, one process reaches the resource first, and the other contenders are delayed until the first finishes using the resource. The applications waiting for the resource will likely experience a performance reduction because they need the resource to function. The resources commonly contended for include processor, network, memory and storage.
How does resource contention affect projects?
Resource contention often leads to performance degradation in the applications contending for the shared resource. This can cause unexpected project delays, because processes contending for resources will be stalled until they can access the resource.
Conversely, improperly prioritized processes may complete earlier than expected, and take an unnecessary amount of resources. This also may delay projects because the order of processes is incorrect.
These contention problems are difficult to identify and resolve, because problem processes must be singled out and reprioritized to allocate resources to the most important processes first. Aside from the resource contention problem itself, identifying and fixing the problem can also be time-consuming and lead to further project delays.
Common resource contention problems
The main problem to be dealt with in resource contention is managing transactions between resources and the processes that require them. The transactions need to be prioritized so that processes conflict over resources as little as possible.
More simultaneous transactions create more moving pieces to manage and prioritize. Therefore, public cloud configurations are often prone to resource contention problems, because they are especially dynamic in nature and feature a wider pool of "resource requestors." The more dynamic the environment, the more process a shared resource must serve, and the more management of resource allocation is required. Some other dynamic IT infrastructures that are prone to resource contention are:
- Bring your own device (BYOD). The increased use of personal devices in the enterprise creates a more dynamic environment and more entities requesting resources.
- IT as a service (ITaaS). ITaaS configurations feature technologies hosted by a third party. This type of configuration lends itself to multi-tenant environments which increase the likelihood of resource contention.
- Automation. Configurations that use automation to prioritize transactions can inadvertently increase the likelihood of resource contention because they may incorrectly prioritize an unimportant transaction. Automation also decreases visibility and control of IT environments for administrators.
- Virtualization. Virtualization creates virtual versions of an existing resource such as operating systems (OS), storage devices or servers. It essentially adds another layer of processes that require resources, because a portion of physical resources are reserved by the virtual environment to provide at the virtual layer. So, resource contention can occur in the virtualization layer when two or more processes contend for a virtual resource, or at the physical layer when the virtual resource accesses the supporting physical resource.
The main problem of resource contention is application performance degradation, which can manifest in several ways:
- Cloud contention. Public cloud users may end up contending with other tenants if it is a multi-tenant environment. The cloud provider and the user would both take a level of responsibility in mitigating the problem. The user may work with the provider, if possible, to reorganize their processes to use resources more efficiently. The provider may also need to reorganize how cloud resources are distributed to all tenants to improve efficiency.
- Deadlock. The official name for a situation where processes wait for a resource to become available.
- Livelock. Similar to deadlock, but the waiting processes continuously move, trying various avenues to reach the resource without making any progress. This is common when an algorithm is used to mitigate deadlocks. The algorithm triggers more processes than necessary to give them resource access and ends up congesting the pathway to the resource.
- Thrashing. This occurs when a computer's virtual memory is overused and causes a degradation or complete collapse of application level performance. This can continue indefinitely until space is created for application processes in virtual memory bandwidth.
How to reduce resource contention
Resource contention problems and their solutions often vary according to the idiosyncrasies of an IT configuration. Regardless of the specifics of a resource contention issue, IT professionals can apply this general process to resolve it:
- Determine which performance issues stem from resource contention.
- Identify the transactions competing for resources.
- Prioritize transactions to streamline processes and minimize conflict.
IT pros can apply these steps using one of several tools available for managing resource allocation in dynamic environments. Some of these tools are:
- command-line tools, which come with a computer's OS;
- Prometheus, which is an open source software for monitoring containers in Windows environments;
- Grafana, which is also an open source container-monitoring software for Windows environments; and
- Splunk, which is a tool mainly geared toward log monitoring, but can also be used in virtual environments.
As mentioned in the previous subhead, virtual machines increase the likelihood of resource contention. Consequently, many recent solutions to resource contention specialize in container monitoring. Like virtual machines (VMs), containers simulate hardware functionality to create a virtual system. Unlike VMs, containers do not need a guest OS to run. Instead, they all share an OS, and are therefore more efficient because they require less overhead.
IT administrators experiencing resource contention in a virtual framework should utilize containers and monitoring tools to help mitigate the problem.
To get the most out of monitoring tools, IT admins should:
- Analyze multi-tier and cross-tier dependencies. It helps to have the most comprehensive view of the IT infrastructure as possible, to see what uses resources, how much is used, and when.
- Establish a baseline and reference timeframe. Administrators should have historical data showing how their systems function normally, so that when problems arise, they can compare new data from the malfunctioning configuration with the old, "normal" data to see what went wrong, and when it went wrong.
- Understand business context. The business relevance of each process should be considered when reprioritizing processes. The most critical process -- processes that would most damage the business if delayed -- should generally be given the most immediate access to resources. Some monitoring tools give users the option to organize processes by business relevance, but many have a mainly technical focus and leave the user to track this metric manually.
- Promote data visibility. Employees in all sectors of the IT infrastructure -- storage, network and development, for example -- should all have access to the same performance data. This improves communication within IT departments and speeds up the mitigation of resource contention.
Overall, no matter the tool or specific nature of a resource contention problem, an IT department should solve it in a strategic and proactive manner. Even personal computer users can use the general steps listed to maintain healthy performance levels for their computer. Resource contention, as with any IT problem, is much easier to fix with a plan in place, as opposed to reacting after an incident has occurred.