I have a simulation program which creates two threads and I would like to know if I can measure the time of each individual thread. Threads communicate (I use pthread to manage them) and I want to measure communication time. I found a solution with clock_gettime and CLOCK_THREAD_CPUTIME_ID but nothing for Solaris OS.
French forums are insufficient, so I hope to find help here
Note: two threads on identical topic merged. Please do not post twice on the same topic - this kind of hodge-podge results from doing that.
Last edited by jim mcnamara; 03-24-2011 at 12:50 PM..
Reason: duplicate topics merged
I have two threads with WRITE/READ between them. The synchronisation works (I use pthread library) but I must calculate the execution of the READ function.
A part of my program :
Actually, GET_TIME uses gethrtime() => it's system time. But between my two GET_TIME, I'm not sure that only this function is executed. Processor switchs between thread 1 and 2 so waitdur is variable, that's why I want to know a solution to calculate only thread time.
Which version of Solaris are you using? I believe that CLOCK_THREAD_CPUTIME_ID was added in one of the later Solaris 10 updates. However, it might have only been added to the header to pass the UNIX03 VSTH test suite and not actually implemented.
Another possible way is to use getrusage(RUSAGE_LWP, ....) In Solaris 9 and above the default correspondence between threads and LWPs is 1x1, not MxN.
I already try to use CLOCK_THREAD_CPUTIME_ID but it does'nt work with Solaris 8.
I'm trying to use getrusage with RUSAGE_SELF (RUSAGE_LWP is not available in sys/resource.h, there's just RUSEGE_SELF and RUSAGE_CHILDREN). I hope it's a way to find solution ...
---------- Post updated at 11:37 AM ---------- Previous update was at 11:36 AM ----------
Bad news, I have a strange behaviour with getrusage.
My old function GET_TIME :
The new one :
Between two GET_TIME, time is 200 000 ns approximately.
With GET_TIME2, this value can reach 10 000 000 or -7000 and it's equal to 0 majority...
Greetings!
I set up a basic threading specimen which does the job:#!/usr/bin/python
import threading
class a(threading.Thread):
def __init__(self):
threading.Thread.__init__(self)
def run(self):
print("thread a finished")
class b(threading.Thread):
... (0 Replies)
Hi
I have a system running solaris 10, and I intend to use a NetApp as its storage system. The application requires a throughput between the server and the storage 7000 disk IOPS (random IO sustained throughput with response time of 20 mili second and 16k block size).
How to make sure that I... (6 Replies)
Hello guys,
I am doing a performance analysis on one of our psystem. Most of time I am using Nmon analyser to do my trend graph. But I can't find any help with it. We are interesting in the time spend by tasks in Aix run queue.
After looking the Aix documentation, I am pessimist to find any... (3 Replies)
Hi
For our load testing , we are using stubs (unix shell script) which send the response to the request coming from the application. As the unix stub is single threaded , it is responding to only one request whereas multiple requests come in parallely.
I haven't worked on thread concepts... (5 Replies)
hi there, i'd like to know what exactly zpool's iostat (-v) output measure, especially the writes. Is it only the writes to the ZIL or all writes (including commmits) to the disks? if anyone knows, that'd be helpful roti (1 Reply)
I am working on an application with some rather interesting build performance issues. If we build on Solaris/Linux x86/AMD64 the build is rather fast, but it takes more than five times as long on our Solaris Sparc servers (single-threaded builds on the workstations, but multi-threaded on the... (5 Replies)
Hello
Ive written 2 programs in shell and I need to compare their speed (Compile) against one another.
what methods could I go about doing this?
Is there a feature in shell do accommodate this? (2 Replies)
Discussion started by: Darklight
2 Replies
8. Forum Support Area for Unregistered Users & Account Problems
How to post a new thread (Regarding Unix related doubts) in Unix Forums.
I registered my id but I am unable to post my Questions to Forum.
Thanks & Regards,
indusri (1 Reply)