Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have a dedicated squid proxy server. Since I've implemented the proxy server users have been complaining about "internet slowness".
I have nothing else running on this server other than squid. I checked the RAM and I'm only using 2GB out of 8GB (no problem there); so I ran top and it seems that squid is the top user (no surprises there...it's the only service running)
Then this is what I got on my mpstat...
Code:
[root@camel:~<116>]# mpstat -P ALL 1 5
Linux 2.6.18-92.1.10.el5 (camel) 09/26/2008
10:07:17 AM CPU %user %nice %sys %iowait %irq %soft %steal %idle intr/s
10:07:18 AM all 25.00 0.00 0.00 0.00 0.00 0.00 0.00 75.00 1144.00
10:07:18 AM 0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 100.00 1019.00
10:07:18 AM 1 0.00 0.00 0.00 0.00 0.00 0.00 0.00 100.00 0.00
10:07:18 AM 2 100.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 122.00
10:07:18 AM 3 0.00 0.00 0.00 0.00 0.00 0.00 0.00 100.00 0.00
10:07:18 AM CPU %user %nice %sys %iowait %irq %soft %steal %idle intr/s
10:07:19 AM all 24.94 0.00 0.00 0.00 0.00 0.00 0.00 75.06 1143.00
10:07:19 AM 0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 100.00 1002.00
10:07:19 AM 1 0.00 0.00 0.00 0.00 0.00 0.00 0.00 100.00 0.00
10:07:19 AM 2 100.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 142.00
10:07:19 AM 3 0.00 0.00 0.00 0.00 0.00 0.00 0.00 100.00 0.00
10:07:19 AM CPU %user %nice %sys %iowait %irq %soft %steal %idle intr/s
10:07:20 AM all 25.00 0.00 0.00 0.00 0.00 0.00 0.00 75.00 1127.00
10:07:20 AM 0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 100.00 1020.00
10:07:20 AM 1 0.00 0.00 0.00 0.00 0.00 0.00 0.00 100.00 0.00
10:07:20 AM 2 100.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 106.00
10:07:20 AM 3 0.00 0.00 0.00 0.00 0.00 0.00 0.00 100.00 0.00
10:07:20 AM CPU %user %nice %sys %iowait %irq %soft %steal %idle intr/s
10:07:21 AM all 25.00 0.00 0.00 0.00 0.00 0.00 0.00 75.00 1145.00
10:07:21 AM 0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 100.00 1001.00
10:07:21 AM 1 0.00 0.00 0.00 0.00 0.00 0.00 0.00 100.00 0.00
10:07:21 AM 2 100.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 144.00
10:07:21 AM 3 0.00 0.00 0.00 0.00 0.00 0.00 0.00 100.00 0.00
10:07:21 AM CPU %user %nice %sys %iowait %irq %soft %steal %idle intr/s
10:07:22 AM all 24.94 0.00 0.00 0.00 0.00 0.25 0.00 74.81 1172.73
10:07:22 AM 0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 100.00 1058.59
10:07:22 AM 1 0.00 0.00 0.00 0.00 0.00 0.00 0.00 100.00 0.00
10:07:22 AM 2 100.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 114.14
10:07:22 AM 3 0.00 0.00 0.00 0.00 0.00 0.00 0.00 100.00 0.00
It seems that squid is only using 1 processor! Now see the arerage...
I have a dedicated squid proxy server. Since I've implemented the proxy server users have been complaining about "internet slowness".
Any help would be great! Thanks!
Did you install this from a pre-compiled package, or via source code? I'm not in front of my box right now, but if you got it from package, it may not have been built for a multi-processor/SMP kernel. If you compile from source, run "./configure --help", to see the available options. There may be one in there for SMP. Just my first thought...
Did you install this from a pre-compiled package, or via source code? I'm not in front of my box right now, but if you got it from package, it may not have been built for a multi-processor/SMP kernel. If you compile from source, run "./configure --help", to see the available options. There may be one in there for SMP. Just my first thought...
No, I installed it VIA yum.
Do you know if they have a "multiprocessor" version?
FWIW I have the "64bit" version installed...
Code:
[root@camel:~<126>]# yum -y list | grep squid
squid.x86_64 7:2.6.STABLE6-5.el5_1. installed
Do you know if they have a "multiprocessor" version?
FWIW I have the "64bit" version installed...
Code:
[root@camel:~<126>]# yum -y list | grep squid
squid.x86_64 7:2.6.STABLE6-5.el5_1. installed
-C
Not sure, and I'm not even sure if that IS an option. However, since you have the 64 bit version on an SMP box, I would definitely install it from source code. Since you're running the SMP kernel, it will probably compile with that enabled, even if there isn't a command-line configure option for it.
You wouldn't have to reconfigure anything either...just compile from source, then bounce the service.
Not sure, and I'm not even sure if that IS an option. However, since you have the 64 bit version on an SMP box, I would definitely install it from source code. Since you're running the SMP kernel, it will probably compile with that enabled, even if there isn't a command-line configure option for it.
You wouldn't have to reconfigure anything either...just compile from source, then bounce the service.
Thanks.
Is there anyway to see how the "packaged version" was compiled? That way I can use the same statement but just add the option i want...
Is there anyway to see how the "packaged version" was compiled? That way I can use the same statement but just add the option i want...
-C
Same statement?? What do you mean? You'd have to look at the package details, to see what options it had, but sometimes it doesn't specify.
And this isn't about running Squid....you've got to build it with the option enabled, or build it on a system running the SMP kernel. You'll use the same Squid config file no matter what...squid will just run differently 'under the hood'.
Same statement?? What do you mean? You'd have to look at the package details, to see what options it had, but sometimes it doesn't specify.
And this isn't about running Squid....you've got to build it with the option enabled, or build it on a system running the SMP kernel. You'll use the same Squid config file no matter what...squid will just run differently 'under the hood'.
How many users do you have? OK, it is an issue that you have 4 cpus and are only managing to use 1, but, even so, that level of cpu usage seems high, unless you have many users.
My concern is that something else about the configuration may be sub-optimal (screwed up, in normal English) and that is leading to the need to use lots of cpu.
I have about 300 users that rely heavily on network user (our entire job tracking system is web based...and we have a call center).
Nothing else is running on that machine (I disabled X and all services that I don't need...I default to runlevel 3). I'm just surprised that there is not more information about making squid "friendly" with multiprocessors...
Squid is a single process application and can not make use of SMP. If you want to make Squid benefit from a SMP system you will need to run multiple instances of Squid and find a way to distribute your users on the different Squid instances just as if you had multiple Squid boxes.
Having two CPUs is indeed nice for running other CPU intensive tasks on the same server as the proxy, such as if you have a lot of logs and need to run various statistics collections during peak hours.
The authentication and group helpers barely use any CPU and does not benefit from dual-CPU configuration.
There's also interesting information on that page if you're using RAID.
I have about 300 users that rely heavily on network user (our entire job tracking system is web based...and we have a call center).
[QUOTE]
Sorry, had to check, but with that kind of profile, the total cpu loading does seem a bit more reasonable than if you had only four users who rarely used the web...
If this is a purely internal web tracking system, should you really be caching it? Maybe, if you make this bit uncachable, it takes the load off a bit.
And, if you do need/want to cache this, shouldn't you be running a separate instance in httpd accelerator mode (as it sounds like this app is a bit 'database-y' in nature, it may well be pointless caching its output).
Its still slightly unusual though; normally lack of squid performance is down to lack of memory (physical memory, virtual memory or squid.conf not set up to use what you've got).
Quote:
Nothing else is running on that machine
Maybe caching name resolutions would be a good thing. You've certainly got the spare CPU to try it without starving squid of cpu.
Maybe caching name resolutions would be a good thing. You've certainly got the spare CPU to try it without starving squid of cpu.
That's actually not a bad idea...
I am bypassing the internal sites already...(as you stated...there is really no need to cache internal sites).
I guess I could try installing a caching NS on the machine...then point it to our internal DNS server (for our internal sites).
I think I should do some more homework about what to cache and what not to cache...as of right now we are "bypassing" our internal site via the browser settings...maybe I can also do something at the "squid level"...
On to more reading the docs...
**EDIT**
Actually, I don't really care if Squid is caching. All I'm using it for is for content filtering. Is there any way to "disable" the caching part? All I really care about it the content filtering aspect of it...
Actually, I don't really care if Squid is caching. All I'm using it for is for content filtering. Is there any way to "disable" the caching part? All I really care about it the content filtering aspect of it...
I used to do this by setting the disk cache directory to /dev/null. There were many times when I wanted only RAM cache to be used but not disk cache. Maybe the new Squid versions have an actual configuration option for this sort of thing but I'm not sure. Either way it's pretty simple.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.