Increasing Open File Limit for transmissiond - limits.conf?

Post new topic   Reply to topic    DD-WRT Forum Forum Index -> General Questions
Author Message
robackja
DD-WRT Novice


Joined: 17 Feb 2010
Posts: 45

PostPosted: Sun Feb 21, 2010 22:51    Post subject: Increasing Open File Limit for transmissiond - limits.conf? Reply with quote
I notice the open file limit on DD-WRT (build 13832) for WRT610Nv2 is 1024.
Code:
$ ulimit -a
...
open files                      (-n) 1024
...

I would like to increase this for the transmission user, since my downloads often get halted with "Too many open files". Transmission has an open files setting, but this limit is enforced by OS (at least that is how it works on an regular linux system).

So, knowing how DD-WRT is trimmed down, is there any way to increase this limit in something equivalent to /etc/security/limits.conf?

And yes, I know there are side-effects to doing this, but currently my router is handling all this just fine, and I'd like to see how far I can push this modest hardware. Previously I've been using Linux box as my home router, but I would like to not run a 8-core Xeon machine for 24/7 just to route the cable internet and run some torrents. Trying to cut $20 a month from the electricity bill (wall power meter says that machine costs me $28 per month to run 24/7).

_________________
Linksys WRT610N v2 (DD-WRT) :: D-LINK DIR-825 (OpenWrt) :: The World in 35mm :: Bandwidth Shaping with DD-WRT
Sponsor
gruenesAlien
DD-WRT Guru


Joined: 27 Nov 2008
Posts: 717

PostPosted: Mon Feb 22, 2010 8:42    Post subject: Reply with quote
compile your own dd-wrt or use firmware-mod-kit, otherwise it is not possible to change anything in /etc
robackja
DD-WRT Novice


Joined: 17 Feb 2010
Posts: 45

PostPosted: Mon Feb 22, 2010 8:52    Post subject: Reply with quote
well, a workaround is in /opt/etc/init.d/S90transmission startup script. Right before the script does an `sudo` to start the transmission daemon(s), you can use ulimit to increase the max open file limit and then the sudo'd process will inherit these limits.
Code:
ulimit -n 8192
sudo -u ${TRANS_USER} $DAEMON -g ${CONFIGDIR}

In my router startup script, I've increased the max number of open files allowed on the entire system from 8192 to 16384 by
Code:
echo 16384 > /proc/sys/fs/file-max


Also, again in the /opt/etc/init.d/S90transmission script, after the 3 daemon processes are started, I renice the processes priorities to +19
Code:
renice +19 `ps axw | grep "transmission-daemon" | grep -v grep | cut -f1 -d' '`

since I don't want transmission daemons having any priority over anything else on the system :o

It would be nice to see the transmission daemon startup scripts support these 2 features by default. I'll have to remember to make these changes anytime transmission is updated in ipkg.

_________________
Linksys WRT610N v2 (DD-WRT) :: D-LINK DIR-825 (OpenWrt) :: The World in 35mm :: Bandwidth Shaping with DD-WRT
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Forum Index -> General Questions All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum