- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Performance problem with syslog in multithreaded a...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-15-2005 08:28 PM
05-15-2005 08:28 PM
Performance problem with syslog in multithreaded application
I recently discovered that syslog calls in a multithreaded application is a real performance killer. I guess there is a mutex in the syslog function that blocks the threads, but there must be something more than that.
If I replace the syslog function with a function that does a "mutex.lock; printf; mutex.unlock" sequence there is no noticable performance loss.
I get the same results on HP-UX 11.00 and HP-UX 11.23 (Itanium).
Any ideas?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-15-2005 08:38 PM
05-15-2005 08:38 PM
Re: Performance problem with syslog in multithreaded application
It may be interesting to get a 'tusc' of the application with the options
-E -v -l -T "" -f -p -o result.out
It can give an idea where the time is passed.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-15-2005 09:18 PM
05-15-2005 09:18 PM
Re: Performance problem with syslog in multithreaded application
'tusc -E -v -l -T "" -f -p'
for the process. (gzipped)
A short explanation:
The process serves clients (8 in this case) connecting via TCP/IP. A thread is created for each client.
The thread sends a query to Oracle, and returns the result to the client. The thread also makes 6 rapid syslog calls.
The response time for a client is proportional to the number of clients! Without the syslog calls it is more or less independent of the number of clients.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-15-2005 11:00 PM
05-15-2005 11:00 PM
Re: Performance problem with syslog in multithreaded application
I suppose it is the cause of the perf kill
you can try to call not portable
pthread_mutex_setyieldfreq_np( PTHREAD_MUTEX_YIELDNEVER_NP);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-16-2005 12:51 AM
05-16-2005 12:51 AM
Re: Performance problem with syslog in multithreaded application
But it is not even close to the response times without the syslog calls.
What is syslog doing here? Maybe I should use another syslog client implementation?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-16-2005 04:01 AM
05-16-2005 04:01 AM
Re: Performance problem with syslog in multithreaded application
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-16-2005 06:27 PM
05-16-2005 06:27 PM
Re: Performance problem with syslog in multithreaded application
>> or afterwards (i.e. once per thread)?
openlog() is called once in the main thread before starting any other threads.