Clear Library Cache

Click it to pick a time range to clear (one, two, four, or 24 hours—or everything), and what data to dump (history, logins, forms/search, cookies, and cache).

  1. Clear Library Cache Windows
  2. Oracle Data Dictionary Cache
  3. Data Dictionary Cache
  4. Unity Clear Library Cache
  5. How To Clear Library Cache
  6. Clear /library/caches
  7. Clear Library Cache

Learn how to clear cache in this easy to follow tutorial.0:44 - Clean download folder0:57 - Clean storage1:18 - Clean Chrome cache1:30 - Clean Edge cache1:49. Temporary file is a common type of cache in your computer. By default, temporary files are stored in the path of C: Users Admin AppData Local Temp. To clear them, you can press Windows + R to open Run window, input%temp% and click OK to open the Temp folders. Then, delete all the temporary files and folders in it. Caches store information that Mac system or applications need to quickly launch service. Generally, you may not notice this part of data in your MacBook Air until you need to delete unneeded files to get more space or clear cache to fix software problems. From your Steam Client, open the Settings panel by selecting 'Steam Settings' from the top left client menu. In the Settings panel, select the Downloads tab and you'll find the 'Clear Download Cache' button at the bottom. Then select 'OK' to confirm and acknowledge that you'll need to login to Steam again.

Well, as I have already shown, I like to work in the area of troubleshooting and performance because every incident is a battle and you will never imagine what you will find as a problem and how the case will end. One tip I leave here ... always have good weapons in the battle for it to end quickly.

Today, I'd like to share another example troubleshooting with the library cache lock event, which for me is one of the hardest to find root cause. This example I am going to show is just one example because we know that there are many causes about the 'library cache lock' event and another point is the difficulty of finding the offender, and that often due to the pressure to resolve the fast incident, we can not find the root cause and for sure your Manager will request the root cause of the incident. But in this case I had TIME to investigate before killing, not needing to restart the entire database or kill almost every session of the Database without knowing what the offender was.

Before we start the analysis we will understand a little about the event library cache lock:

What is 'Library cache lock' ?

This event controls the concurrency between clients of the library cache. It acquires a lock on the object handle so that either:

  • One client can prevent other clients from accessing the same object.
  • The client can maintain a dependency for a long time (for example, so that no other client can change the object).

This lock is also obtained to locate an object in the library cache.

Library cache lock will be obtained on database objects referenced during parsing or compiling of SQL or PL/SQL statements (table, view, procedure, function, package, package body, trigger, index, cluster, synonym). The lock will be released at the end of the parse or compilation.

Cursors (SQL and PL/SQL areas), pipes and any other transient objects do not use this lock.

Library cache lock is not deadlock sensitive and the operation is synchronous.

Oracle library cache

From my experience this library cache lock event occurs mainly in large databases with concurrency in the Shared Pool when we perform the following activities:

- Execution of DDL as Object Recompilation.

- Execution of Grant on very busy objects. But Grant Bruno? Yes, a grant depending on the use of the object and the size of the database may rather have a memory lock.

- Collection of statistics during peak hours.

- Run SQL analyze, Advisor Tunig for a long time.

- In general, the problem may be generated because of administrative tasks that should be performed outside of business hours, but I have already encountered Bug with ORA-0600 error with the event library cache lock. So each case a case and needs to be well analyzed.

Analyzing ASH (active session history) ... and using Oracle Enterprise Manager you will find that you will find a high volume of sessions waiting for the library cache lock and the OEM will not easily show the offender to you.

Symptom: Increasing Active Sessions and a Contention in the Database with the event library cache lock - Wait Class Concurrency

Let’s go to troubleshooting…

Now let's investigate the AWR report at the time of database contention.

Analyzing the AWR we can verify that 89% of the DTIME of the database in the contention period was the event library cache lock.

Analyzing AWR in the 'SQL ordered by Elapsed Time' topic we can check the SQLs that have the most waits from the event cache lock lock and killing those SQLs will not resolve the contention, I say that for sure, because I tried it.

Analyzing AWR in the 'SQL ordered by Sharable Memory' topic also does not show the offender.

Analyzing AWR in the 'SQL ordered by Version Count' topic also does not show the offender.

So how to find the contention offender of the library cache lock event?

