Delay Pools-Based Uninterrupted and Dynamic Bandwidth Distribution of Squid Proxy Cache Senaka Amarakeerthi
Kithsiri Liyanage
Michael Cohen
Faculty of Applied Sciences University of Sabaragamuwa Belihuloya, Sri Lanka
Information Technology Center University of Peradeniya Peradeniya, Sri Lanka
Spatial Media Group University of Aizu Aizu-Wakamatsu, Japan
[email protected]
[email protected]
[email protected]
ABSTRACT A Squid proxy sever is a popular web content caching service trusted by many network administrators. In this paper, we describe a method of managing the bandwidth of Squid proxy cache through the World Wide Web, thus allowing Squid administrators and authorized users to allocate a percentage of bandwidth to a particular computer or group of computers without disturbing connected clients. This approach is useful for Squid administrators with low bandwidth internet connections in dynamically prioritizing existing bandwidth for bandwidth-hungry applications such as videoconferencing and bulk file downloading and uploading. In controlling bandwidth utilization of users, delay pools is a widely used technique. In a Squid proxy cache, the delay pools setting should be made by editing a configuration manually and restarting the service. The proposed framework allows to grab delay pool parameters through a web interface. Php and C++ programs were used in implementing the system. With the proposed approach, existing bandwidth can be allocated within hosts or subnets dynamically without disturbing existing connections. By analyzing realtime bandwidth distribution graphs, we could conclude that the proposed framework can distribute the bandwidth as required without affecting connected clients.
Categories and Subject Descriptors C. 2.3 [Computer-Communication Networks]: Network management
General Terms Design, Experimentation, Performance
Nowadays the internet is an essential resource for daily activities, a vital component of information and communication technology. Especially services such as the World Wide Web (www), electronic mail, and realtime communication services play a major role in the process of making the world a global village. Internet bandwidth is a limited and sometimes expensive or precious resource. Hence, computer scientists are engaged in research finding new methods for content caching, managing bandwidth, and utilizing it more efficiently and effectively [1]. The proposed solution was implemented in Squid cache [4]. Squid is a high-performance proxy caching server, which supports ftp, gopher, and http data objects. Squid maintains metadata and frequently used objects cached in ram. Other than the main functionality, it caches dns lookups and maintains negative caching of failed requests. At an organizational level, bandwidth control is an important task when bandwidth-greedy users are present. Bulk file and video download consumes a large portion of available bandwidth. Network administrations use various bandwidth throttling techniques, including the delay pools technique available in the Squid proxy server. Most of those techniques limit bandwidth statically. There are some situations in which a large fraction of bandwidth is needed for some specified clients. In Squid cache, this can be easily done by changing parameters of delay pools and restarting the Squid service. A major disadvantage of restarting a cache is that it disconnects existing connections. We propose a new approach to dynamically change delay pools via a web interface to force smooth bandwidth change without disturbing existing connections.
Keywords delay pools, dynamic bandwidth distribution, proxy cache, squid proxy
1.
INTRODUCTION
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. To copy otherwise, to republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. HCCE ’12, March 8–13, 2012, Aizu-Wakamatsu, Fukushima, Japan. Copyright 2012 ACM 978-1-4503-1191-5 ...$10.00.
2.
WEB CONTENT CACHING
Web caching is a process for storing web objects near users’ locations, allowing fast access. This improves user experience when surfing the web. Examples of some web objects are web pages, css files, images, and JavaScripts. The proxy cache is located near web users, typically within an enterprise. Normally, client web browsers are configured to use the proxy cache. Requests for objects from a website are accepted and handled by the proxy cache. When an object is not available in cache, the proxy fetches it from another cache or from the the original web server. Some advantages of web caching: 1. Faster delivery of frequently used web objects 2. Reduced the bandwidth requirements
Figure 1: Front end web interface of Bandwidth Prioritizer 3. Reduced load on hosting servers
3.2
3.
Delay pools provide a means to restrict bandwidth usage of clients. With delay pools, clients can be restricted individually or in groups. A delay pool uses the Token Bucket Algorithm [3] in bandwidth management. Functionality of delay pools is discussed in the next section.
BANDWIDTH MANAGEMENT
There are various approaches to manage internet bandwidth of an organization through software and hardware. The majority of them allow network administrators to allocate specific bandwidth to internet traffic that can be further classified into web, mail, ftp, etc. Using bandwidth management, the traffic of each service is at an assured level at all times and one can even change these assured levels at fixed time slots during the day. Further, the Squid proxy allows administrators to restrict the bandwidth at the ip address level, mac address level, or user level.
Delay Pools
Token arrives
Software-based bandwidth management techniques available for Squid cache are:
Token bucket
1. Access Control List 2. Delay pools
3.1
Packet buffer
Access Control List
Squid uses Access Control Lists (acls) to manage bandwidth based on user or group. It is capable of building acls based on source & destination ips, protocols, source and destination ports, and user identification. Squid administrators normally use a combination of all those techniques. The following code fragment shows a sample implementation of an access control list.
Packets drains tokens Packets flow
Figure 2: Illustration of Token Bucket Algorithm
4. acl all src 0.0.0.0/0.0.0.0 acl mynet src 192.168.1.0/255.255.255.0 http_access allow mynet http_access deny all
METHODOLOGY
The technique used in this approach is Delay Pools [3], which uses the Token Bucket Algorithm. A Delay Pool can be considered to be a bucket with two independent taps incoming and outgoing. There is a gradual increment of bucket level in the incoming rate of the tap. In addition, there is a data outflow tap. This is the real data reception for an actual
Figure 4: Bandwidth throttling against time
Figure 3: Bandwidth prioritizing against time
user. It is not at a constant rate. The user can get any amount of data when he/she has enough tokens in his/her bucket. The Token Bucket Algorithm is depicted in Fig. 2.
Several experiments were performed to check the effectiveness of bandwidth prioritizing and throttling. We could observe correct bandwidth changes in Traffic Grapher for all parameter changing events. Figs. 3 and 4 show the bandwidth prioritizing and throttling respectively.
The maximum possible transmission rate, Tmax , can be expressed as b/(M − r) if r < M Tmax = (1) ∞ otherwise where M is the maximum possible transmission rate in bytes per second, b is the maximum bucket size in tokens, and r is the token rate. The overall bandwidth management was carried out by changing the delay pools parameters of the Squid proxy cache. In this process, the input parameters are fed through a web interface, as seen in Fig. 1. In this interface, the ip address, subnet mask, and percentage of bandwidth to allocate can be configured. Once parameters are applied via the web interface, those values are temporarily stored in a text file. At the next step, delay pool structures are created and transferred to “squid.conf”, which is the configuration file of the Squid cache, using a Sed [2] script. The Sed script is responsible for changing the configuration file parameters by preserving the original structure of the configuration file. To reload new configuration parameters without affecting existing clients, a “squid -k reconfigure” command is issued automatically.
5.
RESULTS AND DISCUSSION
To check the proposed framework, prtg Traffic Grapher was used. This software can be used to measure the bandwidth passing through the network adapter of a particular computer. To ensure maximum bandwidth consumption, a web traffic generator was kept active throughout the period of experiments. The characteristics of the bandwidth were analyzed using graphs plotted by prtg Traffic Grapher. The reading interval was set to 1 second.
6.
CONCLUSIONS
The main objective of the project was dynamic allocation of bandwidth as a proportion for a particular client or group in special bandwidth requirements. The developed solution is very useful for Squid administrators in prioritizing bandwidth. This objective was successfully achieved via implemented framework. The study shows that the designed software framework “Bandwidth Prioritizer” is capable of distributing bandwidth at discretion of system administrator without disconnecting or disturbing existing connections. In this approach changes to the delay pools were performed through “squid.conf”. The possibility of applying parameters bypassing the configuration file should be considered. Such an approach could speed up the delay pool changing process. In this research, the ability to make new connections while new settings are being applied was not considered and can be studied in the future.
7.
REFERENCES
[1] G. Dian and C. Gunaratne. Using Dynamic Delay Pools for Bandwidth Management. In 7th Int. Wkshp. on Web Content Caching and Distribution, pages 171–176, Colorado, USA, August 2002. [2] L. E. McMahon. Sed, a stream editor. http://www.gnu.org/software/sed/manual/sed.html. Accessed: 30/11/2004. [3] A. S. Tanenbaum. Computer Networks. Prentice Hall, 1993. [4] The Squid Software Foundation. Squid: Optimising web delivery. http://www.squid-cache.org. Accessed: 30/09/2004.