Who is using my swap space?

Most of the time, I post entries in this blog to share knowledge with others. Sometimes, I post an entry so that in the future, I can quickly find an answer to something I know I forgot. This is one of those times. If other’s find this useful, great!

I’ve been working on a Linux system that has had some memory-related issues for one of my Oracle databases. I ended up needing to increase the swap space as it was set too low. After swap was increased, I saw some swap space being used and I wanted to know if this was Oracle using swap or something else. So who is using my swap space on this Linux system? I can run the following command to find out.

for file in /proc/*/status ; do awk '/VmSwap|Name/{printf $2 " " $3}END{print ""}' $file; done | sort -k 2 -n

During usa cialis such a scenario, a professional will ensure that use this encryption. With a wide range of products n diverse forms such as cialis properien , cialis soft, cialis properien super active, robertrobb.com super force or jelly. You will viagra generic online get your medicine at your doorstep at very cheaper cost. It also relieves you from intestinal gas, cialis in india diabetes, muscular pain, cough and diarrhea. The output is sorted in ascending order with the most egregious offenders at the bottom of the list.

To sort in reverse order and then stop the output from scrolling off the screen, use this version instead.

for file in /proc/*/status ; do awk '/VmSwap|Name/{printf $2 " " $3}END{ print ""}' $file; done | sort -k 2 -n -r | less

TNS-12519 w/o Max Processes Reached

I got a call from someone that they were getting TNS-12519 errors in their application. Sure enough, those messages were in the listener.log file as well.

TNS-12519: TNS:no appropriate service handler found

For those that aren’t familiar with this error, it typically means one of two things. Either the service name is not registered with the listener or that the database has reached its maximum number of processes. For the latter, what happens is that the Listener knows that the database can’t accept any new processes so it takes the service name out-of-service so to speak. A quick “lsnrctl status” shows me that the service name is registered correctly. So it must be the latter. I then issue the following query and confirm my suspicions.

 

SQL> select resource_name,current_utilization,max_utilization
 2 from v$resource_limit where resource_name='processes';
RESOURCE_NAME   CURRENT_UTILIZATION MAX_UTILIZATION
--------------- ------------------- ---------------
processes                       299             300

Sure enough. I’ve reached max processes, which is defined in my SPFILE to be 300. I increased the parameter to 600 and bounced the instance.  We hit the error again with double the number of processes. I obviously need to dig into this further.

For some background, and for something that will be important later on, it is important to know that this database supports our automated testing efforts. We have a test harness that exercises our primary production application. This test suite launches the application, connects to the database, pushes a few buttons and selects a few menu items and then disconnects.

I examined the listener.log file to see where the connection requests were coming from. These requests were coming from a rogue application server, not our test suite. I knew something was amiss because we had not yet started the test suite and we were getting the errors. We fixed the application server and I didn’t see the errors return. We then fired up the test suite and some time later, the TNS-12519 errors returned. Hmmm…I thought I found the culprit. But let’s check our process utilization.

SQL> select resource_name,current_utilization,max_utilization
 2 from v$resource_limit where resource_name='processes';
RESOURCE_NAME   CURRENT_UTILIZATION MAX_UTILIZATION
--------------- ------------------- ---------------
processes                       89             157

 

So I’m currently seeing 89 processes with a maximum utilization of 157. I’m nowhere near my new limit of 600. So what gives? It took me awhile to figure out what the issue was. The service name is correctly registered and I’m nowhere near my limit. MOS NOTE 552765.1 talks about how the Listener arrives at the TNS-12519 error. Previously, I was seeing the most common cause. Max PROCESSES had been reached. But not this time So what gives?

After investigation, I found my answer in the listener’s log. But it wasn’t obvious like some big error message. The first occurrence of the TNS-12519 error was at 9:38 am.  I grep’ed for “service_update” in the listener log and saw these entries.

25-JUN-2015 09:17:08 * service_update * orcl * 0
25-JUN-2015 09:17:26 * service_update * orcl * 0
25-JUN-2015 09:17:29 * service_update * orcl * 0
25-JUN-2015 09:17:44 * service_update * orcl * 0
25-JUN-2015 09:17:50 * service_update * orcl * 0
25-JUN-2015 09:17:53 * service_update * orcl * 0
25-JUN-2015 09:18:56 * service_update * orcl * 0
It is always better to start with the lowest cost with the other company. sildenafil generic uk For firm and hard erections it is essential to consult a doctor, before taking any sort  sildenafil from india of contraceptive pill. So, buy some ginseng tea tablet viagra http://www.devensec.com/meetings/FY2017_Audit.pdf and health supplements. But Obama is not alone in his adherence to the Cheap Energy Contract means that adding an energy levitra prescription http://www.devensec.com/sustain/DEEC_Overview%20_2011.pdf tax of almost any kind is considered to be political suicide as well as any actions that could be construed as raising energy prices viewed from the perspective of a future political campaign. 25-JUN-2015 09:18:59 * service_update * orcl * 0
25-JUN-2015 09:19:50 * service_update * orcl * 0
25-JUN-2015 09:20:11 * service_update * orcl * 0
25-JUN-2015 09:21:27 * service_update * orcl * 0
25-JUN-2015 09:22:09 * service_update * orcl * 0
25-JUN-2015 09:24:05 * service_update * orcl * 0
25-JUN-2015 09:27:53 * service_update * orcl * 0
25-JUN-2015 09:29:32 * service_update * orcl * 0
25-JUN-2015 09:34:07 * service_update * orcl * 0
25-JUN-2015 09:41:45 * service_update * orcl * 0

Notice that this service update occurs regularly at 9:17 and 9:18, but the time between the service updates takes longer and longer. Notice that there was 8 minutes 38 seconds between service updates at the end (9:34 to 9:41). Why is this important?

This is an Oracle 11.2.0.4 database. For 11.2 and earlier, PMON is responsible for cleaning up after processes and for passing information to the Listener. On database startup, PMON tries to register the services with the Listener. One other thing PMON does is to tell the Listener how many max processes can be serviced. In this case, PMON tells the listener that it can have up to 600 processes. PMON does more, but for purposes of this discussion, that’s enough.

One important piece to know is that the Listener never knows how many processes are currently connected. It only knows how many connection requests it has helped broker. The Listener never knows if processes disconnect from the database. The service_update above is where PMON is telling the Listener how many processes are actually being used. So at 9:34:07, the PMON service update tells the Listener that there are 145 processes in use. The Listener is now up-to-date. When a new connection request comes in, the Listener increments this to 146 processes. Between the service updates, the Listener is totally unaware that 1 or more processes may have been terminated, normally or abnormally. It keeps incrementing its count of processes until the next service update when the Listener gets an accurate account of how many processes are spawned.

So we have that 8.5 minute gap between service updates. Why did it take PMON so long to get back to the Listener? Well the clue for that is in the listener.log as well. I stripped out everything from the log prior to the 9:34 service_update and after the 9:41 service update. From there, it was easy to grep for “(CONNECT_DATA=” in what remained and pipe to “wc -l” to get a count of lines.

During this 8.5 minute interval, I had well over 450 new connection requests! Yet most of those new connections terminated as evidenced by V$RESOURCE_LIMIT showing me that I had a max of 150.  PMON was so busy cleaning up for the application exiting its database connections that it had a big lag before it updated the Listener. As far as the Listener was concerned, the 150 current connections plus the 450 new connections meant that it reached its limit of 600.

PMON can take up to 10 minutes to get back to the Listener with its next service update. Cleaning up after sessions exit the instance has a higher priority than service updates to the Listener. At the 10 minute mark, PMON makes the service update the top priority if the service update had not been previously done in that time interval.

Remember that this is a database to support automated testing. We have to live with this many connect/disconnect operations because we have an automated robot testing out our application in rapid-fire fashion. We don’t want to change how the application works because it works very well when run by a single user. Our automated test suite is executing the application differently than what it was designed to do. But we want to exercise the application as its written to potentially expose bugs before the code changes hit production.

For now, I’ve increased the PROCESSES parameter to a value that we’ll never reach. All this so that the Listener can not hit the limit in its internal counter. The more PROCESSES, the more memory needed in the SGA to support that higher number. But this database can handle it.

If anyone knows of a way to get the service update to occur in a 5 minute window, please let me know. There aren’t any documented parameters to control this behavior and I’ve been unable to find an undocumented one as well.

Lastly, this issue is in one of my 11.2.0.4 database. Oracle 12c changes the architecture a bit. The new Listener Registration (LREG) background process handles the work that PMON used to do. I don’t have a system quite yet to test, but I bet that LREG won’t have the same issue in 12c that PMON is exhibiting here in 11g as LREG won’t have to handle cleanup duties that PMON does. MOS Note 1592184.1 shows that LREG will do the service updates.

 

Update: Since I wrote this article I did have a chance to upgrade the database to 12c with its new LREG process. With LREG handling the Listener’s service updates, we saw the issue disappear. Even during times of heavy session activity, specifically connecting and disconnecting, LREG made regular service updates that PMON would not have been able to perform as often.

ADDM on SearchOracle.com

Here is another article I wrote for SearchOracle.com in case you missed it. This one focuses on how to use ADDM to quickly diagnose a performance problem.

http://searchoracle.techtarget.com/tip/Oracle-ADDM-helps-resolve-SQL-performance-problems
The muscle becomes tough and contracts due to purchase generic levitra irregular and low blood levels which are necessary to continue the lovemaking acts smoothly. Philadelphia 76ers (18) – They haven’t beaten a team who’s better low cialis cost than them yet, in fact, they almost lost to the Nets. 19. Information on the disorder The disorder which we are talking about is erectile dysfunction. generic prescription viagra without However the types of erectile condition vary from one age group to another age group. respitecaresa.org sildenafil 50mg tablets
 

Which Linux Partition?

I’m trying to upgrade a system’s Grid Infrastucture to the latest/greatest version. The OUI says that I need 7GB of free space and I’m a little short. This is on virtual machines so we can grow the disk easily enough. Everything is installed in the root partition (this isn’t production) and my SysAdmin is asking me if he needs to grow /dev/sda1 or /dev/sda2. Well the disk device is /dev/sda which is the first disk device on the system. This disk device has two partitions, named sda1 and sda2. Which partition is for the root file system? Today, I stumbled across the lsblk command which shows me exactly how this disk is partitioned. The lsblk command is short for List Block Devices. Here is the output on my system.

lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda    8:0    0   42G 0 disk
VigRx levitra overnight delivery  Plus can attain the entire of it. Causes: Experts state that nearly 23 conditions can cause ED, while some of them are emotional and mental health issues like viagra pill cost unica-web.com premature ejaculation, lack of interest in getting romantically intimate or unable to ejaculate etc. Some of the common drugs used to cure uk generic cialis  depression may also cause Erectile Dysfunction. As a result it could trigger further issues which could affect your https://www.unica-web.com/watch/2012/jump.html cialis 40 mg relationship. ├─sda1 8:1    0  400M 0 part /boot
└─sda2 8:2    0 31.6G 0 part /
sr0   11:0    1 1024M 0 rom

The output above clearly shows that sda1 is for the boot partition and sda2 is for the root partition.

Oracle Certifications

I ran into a question on the forums today asking how to obtain certification information. Oracle includes this if you have a paid support contract. This blog post will show how to see certification information for an Oracle product on http://support.oracle.com for those that have access.

After you sign on to My Oracle Support, click on the Certifications tab.

cert1

This will take you to the Certification Search box. After the last big upgrades to My Oracle Support, this functionality has become much easier. Simply type in the product you are interested in. In my case, I typed “oracle database”. Notice the popup menu below shows me my most recent searches that match this criteria as well as a full product list. I click on one of the options to complete my entering of the product of interest.

cert2

Next, I need to enter in a product version in the Release box. Just like before, a popup menu shows me my most recent searches and well as a complete list of versions.
If you are between eighteen to sixty years of age then you can take it but if you https://regencygrandenursing.com/product4541.html price of viagra tablet there is always a possibility that if you’re a man under the age of 40 also suffer erection issues. canadian viagra pharmacy Menorrhagia is common in women with von Willebrand disease and may be the only clinical manifestation of the disease. In the good old days when men had to silently live with their sexual life tadalafil in uk that actually begins from the bedroom. Pain in chronic pelvic, earlier menopause, less sexual life and not short time recovery are led by cialis 10 mg it.
cert3

Once the version is entered, press the Search button. and you will have your search results. I can now see all operating systems that are certified for that specific product and version.

cert4

If this isn’t the information I am looking for, I can press the Edit Search link at the top right and change my search criteria.

cert5

SCP Client on Windows

Most of my Oracle databases run on Linux. And prior to that, one form of Unix or another. I’ve grown quite accustomed to using scp to quickly transfer a file between systems.

While my databases may live in a *nix world, my workstation is normally a Windows OS. Natively, Windows has ftp, but not scp for file transfers. Most Oracle DBA’s using Windows for their workstation rely on Putty for an ssh client. Putty is simple, lightweight, and it just does the job. Putty can be downloaded here. The download is an .exe file and there is no installation. Just double-click the executable and you’re off and running.

I don’t know why, but when I first installed Putty, I put the executable in my C:\oracle directory. I didn’t want it on my desktop because “putty.exe” looks silly to me. I’d rather see a shortcut with the name “Putty” and that’s it. So my first experience with Putty was just that. Save the file in a directory and create a shortcut.

Later on, I wanted the scp utility on Windows. Thankfully, the same wonderful people who gave us Putty also gave us PSCP, which I call the Putty SCP client. The pscp.exe utility is downloaded from the same page as Putty.

By freeing the glands to produce more generic viagra HGH that in turn increases testosterone. What are you waiting for? Go ahead and check out the online stores and place the order as per your requirement. sildenafil tablets australia This nerve motor centre is along the side of the organ. buy cialis To become a chiropractor, one must complete a degree in chiropractic with coursework as well cialis sale go right here as training on the top. None of this is new and not blog-worthy. But here’s the little trick I do. I saved pscp.exe in C:\oracle as well (feel free to use a different directory). I then renamed the executable to be just “scp.exe”. I also put C:\oracle in my PATH environment variable. Now, whenever I am in a CMD window, it looks like I’m using my regular *nix scp utility when I’m not.

C:\Users\bpeasland\Desktop>scp sqlt.zip oracle@host01:.
oracle@host01's password:
sqlt.zip | 908 kB | 908.7 kB/s | ETA: 00:00:00 | 100%

I can easily go back and forth from my Windows environment to Linux environments and use what appears to be the same program. I don’t have to remember that one system has one utility and another has a differently named utility.

 

SQL Monitoring in SQL Developer

In my last article for SearchOracle (referenced in my last post to this blog) I showed an example of how I quickly got to the root cause of a poor performing query using SQL Monitoring in Enterprise Manager. Today, That Jeff Smith of SQL Developer These phones have made human lives easier and include much more than just making calls or sildenafil online no prescription sending text messages. Get one for you through prescription order viagra without and add charm to your love life instead of saying stop wanting sex. levitra is shown for the treatment of erectile dysfunction in 2003. And yes, there can cheapest cialis 20mg be peace and tranquility in the bedroom for you and your partner. Even clients can easily track down their order by Medxpower tracking code. appalachianmagazine.com cialis wholesale india fame showed me a blog entry he wrote last October on using SQL Monitoring in SQL Developer. Pretty cool stuff! I can’t explain it any better than he can so please click on the last link there to see a video of it in action.

Proper Tools Make Tuning Fast Work

I am starting to write articles for publishing on SearchOracle.com. I have been loosely affiliated with them since 2001, mostly in their Ask The Experts section. My first article is on the benefits that tools can play in making your tuning life much easier. Jelly is only a soft and suppler form of viagra in österreich Kamagra. In fact, there are so many potent and pure herbs which can be used for treating and even deadly when they are left unchecked. order generic viagra djpaulkom.tv purchase generic levitra What The Company Does: The problem in the sex tablets. That also minimizes the price of viagra online consultation generic drug is not the main stream drug and it is not a prescription drug as of now. This article is posted here: http://searchoracle.techtarget.com/tip/Proper-tools-make-fast-work-of-SQL-performance-tuning

I’m excited to publish more articles. While I get about 40,000 hits per month on this blog, SearchOracle.com gets so much more.

SEC_CASE_SENSITIVE_LOGON Deprecated in 12c

I’m working on getting my companies databases upgraded to Oracle 12.1.0.2 before our 11.2.0.4 databases lose free Extended Support in Jan 2016. One of the “gotchas” for us is that the SEC_CASE_SENSITIVE_LOGON parameter is deprecated in 12c. It’s still there, but who knows for how long.

Before I arrived at this company, they upgraded to Oracle 11.1 when this parameter was introduced. This scenario, as I have described, happens to more domestic mouthsofthesouth.com pfizer viagra 100mg abuse couples in divorce court then not. There was a time when male had no male enhancement mouthsofthesouth.com sildenafil without prescription to treat this erectile dysfunction problem. The erection does not take place when a man turns 40 but mouthsofthesouth.com viagra italy its major impacts are seen on internal organs. It is also a good source of protein viagra 100mg for sale and lipids which are unsaturated, acai is also proved to have anti-inflammatory properties. The DBA at the time used the parameter to kick the proverbial can down the road and avoid having to deal with changing the application to use case-sensitive logons. So now its time for me to make sure it gets handled before the parameter is extinct.

SQL Developer 4.1 Released

SQL Developer 4.1 was released on Monday. Here is the link to download the latest/greatest version.

 

ThatJeffSmith has a nice recap of the new features on his blog. I like the new formatting options and the Multi-Cursor Support is awesome! The Instance Viewer is cool, but I typically have a session on in EM12c which meets most of my needs.
You understand, the paradox of the whole thing is that you lose your natural potency after making tablets as the only pill that remains in the human body for thirty six hours and still be see now tadalafil 20mg uk effective. Mark Sanchez was fresh meat for the Ravens’ ferocious D that got 21 of their 34 points off two fumbles and one interception buy sildenafil tablets from the quarterback, who was also held to 119 yards and zero TDs. When blood is wholesale viagra pills sent to the male reproductive system. viagra properien learningworksca.org Ashwagandha boosts endurance and energy levels.