So how do I say Shared Pool contention for me is one of the most difficult because we generally do not have much time to run some collections because of the seriousness of the incident because it is a very critical database in which it generates a lot of financial impact for the company. If you are lucky like me in this case, I suggest running HANG ANALYSIS as below and if you can collect well at the exact moment of contention you will get the offender.

To run HANG ANALYSIS and Systemstate we have 2 ways:

1-Form of Execution for Single Instance Environments:

sqlplus / as sysdba

oradebug setmypid

oradebug unlimit

oradebug hanganalyze 3

oradebug dump systemstate 258

2 - Form of execution for RAC ambitions:

oradebug setmypid

oradebug unlimit

oradebug -g all hanganalyze 3

oradebug -g all dump systemstate 258

Well, we go to the result of HANG ANALISYS and Systemstate that I collected to try to find the contention offender…

*** 2018-02-21 16:07:45.815

HANG ANALYSIS:

instances (db_name.oracle_sid):

oradebug_node_dump_level: 3

analysis initiated by oradebug

Chains most likely to have caused the hang:

[a] Chain 1 Signature: <not in a wait><='library cache lock'<='library cache lock'

Non-intersecting chains:

------------------------------------------------------------------------------

Chain 1:

-------------------------------------------------------------------------------

Oracle session identified by:

{

instance: 1 (abcd)

os id: 88112

process id: 961, oracle@machine1

session id: 70

session serial #: 13391

}

is waiting for 'library cache lock' with wait info:

{

p1: 'handle address'=0xba9ecd01a8

p2: 'lock address'=0xb313e4baf8

p3: '100*mode+namespace'=0x3ead800010002

time in wait: 7 min 52 sec

timeout after: 7 min 7 sec

wait id: 85

blocking: 0 sessions

current sql: SELECT * FROM 'MDES_XX_ALTERADO'

wait history:

* time between current wait and wait #1: 0.000342 sec

1. event: 'SQL*Net message from client'

}

and is blocked by

=> Oracle session identified by:

{

instance: 1 (abcd)

os id: 91878

process id: 1234, oracle@machine1

session id: 2155

session serial #: 5794

}

which is waiting for 'library cache lock' with wait info:

