LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-20-2008, 11:51 PM   #1
peterhuang
LQ Newbie
 
Registered: May 2008
Posts: 4

Rep: Reputation: 0
How to run two task and open the same fd(file descriptor)


I want to run two or more task and open the same fd(file descriptor).
Because my program generator too many fd, it cause the performance very bad. "lsof" shows my tasks open more then 50000 files.
So I want to write a Daemon to manager my opened file. every file will be opened once . If the new task needs the file which is opened by other program, this new task just need the fd and without open again.
how can i do?
 
Old 05-21-2008, 01:01 AM   #2
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
Why do you need to open 50K files at the same time?
 
Old 05-21-2008, 05:03 AM   #3
peterhuang
LQ Newbie
 
Registered: May 2008
Posts: 4

Original Poster
Rep: Reputation: 0
I maintain a huge system. It has more than 2000 program and more then 100 users. Each program links with 100 files when it is running. Most of linking file is the same. When 100 users use this system and every user run more then 5 programs, it causes 100 * 5 * 100 = 50000 file opens. I hope I can have a daemon that can help me to manager those opened file, and one file will be opened only once. (If one file is opened, the new task doesn’t need open again. I can use the same fd to do IO operation.)
How can I do?
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How many open file descriptor possible in RHEL 4.4 mani77_iitr Red Hat 2 12-12-2007 08:30 AM
LVM error: File Descriptor left open kapil.hazarika Linux - Software 1 06-18-2007 08:03 PM
Linux automatisation and File descriptor left open Pingu700 Linux - Server 4 06-12-2007 08:12 AM
Low open file descriptor limit Suse 9.2 kryten SUSE / openSUSE 3 12-20-2004 12:20 AM
Wireless : cardmgr[4292] : Open sock(socket 1) failed: Bad file descriptor mahendra Fedora 1 12-07-2004 04:36 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:55 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration