Optimizing/troubleshooting squid performance

Posted on 2004-11-22
Last Modified: 2013-12-23
My problem started because of slower internet connections at our office. I am guessing this is caused
by the slower performance of my squid proxy. But honestly, I am not sure if it is indeed the source of my headache.

Now I am not a Unix guru: u c I am just a part-time sys ad here (since no one else can take the job) my main task being a programmer. When something works already I just stop there and tweak no more. Now I have gotten my squid running on a FreeBSD machine to work already, peering with two parent proxies from two different ISPs. The setup already works fine, workstations can access the net. At a particular point in time, in-fact, download times are satisfactory. Well, until machines connected to the LAN increased little by little, that is. Now things are slow!!!!

I don't know where to start "debugging" whether the trouble is in squid, and how I can optimize it if it is.
I don't even know how to check how much memory squid is eating up (maybe I just need an additional RAM).
Or how to know whether my two NICs (1 eth internal, 1 eth for external traffic) are the bottlenecks.

I've read some online articles about setting up cache_mem to be larger, lessening cache_dir coz disk access maybe the bottleneck (my disks are SCSI, but you see I'm willing to try anything), running squid using nice (I haven't tried that one yet). But my net access is still slow. Either squid is the problem or it is my ISP.

Can anyone help me troubleshoot squid, or maybe get "statistical data" that will help me determine squid is already using up all available hardware resources (ram,cpu,eth...) but still can't cope up? Maybe I just need to run this on a faster machine.

Question by:rqs
    LVL 40

    Assisted Solution

    Could be squid, could be machine resources, or it could be that you are just loading up your Internet link. We might get a clue from the load average, processor utilization, and memory/swap usage from the top command when things are slow. The other useful data point would be some stats on your Internet Link.
    LVL 38

    Accepted Solution

    LVL 61

    Expert Comment

    How many users you serve ???
    LVL 2

    Author Comment

    Hi guys. I
    This site helped:, followed some of the recommended config.
    Also the top command. As it turned out, squid wasn't using up all the mem and cpu, only a moderate portion of it.
    What I did was tried to experiment with various combinations of parent peers. The best mix that I got
    was not to use at all the proxy at the other ISP which was performing very very slow.
    The traffic improved so far. Thanks for the help.

    We have around 50 users by the way.

    Featured Post

    How to improve team productivity

    Quip adds documents, spreadsheets, and tasklists to your Slack experience
    - Elevate ideas to Quip docs
    - Share Quip docs in Slack
    - Get notified of changes to your docs
    - Available on iOS/Android/Desktop/Web
    - Online/Offline

    Join & Write a Comment

    Don’t let your business fall victim to the coming apocalypse – use our Survival Guide for the Fax Apocalypse to identify the risks and signs of zombie fax activities at your business.
    If you're not part of the solution, you're part of the problem.   Tips on how to secure IoT devices, even the dumbest ones, so they can't be used as part of a DDoS botnet.  Use PRTG Network Monitor as one of the building blocks, to detect unusual…
    Viewers will learn how to connect to a wireless network using the network security key. They will also learn how to access the IP address and DNS server for connections that must be done manually. After setting up a router, find the network security…
    After creating this article (, I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…

    734 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    23 Experts available now in Live!

    Get 1:1 Help Now