March 29, 2024, 01:40:30 AM

News : LinuxSolved.com Linux Help Community Forum..


Author Topic: Squid very slow data transfer  (Read 5453 times)

Offline test7795

  • New Member
  • Posts: 2
Squid very slow data transfer
« on: June 04, 2005, 04:08:40 AM »
I have setup squid as transparent proxy. I have read the full squid documentation manual, but have one problem. I'm on a 100Mbps LAN, connected to a T1 Internet link. I download a 14MB file at about 120Kbps (T1 speed, non cached version). Then I redownload that same (cached) file (coming from squid, verified per logs), which downloads faster, but only at 350-400Kbps. I have tested file transfers to the squid server (which also has smb), and they run near the full capacity of 100Mbps.

So my question is, if squid has the file cached, why is it so slow to transmit it over the LAN???

Any help would be appreciated.

Thanks,

Pablo

Offline Ricky

  • LST CareTaker
  • Specially Skilled
  • *****
  • Posts: 2381
Squid very slow data transfer
« Reply #1 on: June 04, 2005, 04:08:33 PM »
I don't thinks that it is any problem..
Squid deploys a good and mature cache algorithm which make sures you always get fresh and right content from the cache while it also improve performance.

Whenever you open a webpage then many things determines that next time how fast it will load (if you are behind caching), the important one is server supplied TTL and cache policy for particular file or page. Many times squid always open a fresh webpage from internet even if it was open few seconds ago.. reason for this is that it follow the cache directive supplied by server for that page.

It checks for integrity of material it is delivering while giving you the same so it might be slow this way.

Offline test7795

  • New Member
  • Posts: 2
Squid very slow data transfer
« Reply #2 on: June 05, 2005, 01:20:56 AM »
Let me make sure I understand. You're saying that everything is as it should be. That the reduced throughput from squid is a result of the caching algorithm's computational overhead.

Just to be clear:
My download rate via direct Internet is 120Kbps.
My LAN rate is 102400Kbps.
Any my squid rate (on LAN) is only 350Kbps.

Squid is only able to utilize 0.34% of my idle LAN's bandwidth.

Something is definitely wrong here. If I had a 3.0Mbps Internet link, then squid would actually make cached downloads SLOWER! I realize there is computational overhead involved in the cache algorithm. However, this test was performed when the entire LAN was idle, and with a single, 14MB file. So even if it took squid an initial 5sec to determine it could feed me the cached file, why is the duration of the download at 350Kbps only.

Most of the squid.conf options are at their defaults. I've monitored squid with top, and it's CPU usage and memory usage is minimal. I've compiled squid multiple times, trying the different performance enhancement options, such as diskd and async-io. What is the bottleneck here? Is there a way to determine what that would be.

The purpose of the cache is to increase throughput. The throughput is only slightly better than direct Internet.

I'd like to know what kind of LAN throughput other people are getting with their squid install. It's best to test with a fairly large file, to increase the accuracy of the bandwidth measurement, and to reduce the ratio of the computational overhead to the download time.

If anybody could post their speeds from squid, it would be greatly appreciated.

Thanks in advance for any help,

Pablo

Offline Ricky

  • LST CareTaker
  • Specially Skilled
  • *****
  • Posts: 2381
Squid very slow data transfer
« Reply #3 on: June 07, 2005, 06:58:48 AM »
ok you asked for other people's squid's cache performance.
I have not used squid on very fast link but I would like to tell you that it I have only seen improvement and only in the webpage browsing but yes sometimes already downloaded files get downloaded at the rate of LAN's speed and sometimes not. I try to figure that out and found it is mostly due to cache directives set for those files by their servers. Then i tried a simple.. wwwoffle, it blindly do use of cache, and using that i always got speed of LAN for predownlooaded / previewd page.

If you had 3 mbps line then still squid will be performing better than that connection.
And please note ... squid will never server data from its cache blindly.