How to remove wrlock calls ?

We have analysed the performance of our applications using Quantify and find that a lot of the time is spent in calls to llrw_wrlock/unlock etc.
Our application is written in C++ built using SunWS4.2 on Solaris 2.6.
The application is single-threaded but sits on top of a thread-safe 'architecture' designed in-house.
We make use of the RogueWave libaries Tools.h/Money.h, and of Oracle 8.1.6.
I know from dbx that our application consists of 3 threads. 1 of which is the 'application' thread (where the application functionality is executed), 1 thread sits on a signotify wait, another sits on a condtimedwait.
I have looked on google to try to identify what the llrw_wrlock is (I had already guessed it was mutex lock related) - and came to the conclusion that it may be related to thread context switching. (We are using unbound LWP threads). I also determined that we were using a SCHED_OTHER thread scheduling policy. So I concluded that if I could keep the 'application' thread on CPU (or more to the point - on LWP) then I might improve performance.
I experimented with changing thread scheduling policy (using sched_setscheduler) but eventually found that only SCHED_OTHER is supported on Solaris when using native Solaris threads. (Note to Sun: the man pages are very poor in this area - man sched_setscheduler gives the impression that the other policies are supported - and it is not until one does 'man thr_setprio' that one realises that only SCHED_OTHER is supported - or if one is lucky enough to have the Sun Education "Multi-threaded Application Programming" manual to hand ;-[ ).
I also experimented with changing thread priority for the 'application' thread (trying priorities of 120 through to 127, and also a priority of 10 - in case I had misunderstood the man pages).
All my experiments have been to no avail - there was no performance change between my modified applications and the unmodified.
I also created a stock C++ application
int k=0;
for (int i = 0; i< 1000;++i)
for (int j=0;j < 1000000; ++j)
k++;
I compiled this and compared it against the same algorithm executed from within one of our 'architecture' wrappers - again no difference in performance, which gave me the impression that there was no negligible performance overhead caused by the"multi-threaded" nature of our architecture.
This has led me to believe that the Quantify figures produced are a red-herring ?
Can anyone else confirm my findings or has had similar performance issues that they have now overcome ? (If so - could you please indicate what the solution is ?)
Many thanks
Paul McGrath

We have analysed the performance of our applications
using QuantifyYou may be interested to know that the latest version of Workshop,
called Sun ONE Studio 7 Enterprise Edition, comes with a tool
called Performance Analyzer that will give you a lot more information.
In particular, it will tell you not only where you are spending your
time but how you got there (call stack) and which of multiple paths
through the call stack is taking the most time. It will also analyze
time spent at various types of locks.
and find that a lot of the time is
spent in calls to llrw_wrlock/unlock etc.As you probably know, rw_wrlock is an interface to something
called a readers-writer lock. It is a form of mutual exclusion lock
that allows many readers into a protected section but only one
writer. llrw_wrlock is new to me, but it's virtually certain to be
related.
So I
concluded that if I could keep the 'application'
thread on CPU (or more to the point - on LWP) then I
might improve performance.
I experimented with changing thread scheduling policy
(using sched_setscheduler) but eventually found that
only SCHED_OTHER is supported on Solaris when using
native Solaris threads.Based on your comment that you want to keep the app on
one LWP, I think you are more interested in the scope of
contention than in priority or policy. Scope of contention
is the scope within which the LWP competes for resources.
Threads are not visible to Solaris or the Solaris 2.6 scheduler.
Only LWPs are visible. By using unbound threads, you are
potentially using fewer kernel-scheduled LWPs than user-
created threads. Setting the scope of contention of your app
thread to systemwide rather than its present setting will
allow the thread to contend for resources (CPU time, for
example) directly at a system level. It will make it a bound
thread, which means that your thread (a user-level concept)
will be bound one-to-one with an LWP (an OS-level concept).
Binding the thread to an LWP allows the thread to compete,
through its LWP, for resources.
However, that is not your problem because...
I know from dbx that our application consists of 3
threads. 1 of which is the 'application' thread (where
the application functionality is executed), 1 thread
sits on a signotify wait, another sits on a
condtimedwait....and that means that two of your three threads are just
sitting there and not taking or wasting any resources.
They will just sit quietly until they are allowed to proceed
by getting notified in the case of the first one or by either
having the condition on which it is waiting met or having
the timeout expire in the case of the second one. And
if those two threads aren't taking any time then...
I also experimented with changing thread priority for
the 'application' thread (trying priorities of 120
through to 127, and also a priority of 10 - in case I
had misunderstood the man pages).... adjusting the priority is not going to help because
a higher priority only lets you go ahead of another LWP
with a lower priority that is taking resources that you
want. However, the other LWPs are sitting quietly and
not taking any resources. You can have any priority you
want, high or low, and your results will not change
because priority determines your place in line and you
are the only one in line at the moment.
This has led me to believe that the Quantify figures
produced are a red-herring ?Sounds good to me. Although I have never used Quantify,
the story that Quantify is telling (and that I am able to
judge only second-hand from your retelling thereof) is not
correct, or is at least incomplete.
Can anyone else confirm my findings or has had similar
performance issues that they have now overcome ? (If
so - could you please indicate what the solution is
?)The solution is to get Sun ONE Studio 7 Enterprise Edition
and use Performance Analyzer. Performance Analyzer
will tell you where your time is going in terms of inclusive
or exclusive elapsed wall clock time, CPU time, system
time or user time. On an UltraSPARC-III, it will use the
hardware counters to show you where you are spending
time on cache misses, pipeline stalls, mispredicted
branches, and a dozen other factors. It will attribute the
time to specific methods and even a specific line of
source. It will analyze your code built with compilers from
Sun, gnu, PGI, Fujitsu, and any other. If you have no money
then get the Try-and-Buy and at least take it for a spin on
this problem.

Similar Messages

  • How to remove frequently called numbers

    Is there a way to remove or delete those numbers that are called?  Under the tab favorites a list shows up how do I get rid of that list without deleting my contacts?

    That removes them from the Recent tab, but it's similar for the Favorites tab (which I believe was the question, if I'm reading the post correctly), i.e., Contacts > Favorites > settings bar (the three vertical dots) > Remove From Favorites > place check next to the ones you want to delete > Done.  And again, they won't be deleted in your Contacts.  That at least works on a Samsung S5 with the latest updates; on some phones and some OS', that list under the Favorites tab can't be removed.

  • How do I remove my caller id from my samsung convoy phone so that the person I call does not see my name?

    How do I remove my caller id from my samsung convoy phone so that the person I call does not see my name?

    MojaveMoon's solution will work if there is only one person you want to block your ID from; if you want to block your caller ID from everyone, you can go to your account online, go to Change Features, and scroll down till you see Caller ID block.  Instructions say that once this is activated, you can dial *82 before any # you WANT to display your number to, but all others will be blocked.
    If you are on a Family share plan, the account owner needs to log in and choose your line to activate this feature.

  • In Finder something called 'vuuno' has suddenly appeared under Shared. I didn't knowingly connect and want to remove. Worried I've been hacked or something. What is this and how to remove permanently?

    In Finder something called 'vuuno' has suddenly appeared under Shared. I didn't knowingly connect and want to remove. Worried I've been hacked or something. What is this and how to remove permanently?

    If you are using an unsecured or shared wireless network, then it could be just another user's computer name. If your sharing settings are correct, you have no worry. However, It would appear that at least some of the other user's settings are less than optimal inasmuch as his/hers is openly being displayed.
    The next time you check into a hotel and use their wireless network, you are likely to see a number of other user's computers. Some just the name, as they share no files. While others are wide open, and their file sharing is on.

  • Call log in email inbox?? how to remove??

    Hi - help needed!
    In my blackberry email inbox, my call log is also showing. it is annoying - how to remove????
    thanks
    Solved!
    Go to Solution.

    Hi there and welcome to the forums!
    You can resolve this using the following steps (I've done the same on my Storm for the same reason as you):
    Open the phone application, then press the BB Menu button and select Options
    Choose Call Logging and then change the call logging options to None.
    This will still show an icon for missed calls, but it will remove the call log from your main messages folder.
    I hope this helps! 
    If you want to thank someone for their comment, do so by clicking the Thumbs Up icon.
    If your issue is resolved, don't forget to click the Solution button on the resolution!

  • "how to Remove message, this call is unlimited"

    When I go to make a call ,,,,,  "how to Remove message, this call is unlimited"

        Thanks for the information Poppz!
    Let me help you get to the bottom of this! Please contact a Prepaid representative for answers. In order to reach a Prepaid Department representative, please call 888-294-6804. When prompted, enter your prepaid phone number. Then press 4, 5, 4 and enter the pass code for your account.  If you do not know the pass code, enter in four zeros.  Then the system will then transfer you to a Prepaid representative.
    Thanks,
    ChristinaB_VZW
    VZW Support
    Follow us on Twitter @VZWSupport

  • I suspect a spy app on my iphone 4 that somebody watching my calls/ voice conversation. Can somebody help me to identify the app and how to remove it?

    I suspect a spy app on my iphone 4 that somebody watching my calls/ voice conversation. Can somebody help me to identify the app and how to remove it?

    No spy app can be installed on iphone which is not jailbroken.
    For example iKeyMonitor iPhone spy can not be installed without jailbroken.
    http://ikeymonitor.com

  • How can i remove recent calls indivudual?

    I have trouble to not remove recent calls one by one, is there any application to do this? help me pls

    In IOs 5 you can delete each recent call sepratly, just slide from right to left to the blue arrow from edge of the screen and it will change to delete. Just delete and it is gone.

  • ALV .  How to remove the sort buttons on toolbar in ALV report?

    Hi,experts
      As you know, in default case , the alv report will display two sort buttons(ascending ,descending) on its toolbar , So How to remove the sort buttons on toolbar in ALV report?
      Thanks for your help .

    Hi guixin,
    1. Before calling REUSE_ALV_LIST_DISPLAY
    2. Write this code :
    data : excl type SLIS_T_EXTAB.
    data : exclwa type SLIS_EXTAB.
    exclwa = '&OUP'.
    append exclwa to excl.
    exclwa = '&ODN'.
    append exclwa to excl.
    3. Then while calling the FM,
       pass this parameter also .
    IT_EXCLUDING     = excl
    It will work fantastic.
    regards,
    amit m.

  • How to remove the buttons in ALV GUI?

    Hi All,
    I am using the FM REUSE_ALV_GRID_DISPLAY for disaplying the ALV grid. i need how to remove these buttons ( mail word processing, loal file, Mail recipient,  ABC analysis, Microsoft Execl and Graphics ) from the ALV Gui?
    please give solution.
    Regards,
    Santha

    hi,
    IT_EXCLUDING TYPE SLIS_T_EXTAB OPTIONAL
    you need to append the Fucntion codes to the it_exclude and then pass it to the parameter it_excluding.
    append '&ABC' to it_excluding.
    append '&BAC' to it_excluding.
    call function 'REUSE_ALV_GRID_DISPLAY'
    IT_EXCLUDING = it_exlcuding
    Regards
    Anver

  • How to remove the characters from first and last position of a string?

    Hi all,
    I am creating an application where i am using vb script to export the data to excel.
    In the excel sheet most of the values are entered with double " quotes.
    so the entry looks like ""http://www.sap.com"".
    Notice that it is starting with "" and not " . so the vb takes it as a line feed and shows an error .
    It will be great if anybody can tell me how to remove these set of quotes ,so that the value should come as "http://www.sap.com" . A sample code wil be of great help.
    Thanks in advance,
    mahima.

    Hi,
    To modify you excel you have 2 options, 1) you can filter them in excel itself by using filter ...etc in excel itself. or 2) you can do it by using ABAP code.
    Below code may help you.
    Get the data from Excel to Internal table using FM :
    call function 'ALSM_EXCEL_TO_INTERNAL_TABLE'
      exporting
        filename                = 'c:\temp\test.xls'
        i_begin_col             = 1
        i_begin_row             = 1
        i_end_col               = w_values
        i_end_row               = 10
      tables
        intern                  = t_alsmex_tabline
      exceptions
        inconsistent_parameters = 1
        upload_ole              = 2
        others                  = 3.
    Now replace all unwanted "" in internal table with space.
    replace all occurrences of '""' in itab-field with '   '.
    Again you can export to Excel using
      call function 'GUI_DOWNLOAD'
        exporting
          filename                = lv_file
          filetype                = 'DAT'
          append                  = ' '
          write_field_separator   = 'X'
        tables
          data_tab                = itab.

  • How to remove the credit card from the Apple id?

    how to remove the credit card from the Apple id?
    plz ITS urgently

    If the option to select "None" isn't appearing when you attempt to edit your payment information, then there is likely a billing issue with your last iTunes Store purchase(iTunes didn't receive payment from your credit card company for that order). Before you can remove your credit card, you have to pay for the unpaid order. You can call your credit card company and troubleshoot the billing issue with them, or try another card, or if you live in a country that supports iTunes Gift Cards, you can redeem one of those to pay for the order. Once you have done that, you should be able to remove your credit card info as outlined in http://support.apple.com/kb/ht1918

  • How to remove an iphone from my id

    hi,
    once my friend sync-ed his iphone with my computer. then whenever he is in wi-fi zone it is asking password for my used id for updating the apps. how to change the user name in his phone or how to remove his device from my apple ID. please help.
    thanks
    karthik

    The only way to fix this is for your friend to delete all the content, on his/her phone, obtained using your ID. Fact is, that's called stealing. There is no other fix.

  • How to remove bought app from app store 'archive'

    since a while in the App store (both on iPhone or on the computer) it's possible to re-install old purchases of apps that you once downloaded and deleted. that's cool.
    more than two years ago i downloaded viber, deleted it, never re-installed or used it again.
    now a friend bought a smartphone, installed viber, and his viber app tells him i'm one of the 10 people out of all his phone contacts that is using viber.
    when he tries to message or call me of course it doesn't work, but still i'd love to have myself removed from the servers of viber, so that people don't see me anymore as one of their contacts so called using viber.
    i found an article (in Dutch) here that explains me how to remove viber from showing up in the "all purchases - not on this iPhone" part of the app store, but it explicitly tells that won't have my Apple ID disconnected from the app, it will just hide the app (it even explains how to make it show up again too)
    can somebody please tell me how i CAN have this purchase removed from my apple ID history - and thus hopefully have my 'link' removed at the Viber servers
    much thanks in advance!!

    You cannot
    You can only hide it.
    The entire point of this service is that you ahve acces to all prior purchases.

  • How to Remove EmptyPages in Microosftword using c#

    Hi,
     how to remove empty pages in microsoft word using c#, not paragraphs, section.
    i need to remove empty pages.
    please give me your advise.
    Thanks
    Karthick raja

    private bool RemoveBlankPage()
            Word.Application wordapp
    = null;
            Word.Document doc
    = null;
            Word.Paragraphs paragraphs=null;
            try
                // Start Word APllication and set it be invisible
                wordapp
    = new Word.Application();
                wordapp.Visible
    = false;
                doc = wordapp.Documents.Open(wordPath);
                paragraphs
    = doc.Paragraphs;
                foreach
    (Word.Paragraph paragraph
    in paragraphs)
    if (paragraph.Range.Text.Trim()
    == string.Empty)
                        paragraph.Range.Select();
                        wordapp.Selection.Delete();
                // Save the document and close document
                doc.Save();
                ((Word._Document)doc).Close();
                // Quit the word application
                ((Word._Application)wordapp).Quit();
            catch(Exception ex)
                MessageBox.Show("Exception Occur, error message is: "+ex.Message);
                return
    false;
            finally
                // Clean up the unmanaged Word COM resources by explicitly
                // call Marshal.FinalReleaseComObject on all accessor objects
                if
    (paragraphs != null)
    Marshal.FinalReleaseComObject(paragraphs);
                    paragraphs
    = null;
                if
    (doc != null)
    Marshal.FinalReleaseComObject(doc);
                    doc
    = null;
                if
    (wordapp != null)
    Marshal.FinalReleaseComObject(wordapp);
                    wordapp
    = null;
            return
    true;
     This link helped me complete my project
    https://code.msdn.microsoft.com/office/How-to-remove-blank-pages-e200755d

Maybe you are looking for

  • SIGSEGV on install of 9ias on Solaris

    Install says 100% complete, I am happy, but then disaster strikes - GUI disappears and I am left with Java errors:- Trigger altered. Trigger altered. SQL> SQL> Disconnected from Oracle8i Enterprise Edition Release 8.1.7.0.0 - Pron With the Partitioni

  • Plug-in failure in safari after upgrading to lion

    after upgrading to lion, seems like there is a plug-in issue - not sure if it's in safari or quicktime (i think the former).  any idea on how to fix so you can view quicktime videos on web?  already tried to reload latest (version 11) adobe flash wit

  • Do I need an interface?

    Guys, when I play a note in my guitar I hear it 1/2 second later in the monitoring....I'm pluging directly my guitar... If a use an interface will solve the problem? Is it better to use an interface ?

  • Windows Xp Service Pack 2 Firewall Problem

    I'm trying to connect 9i Database. If the firewall option of Windows Xp Service Pack 2 is turned off, then it can connect. But if it is turned on, it can't connect. I tried to open port 1521 in settings but I think I can't succeed. How can I configur

  • HOT iPhone 5S

    I got 5s for two days, and i like it a lot, but it is very hot during i use apps.want to know how many people have same problem with me. I turned off many things, like gps, bluetooth, background app refresh siri and location services! so i worried ab