nixCraft Linux Forum

nixCraft

Linux / UNIX Tech Support Forum

SQUID and increasing the file descriptor on debian

This is a discussion on SQUID and increasing the file descriptor on debian within the Getting started tutorials forums, part of the Linux Getting Started category; Dear Sirs, Good Afternoon. Well as we all know setting up squid on debian is so easy but the problem ...


Go Back   nixCraft Linux Forum > Linux Getting Started > Getting started tutorials

Linux answers from nixCraft.


Getting started tutorials So much to read, so little time! If that is your problem, we have solution. Read our FAQ and tutorials to help you cut through the clutter of information overload. Only members of "contributors" group can post new tutorials. Other members can just reply to thread.

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 15-08-2007, 06:39 PM
Junior Member
User
 
Join Date: Aug 2007
OS: Debian
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
maroon is on a distinguished road
Default SQUID and increasing the file descriptor on debian

Dear Sirs,
Good Afternoon.

Well as we all know setting up squid on debian is so easy but the problem is like a close system and not so easy to modify the core of this amazing cache. so I tried to install squid and it's working great on my debian etch 4.0 but after checking with the cachemgr I've found i'm limited with only 1024 as a file descriptor, so how can I increase the file descriptor after installing squid on debian?

your help is highly appreciated

Greetings from Lebanon
Reply With Quote
  #2 (permalink)  
Old 15-08-2007, 11:31 PM
nixcraft's Avatar
Never say die
User
 
Join Date: Jan 2005
Location: BIOS
OS: RHEL
Scripting language: Bash and Python
Posts: 2,706
Thanks: 11
Thanked 244 Times in 183 Posts
Rep Power: 10
nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute
Default

Hi!

You can use following command to increase FD on Linux:
Code:
echo 5000 > /proc/sys/fs/file-max
See our FAQ for more info - Linux increase the maximum number of open files

Let me know if you need any further assistance
__________________
Vivek Gite
Linux Evangelist
Be proud RHEL user, and let the world know about your enterprise choices! Join RedHat user group.
Always use CODE tags for posting system output and commands!
Do you run a Linux? Let's face it, you need help
Reply With Quote
  #3 (permalink)  
Old 16-08-2007, 11:16 AM
Junior Member
User
 
Join Date: Aug 2007
OS: Debian
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
maroon is on a distinguished road
Default

thank you for your instant reply, does this affect the file descriptor of squid? anyway I will try it and I hope this issue would be slved by using this comand

another question if you have any amazing fine tunes to speed up the cache performance

ever heard of zero hit patch for squid? and did u try it?

greetings from lebanon

Regards,
Reply With Quote
  #4 (permalink)  
Old 25-08-2007, 07:59 PM
monk's Avatar
Senior Member
User
 
Join Date: Jan 2005
Location: Tibet
OS: Debian GNU/Linux
Posts: 506
Thanks: 0
Thanked 8 Times in 6 Posts
Rep Power: 7
monk has a spectacular aura about monk has a spectacular aura about
Default

yup it does affect squid and other softwares ..

Noop never heard of zero hit patch for squid. can you give more information or url for this patch????
__________________
May the force with you!
Reply With Quote
  #5 (permalink)  
Old 26-08-2007, 01:30 PM
Junior Member
User
 
Join Date: Aug 2007
OS: Debian
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
maroon is on a distinguished road
Default

Excuse me! I meant (Zero pentalty hit patch - ZPH)
Squid-cache Zero Penalty Hit patch

And I have one more question about increasing the file descriptor..

ulimit -n and echo XXXX > /proc/sys/fie.... what's the difference? or does these two commands end up with same results?

Greetings from Lebanon

Yours Sincerely
Reply With Quote
  #6 (permalink)  
Old 28-08-2007, 08:12 PM
tom tom is offline
Contributors
User
 
Join Date: Jun 2005
Location: London, UK
Posts: 213
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 5
tom is on a distinguished road
Default

Yup same result but both will forget values after a reboot as they are temporary solution. You need to add values to /etc/sysctl.conf file to keep setting forever after a reboot


About patch ... if you are using latest version you should be fine
Reply With Quote
  #7 (permalink)  
Old 29-08-2007, 12:02 AM
Junior Member
User
 
Join Date: Aug 2007
OS: Debian
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
maroon is on a distinguished road
Default

ok!!!

add the command as it is in the file /etc/sys....

for example:

echo > 8192 /proc/sys/fs/....

or

ulimit -HSn 8192

then save the file and quit...?

thk u
Reply With Quote
  #8 (permalink)  
Old 29-08-2007, 04:41 PM
monk's Avatar
Senior Member
User
 
Join Date: Jan 2005
Location: Tibet
OS: Debian GNU/Linux
Posts: 506
Thanks: 0
Thanked 8 Times in 6 Posts
Rep Power: 7
monk has a spectacular aura about monk has a spectacular aura about
Default

Quote:
Originally Posted by maroon View Post
ok!!!

add the command as it is in the file /etc/sys....

for example:

echo > 8192 /proc/sys/fs/....

or

ulimit -HSn 8192

then save the file and quit...?

thk u
Naa dont' use echo or ulimit command in in /etc/sysctl.conf
Code:
vi /etc/sysctl.conf

Setup fd as follows:
Code:
fs.file-max = 15000
Save and reboot server
__________________
May the force with you!
Reply With Quote
  #9 (permalink)  
Old 29-08-2007, 05:06 PM
Junior Member
User
 
Join Date: Aug 2007
OS: Debian
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
maroon is on a distinguished road
Default

is there any refernce for these commands?
Reply With Quote
  #10 (permalink)  
Old 29-08-2007, 07:42 PM
monk's Avatar
Senior Member
User
 
Join Date: Jan 2005
Location: Tibet
OS: Debian GNU/Linux
Posts: 506
Thanks: 0
Thanked 8 Times in 6 Posts
Rep Power: 7
monk has a spectacular aura about monk has a spectacular aura about
Default

Read linux kernel documentation and look for sysctl directory. Index of /files/linux-kernel/Documentation/sysctl/
__________________
May the force with you!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads

Thread Thread Starter Forum Replies Last Post
Increasing the KERNEL parameter sathiya Ubuntu / Debian 4 01-02-2008 10:36 AM
Read arguments from a file and pass them to binary file AHJ Shell scripting 1 31-10-2007 06:04 PM
Problem blocking file ext downloads from Gmail in squid Roshu Networking, Firewalls and Security 1 24-08-2007 11:21 PM
iptables under debian ricc Linux software 1 22-04-2007 08:26 PM
increasing load kasimani Web servers 3 21-02-2007 08:50 AM


All times are GMT +5.5. The time now is 11:44 AM.


Powered by vBulletin® Version 3.8.5 - Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2
©2005-2010 nixCraft. All rights reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38