Is TOP a resource intensive query.

Hi,
We are using TOP to monitor load on LInux production server.
I just wanted to know if TOP is a resource intensive command?
Whether TOP adds up to the load on server. Say for example TOP running simultenously from 5/6 putty sessions.
Regards,

Running top with default parameters is not a resource intensive process. There were issues with long running top sessions in the past, with ported versions of the top command on certain Unix platforms, but Linux was not affected. I don't think you will notice a performance issue running several top sessions. You can easily test it. Whether or not the top utility is the right tool for what you are trying to accomplish however is a different question.

Similar Messages

  • Top resource intensive processes on AIX/Unix/Linux

    top is good to find this out, topas on aix, any other tips to find out memory/IO resource intensive processes, here i have for cpu....
    oracle:tulpfsd01$ ps -e -o pcpu -o pid -o user -o args | sort -k 1 | tail -5r
    %CPU PID USER COMMAND
    1.1 1230914 oracle oraclepwpd (LOCAL=NO)
    0.9 1248744 oracle oraclepwpd (LOCAL=NO)
    0.9 1099146 oracle oraclepwpd (LOCAL=NO)
    0.6 503688 oracle oraclepwpd (LOCAL=NO)
    0.5 1239486 oracle oraclepwpd (LOCAL=NO)

    Generally, memory shouldn't be a concern. The total amount of SGA is set (fixed) with SGA_MAX_SIZE and occupies shared memory (to be seen with 'ipcs')
    The PGA is set by PGA_AGGREGATE_TARGET, but is only a rough pointer for oracle. Additional information about memory is seeable with pmap (alt least on linux and solaris)
    You'll see the loaded shared libraries (which are used by the process in a shared matter, so not any process which uses libraries copy their own versions, and you should be able to identify the shared memory (identified with shmid=0xsomething) etc. On linux /proc/<pid>/maps shows the same in a little different way.
    Now we've established that the shared libraries are used shared to preserve memory, and the shared memory is used shared (quite obviously), and 'put' into the process' address space, you should understand why listing VSS (virtual set size) and other memory stuff isn't very helpful: if you just add all listed used memory, there are much components which are not really used by that process.
    Top and topas are helpful for finding CPU intensive processes. That is what both are designed for, to be able to identify the processes which are using the most slices of processor time. Of course, it's only helpful if you truly want to identify top CPU intensive processes. This is also quite easy to find inside the database.
    IO: there's no way to identify processes which are the most intensive writers. Simple because linux doesn't keep statistics about it. Inside the database, it's easy to find (guess you should need an example of that?) please mind you should be aware how the database works: a user process does no writing, it's the logwriter, checkpointer and database writer who does that. The user process only reads.
    I will see if I can find some nmon examples tomorrow, when I've got access to AIX systems.
    If you still want examples, could you be specific?

  • SQL to find top 5 resource consuming queries

    I am new to DBA activities. Can someone please send me a query to find the top 5 resource consuming sql in the database.
    Thanks

    Sometimes I'm using this one:
    SELECT SUBSTR (a.sql_text, 1, 50) sql_text
    ,TRUNC (a.disk_reads / DECODE (a.executions,
    cutions, 0, 1, a.executions)
    ) reads_per_execution
    ,a.buffer_gets, a.disk_reads, a.executions,
    cutions, a.sorts, a.address
    FROM v$sqlarea a
    WHERE ROWNUM <= 5
    ORDER BY 2 DESC;
    Slightly modified...
    SELECT * from
    (SELECT a.sql_text sql_text
    ,TRUNC (a.disk_reads / DECODE (a.executions, 0, 1, a.executions)
    ) reads_per_execution
    ,a.buffer_gets, a.disk_reads, a.executions, a.sorts, a.address
    FROM v$sqlarea a
    ORDER BY 2 DESC)
    WHERE ROWNUM <= 5;
    Daniel

  • Problems when i try to run a WebI query on top of a BW query

    Hi, people,
    All the time i try to run a query in WebIntelligence on top of a BW Query it raises the error message "A database error ocurred. The database error text is: Unable to create a cube. The connection is not connected to a cube (WIS 10901)".
    My installation is BOE XI 3.1 SP2 with IK for SAP SP2 on a Linux  Suse 64 bits environment.
    I did all the transports in BW side with the same patch level (SP2).
    any help, pls?
    thank you very much.
    Cesar.

    Hi Ingo,
    Here the answers:
    are you able to run the BW query in transaction RSRT ? YES
    does this happen even with a very simplified Web Intelligence report ?  YES
    does it happen with all reports on top of BW or only with a specific one ? it happens with all reports
    I saw the SAP notes 1282118 where I can find the same error, although in my case it is not an upgrade, but a new installation. It seems that some library for SAP Connectivity is not OK.
    Any help, pls?
    Thank you
    Cesar

  • Exclude top 10 in BEx query

    Hi Experts,
    I need to exclude top 10 from the query result. Creating condition in the query with top 10 is easy but how to exclude the top 10 in the query output? Thanks

    Hi Waseem,
    Have you tried  Ninand Warang procedure . Is it working or not?
    If not you have use the APD concept
    create a query on top of that infoprovider with out any conditions..
    Create A direct update dso..
    In APD use Query as source and DSO as target. In between use ABAP program sort them > delete the first 10 records>
    Create a query on top of DSO  will get the Excluding TOP 10.
    Hope it helps..
    Regards,
    Ranganath.

  • Is opportunity to resize images resource-intensive?

    Hello to ALL!!!
    I'm trying to make a site with image gallery(for example -
    pets).And I've thought about optimal size of full image. I've
    chosen 640x480. And I'm going to use <imageresize> command
    for images greater than 640/640. But I don't know(in practice) is
    it a good idea to give opportunity to people to resize their images
    with code of my site? I mean how resource-intensive this process
    for a server? And what will happen if for example 500 people will
    want to make "resize operation" at the same time?
    Thank you for your coments/answers!

    if you are seriously going to have 500 people resizing at
    once, I would
    suspect you might have issues.
    But for just average occasional uploads, you should be fine.
    In my work so far with simple or even large batch resizing, I
    have not
    seen any major drag.
    In fact I am overall very impressed with the speed and
    quality of image
    resizing in CF8.
    a bit OT:
    here's a post about some code i've been working on for
    batch-resizing in
    multiple folders, coupled with a jquery photo gallery ... if
    you *or any
    other cf users* are interested, I am looking for testers
    http://www.miuaiga.com/index.cfm/2008/10/14/CF-Gallery-Creator--jQuery-Slider-Gallery
    Michael Evangelista, Evangelista Design
    Web : www.mredesign.com Blog : www.miuaiga.com
    Developer Newsgroups: news://forums.mredesign.com

  • Iterator resource intensive?

    Hi guys,
    My code is below:
    HashMap documentMap = new LinkedHashMap();
              for (Iterator it = folderInfoMap.keySet().iterator(); it.hasNext();) {
                   String key = (String)it.next();
                   FolderInfo folderInfo = (FolderInfo)folderInfoMap.get(key);and I has been using iterator to loop thru all the Collection object many years. However, some joker in my office telling me that I shouldn't use iterator as it's resource intensive. he asked me to use for loop like below instead:
    for(int x=0;x<documentMap.size();x++{
    documentMap.get(x);
    }and he said that the for loop is much lesser in using resources. Any ideas?
    or we should convert collection to array then loop it thru like this link mention:
    http://www.exampledepot.com/egs/java.util/coll_GetArrayFromVector.html
    please help, Thanks !
    Thanks & Regards,
    Mark

    It's not a traversal.
    It's a way of describing algorithmic complexity, i.e. the running time of algorithms, ignoring constant factors, i.e. concentrating only on the 'order' of the variables. The big O stands for 'order'. For example, bubble sort is an O(N**2) operation and is therefore avoided: decent sorting algorithms are O(N*log(N)) which gives them a better growth factor as N increases.
    In your case, direct access to a HashMap is independent of the number of entries so it is described as an O(1) operation ('an operation of order 1'). Direct access to an element of a linked list takes time proportional to the length of the list, N, so it is an O(N) operation. Traversing a LinkedHashMap requires N operations of O(N) each so it is O(N**2) or 'order N squared'.
    The time to do an O(1) operation is constant.
    The time to do an O(N) operation is a multiple of N.
    The time to do an O(N**2) operation is a multiple of N squared.
    So you can see how your Iterator code stacks up against the office joker's for N=1, 2, 4, 8, ... 32768, 65536, ... Every time you double N, yours doubles in time, his quadruples, because of N versus N squared.

  • Unable to use SSO with universe connection on top of SAP BW query

    Hi,
    We're creating a universe on top of a SAP BW query by using universe designer.
    We logon to universe designer by using SAP credential.
    When creating the connection, we set the option "Use Single Sign On when refreshing reports at view time" in order to logon to BW server. But when clicking next, an error arises:
    "DBD: Unable to connect to SAP BW server Incomplete logon data"
    The strange thing on this is that there is one laptop which is able to set up this kind of connection, while all other workstations are not able to set it because they recieve that error (we all work against the same BO server). So this looks like an installation issue.
    We reinstalled SAP Integration Solutions on those workstations, but problem is still the same.
    I found thread: Universe Connection Authentication on SAP BW which talks about the same issue, but solution involves uninstalling Xcelsius. But we do need Xcelsius!
    Any suggestions?
    Thanks,
    David.

    >
    Ingo Hilgefort wrote:
    > Hi,
    >
    > - how did you enter the SAP credentials when logging on ?
    username/password with sap authentication
    >
    > - are you using a application server or a message server for the connection ?
    Application server
    >
    > - SAP GUI is installed ?
    SAP GUI 710 patch 11
    >
    > - SAP Integration Kit is installed ? is it a full keycode or a temp keycode ?
    SAP Integration Solutions with temp keycode
    >
    >
    > thanks
    > Ingo

  • OIM 9.1.0.2 Resource Profile Query

    Hello
    I need to get the usr_key or any info on the users in OIM that have a certain condition. I have a number of OID resources for users that have a status or 'provisioned' but when looking at the resource tasks the system validation is set to 'cancelled'. Due to this, updates are not flowing to these users. I am looking through the tables to try to find the resource task list and the status info so I can find the system validation cancelled and location those users. Does anyone have a query to search through and find all users with system validation = canceled and resource status as provisioned? Any help you can give would be appreciated.
    Thanks
    Nick

    I'm positive there's a great way to do it with SQL, but you'll need to look at 4 tables:
    1) OBJ (Objects) - Here you are looking in OBJ_NAME for 'OID User', once found get the OBJ_KEY value for the row.
    2) OST (Object Status) - In this table, you can find all the statuses for the OID User resource based on the OBJ_KEY value. Look for the applicable ones and get the OST_KEY value for each row.
    3) OIU (Object Instance for Users) - Now you can query this table for all results where OST_KEY equals the desired values as found in step 2.
    4) USR (Users) - Here you can get the User ID's (usr_login), User Key (usr_key) or any other value for users to help with the query.

  • Resource hungry query

    Friends
    I had used the following query for an update statement:
    UPDATE target_table tar
       SET (tar.flag1, tar.flag2, tar.flag3, tar.flag4, tar.flag5, tar.flag6,
            tar.flag7, tar.flag8, tar.flag9, tar.flag10, tar.flag11, tar.flag12,
            tar.flag13, tar.flag14, tar.flag15) =
              (SELECT src.flag1, src.flag2, src.flag3, src.flag4, src.flag5,
                      src.flag6, src.flag7, src.flag8, src.flag9, src.flag10,
                      src.flag11, src.flag12, src.flag13, src.flag14, src.flag15
                 FROM src_table src
                WHERE src.date_col = tar.date_col AND src.cust_id = tar.cust_id)
    WHERE EXISTS (
                  SELECT 'x'
                    FROM src_table src
                   WHERE src.date_col = tar.date_cole
                         AND src.cust_id = tar.cust_id)But I got a message from our DBAs that this query is very resource hungry causing outage & job abends. When I did explain plan for this query, I got the following output:
    UPDATE STATEMENT 
    UPDATE  target_table
      PX COORDINATOR 
       PX SEND QC (RANDOM) :TQ10002
        HASH JOIN RIGHT SEMI BUFFERED
         PX RECEIVE 
          PX SEND HASH :TQ10000
           PX BLOCK ITERATOR
            INDEX FAST FULL SCAN src_table_index
         PX RECEIVE 
          PX SEND HASH :TQ10001
           PX BLOCK ITERATOR
            TABLE ACCESS FULL target_table
      TABLE ACCESS BY INDEX ROWID src_table
       INDEX RANGE SCAN src_table_indexNow if I change this query to the following:
    UPDATE target_table tar
       SET (tar.flag1, tar.flag2, tar.flag3, tar.flag4, tar.flag5, tar.flag6,
            tar.flag7, tar.flag8, tar.flag9, tar.flag10, tar.flag11, tar.flag12,
            tar.flag13, tar.flag14, tar.flag15) =
              (SELECT src.flag1, src.flag2, src.flag3, src.flag4, src.flag5,
                      src.flag6, src.flag7, src.flag8, src.flag9, src.flag10,
                      src.flag11, src.flag12, src.flag13, src.flag14, src.flag15
                 FROM src_table src
                WHERE src.date_col = tar.date_col AND src.cust_id = tar.cust_id)And then I do explain plan, I get the following results:
    UPDATE STATEMENT 
    UPDATE  target_table
      PX COORDINATOR 
       PX SEND QC (RANDOM) :TQ10000
        PX BLOCK ITERATOR
         TABLE ACCESS FULL target_table
      TABLE ACCESS BY INDEX ROWID src_table
       INDEX RANGE SCAN src_table_indexDoes that mean that using 'where exists' is not a good option?
    Thanks

    Tuning updates is very tricky - especially those with subquries!
    You're performaing a full index scan on the source table but a full table scan on the target table. I could not tell the query cardinality from the postings, but since the parallel query option is being employed I'll assume a large amount of data is being processed.
    Is the full table scan on the target table necessary? Would an index on the WHERE clause columns from the target table prevent this and use fewer system resources to perform the update?
    You are also reading the source data twice, for each subquery. This may be necessary :( ; maybe Karthick's MERGE can avoid this. You're doing a full index scan against the source table, which is similar to a full table scan except you are only reading the keys from the index - better, but like a FTS you are readling all of the rows. Is this necessary?
    WHERE EXISTS() is usually a good option, although not when a full table scan is performed. You need a way to avoid the FTS.
    The parallel query option can do one of three things: help performance, hurt performance, or do nothing. It can help with the full table and full index scans you are doing so it may be helping. How much data are are you updating (bytes and rows)?
    If you have the licence partitioned tables might help performance by partitioning both the source and target tables by the same partition key. In that case SQL can match smaller sets of data (the partitions) and run more efficiently. This might help if you are processing a lot of data - as you seem to be.
    Good luck!
    Edited by: riedelme on Jan 5, 2010 8:04 AM

  • How do I select top 100 records in query

    I would like to get only the first 100 or 200 records in a query. In Access query, it is TOP 100, is there an equal in Oracle sql?
    Thanks!

    select * from your_table
    where rownum < 101;

  • Unable to develop universe on top of my BW query

    Dear all expert,
    I have the following situation. i have a BW query, i have check the "allow external access". but when i want to develop the universe on top of it, it show me empty field. then i try to develop a crystal report on top of it, but when i search the query, i did not see anything.
    How could this happened? the previous query that i had develop and check the " allow external access" option, i can develop universe or CR with it.
    Thank You.

    Hi,
    is the user allowed to see the BEx query ?
    can the user see the query in transaction RSRT ? in transaction MDXTEST ?
    did you check the authorizations ?
    Ingo

  • SAP BO WebI Report on top of BI Bex Query with Authorization Variable

    Hi,
         We are trying to restrict row level data using BI 7.0 analysis authorization concept. We have an authorization variable in the Bex query and is working perfect in Bex Analyzer as well as in RSRT.
    Now we are trying to achieve the same thing in BO webI. We created an Universe using Authentication Mode SSO. We are on BOXI 3.1 and implemented SSO. When we try to run the query in WebI we get the error
       "A database error occured. The database error text is: Error in MDDataSetBW.GetCellData..(WS 10901)"
    Just for testing purpose, when we use query filter in WebI and use Values from List, it is showing only the authorized value it supposed to show and runs well with that value selected. But we have to achieve this without the query filter in WebI.
    So are we missing some thing here or any patch issue? Please share if you have done this type of reports in BO.
    Thanks in advance for your help.
    Moorthy.

    Yes I did run MDXTEST and it gives error as 'you do not have sufficient authorization'. The reason it is giving, I guess and we are debugging that to confirm, is first it looks for 0BI_ALL and throws error which is not the case in Bex. See the following trace in RSRT trace.
    InfoObject Properties Defined
    Reading of Directly Assigned Authorizations
    Direct Assignment Does Not Include Universal Authorization 0BI_ALL
    Reading the Indirect Assignments with Authorization Object S_RS_AUTH
    Does user have OBI_ALL?
    No, the User Does Not Have Universal Authorizion 0BI_ALL
    Negative Entry in SU53 Result of Failed Check for 0BI_ALL
    Indirect assignments found; no universal authorization
    Reduction of Authorization Dimensions on Characteristics in InfoProvider
    Reduction Successful
    Thanks!
    Moorthy

  • Crystal report on top of a BW query

    Hi,
    We are using BO XI3 with the SAP integration kit. We have built crystal reports on top of BW queries in Crystal Reports 2008 (installed with the SAP integration kit). Queries work fine when we launch them with the client of Crystal reports.
    Problems arrive when we try to launch these crystal reports on the business object server. We can run reports without parameters, but we receive an error message for all the crystal reports that include parameters. The error message is "Servlet execution threw an exception".
    If anyone has an idea to solve the issue...
    Thanks,
    Gabriel

    Hi,
    The problem came from the installation setup that didn't work because the folders are defined the same way fro Tomcat 5 and Tomcat 5.5. In Tomcat 5.5, a folder missed and the installation was not complete.
    Thank you for your help,
    Gabriel

  • Select top row in Single Query?

    Hi
    Can somebody help me to write a query to get the first row after order by clause using single query alone.
    Example:
    I can write following query to select first row
    select * from (selec * from t order by col1) where rownum = 1;
    But here I should not use inline view to get the result. Because my original requirement needs to use this query in select list and it needs to use a column (of a table from the FROM clause) in the where clause of inline query. Because there is restriction that we can not use the column (of a table from the FROM clause) more than one level of inline query.
    Please help me.

    Raghav.786 wrote:
    Hi
    Can somebody help me to write a query to get the first row after order by clause using single query alone.
    Example:
    I can write following query to select first row
    select * from (selec * from t order by col1) where rownum = 1;
    But here I should not use inline view to get the result. Because my original requirement needs to use this query in select list and it needs to use a column (of a table from the FROM clause) in the where clause of inline query. Because there is restriction that we can not use the column (of a table from the FROM clause) more than one level of inline query.
    Please help me.
    What Oracle version are you?
    If you have 12c you can use
    select col1,...
      from t
    order by col1
    fetch first 1 row only;
    If less than 12c, you have can't do it without a subquery.
    What are you actually trying to do? Read Re: 2. How do I ask a question on the forums?
    and follow the advice there by giving example create table and insert sample data statements and
    explaining clearly what you are trying to do. Then we can help more.

Maybe you are looking for