{

p1: 'handle address'=0xba9ecd01a8

p2: 'lock address'=0xb3423fe0e0

p3: '100*mode+namespace'=0x3ead800010003

time in wait: 10 min 31 sec

timeout after: 4 min 28 sec

wait id: 46

blocking: 137 sessions

current sql: INSERT INTO DADOS (msg_id,msg_id2,msg_id_serv,split_row_num,ext_tracking_id, trans_id,element_id,type_id_usg,orig_type_id_usg,rate_class, bill_class,provider_id,jurisdiction,rate_currency_code, account_no,subscr_no,subscr_no_resets,external_id,external_id_type, point_origin,point_id_origin,country_code_origin,

wait history:

* time between current wait and wait #1: 0.001148 sec

1. event: 'SQL*Net message from client'

}

and is blocked by

=> Oracle session identified by:

{

instance: 1 (abcd)

os id: 30462

process id: 65, oracle@machine1

session id: 4102 <<<<<<<<<<<<<<<<<<<<<< Offender Session.

session serial #: 39087

}

which is not in a wait:

{

last wait: 0.000000 sec ago

blocking: 138 sessions

current sql: /* SQL Analyze(4102,0) */ SELECT XXT_PERIOD CICLO, JD.ACCOUNT_CATEGORY, JD.ID_VALUE, JD.MKT_CODE, JD.REV_RCV_COST_CTR, JD.ACCOUNT_NO, JD.SUBSCR_NO, JD.SUBSCR_NO_RESETS, JD.ELEMENT_ID, FU.UNITS_FREE UNITS_FREE, SUM(CD.RATED_UNITS) USAGE_UNITS, JD.REPORTED_AMOUNT REPORTED_AMOUNT, JD.INVOICE_AMOUNT INVOICE_AMOUNT, UT

wait history:

1. event: 'db file sequential read'

time waited: 0.000368 sec

wait id: 53223005 p1: 'file#'=0x2ac

p2: 'block#'=0xc6d44

Clear Library Cache Windows

p3: 'blocks'=0x1

Cause: By analyzing HANG ANALYSIS, it was possible to identify Session 4102 by running SQL Analyzer possibly a Tuning Advisor from 02/20/2018 at 10am and was causing library cache lock contention.

Below the SQL that Session 4102 was running:

Current sql: / * SQL Analyze (4102,0) * / SELECT XXT_PERIOD CYCLE, JD.ACCOUNT_CATEGORY, JD.ID_VALUE, JD.MKT_CODE, JD.ACV_COST_CTR, JD.ACCOUNT_NO, JD.SUBSCR_NO, JD.SUBSCR_NO_RESETS, JD. ELEMENT_ID, FU.UNITS_FREE UNITS_FREE, SUM (CD.RATED_UNITS) USAGE_UNITS, JD.REPORTED_AMOUNT REPORTED_AMOUNT, JD.INVOICE_AMOUNT INVOICE_AMOUNT, UT

Solution: Executing kill only in the Session 4102 that was causing Library Cache Lock contention, the Database returned to normal.


Reference: Doc ID 444560.1


I hope I’ve helped.

Thank you and regards.

Bruno Murassaki

The cache memory of RAM is a very small portion of the standard memory of your system, but the cache memory operates at a very high speed, allowing the applications/ programs to utilize its speed to run its users faster. But, sometimes due to memory leak or some bad exe files the amount of free cache memory can decrease, which eventually slows down your computer.

How to clear RAM cache memory using

1 – Download RAMMAP from Microsoft Official website

2 – Extract it on your PC.

3 – Now, Click on RAMMap to Run the program on your PC

4 – Now, click on Empty and then click on Empty Standby list.

Make your computer automatically clear RAM cache memory

Follow these easy steps to free cache memory on your system-

1. Download EmptyStandbyList on your computer.

2. Choose a particular place and then click on “Save” to save the application.


Clear Library Cache

Close the browser window.

3. Click on the Search box beside Windows icon and type “Task Scheduler“.

4. Click on “Task Scheduler” from the elevated Search result to open Task Scheduler.

5. In the Task Scheduler window, on the right-hand side, click on “Create Task…“.

6. In Create Task window, name the task “Cache Cleaner“.

7. Now, click on “Create User or Groups…“.

8. Click on “Advanced“.

9. In Select User or Groups window, click on “Find Now“.

10. In the Search results: scroll down and then select “SYSTEM“.

11. Finally, click on “OK” to save the changes.

12. Now, click on “OK” to save the changes.

13. Coming back to Create Task window, checkthe option “Run with highest privileges“.

14. Click on the drop-down beside ‘Configure for:’ and select “Windows 10“.

Oracle Data Dictionary Cache

15. Now, go to the “Triggers” tab.

16. Click on “New…“.

17. In the New Trigger window, under ‘Advanced settings‘ set the ‘Repeat task every:’ to “5 minutes“.

18. And set ‘for a duration of:‘ to “Indefinitely“.

19. In the same window, checkthe option “Enabled“.

20. Click on “OK” to save the trigger settings.



21. Now, go to the “Actions” tab.

22. Then, click on “New…“.

23. In the New Action window, click on “Browse“.

24. Now, navigate to the location where you have downloaded the ‘EmptyStandbyList‘ application.

25. Select the application and then click on “Open“.

26. Now, click on “OK” to save the action.

27. Coming back to the “Create Task” window, click on “OK” to save the task.

28. In the Task Scheduler window, click on “Refresh” to refresh the tasks list.

That’s it! From now on at a regular interval of 5 minutes, this ‘Cache Cleaner‘ task will automatically run on your computer to clean cache memory.

NOTE

Data Dictionary Cache

In case if you want to delete this task, follow these simple steps to do so-

1. In the Task Scheduler window, on the left hand, select “Task Scheduler Library“.

2. On the right-hand side of the same window, scroll down to see the task “Cache Cleaner“.

Unity Clear Library Cache

3. Now, right-click on “Cache Cleaner“.

How To Clear Library Cache

4. Then, click on “Delete” to delete the task from your computer.

5. Click on “Yes” when you will be asked for confirmation.

Clear /library/caches

The ‘Cache Cleaner‘ task will be deleted from your computer.

Sambit is a Mechanical Engineer By qualification who loves to write about Windows 10 and solutions to weirdest possible problems.

Clear Library Cache

Related Posts: