This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Limiting max open files

Tags: None
(comma "," separated)
jdong
Registered Member
Posts
358
Karma
0

Limiting max open files

Wed Feb 06, 2008 9:34 pm
https://bugs.launchpad.net/ubuntu/+sour ... bug/189691

This kind of bug has been described before in our forums here, that a torrent with a huge number of files might cause the ulimit to be exceeded, and I believe our previous concensus was to have KTorrent respect the ulimit set by the system by keeping itself to only that many active file handles at a time.


I know at the time already that development was focused at KDE4, so I think it's a good idea for us to get this handled with ktorrent KDE4.
MoDaX
Registered Member
Posts
241
Karma
0
OS

Wed Feb 06, 2008 10:35 pm
socket leak has already been fixed for 3.0. iirc, first commit after 3.0rc1
George
Moderator
Posts
5421
Karma
1

Thu Feb 07, 2008 6:44 pm
Indeed a socket descriptor leak was fixed right after the release of 3.0rc1

(see http://bugs.kde.org/show_bug.cgi?id=156163)

So this is most likely the cause of your bug. Seeing that problems with to many files open have become quite rare on the KDE3 version.
jdong
Registered Member
Posts
358
Karma
0

Fri Feb 08, 2008 10:30 pm
What about for cases where I actually have a torrent with 5000 files in it?
George
Moderator
Posts
5421
Karma
1

Sat Feb 09, 2008 11:33 pm
jdong wrote:What about for cases where I actually have a torrent with 5000 files in it?


We only open files when they are necessary, and when we do approach the limit we will switch to buffered mode for chunks, normally we use mmap (which requires the files to be open).

With buffered mode we will open the file for a short while and then do our stuff (reading or writing a chunk), and then close it again.


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]