I want to mention one other thing you will want to look at.
You indicated that you are running all of this on a lenovo G505S, which is a laptop. (obviously YOU know that) :)
The thing with laptops is that many times the Wi-Fi drivers on laptops can cause massive DPC latency spikes, which interfere greatly with applications that use streaming audio, such as Sonar.
The fix for this issue is to get the WI-Fi adapter turned off or disabled just prior to launching Sonar, then turning it back on or enabling it again.
To do so, look to see if there is an actual little switch on the laptop case somewhere that will allow you to simply switch it off. If no such switch exists, look to see if there is a Function Key on one of the keys of the laptop that will also switch the Wi-Fi adapter on/off. (it would likely look like a little tiny radio tower with little half-moon circles to represent radio waves). If no such Function Key exists, no problem, it just means you have to go into Windows Device Manager and once there simply disable/enable the Wi-Fi adapter. There are multiple ways to get to Windows Device Manager - one way in Windows 8 or 8.1 is to hit the Windows button on your laptop keyboard, then simply type in the words: Device Manager. Windows will search for it and display the results, which will have a launch button for it.
Once in Device Manager, expand Network Adapters, and you should see your Wi-Fi adapter listed there. Right-click on the Wi-Fi Adapter, and click on Disable or Enable to turn it off or on.
So the sequence of steps for dealing with a Wi-Fi-adapter would be:
1. Turn off or disable Wi-Fi-adapter just prior to launching Sonar
2. Launch Sonar and create a masterpiece.
3. When finished with Sonar and it is closed, turn Wi-Fi adapter back on or enable it, to regain use of it.
All of the above is in addition to recommending you pick up a dedicated audio interface.
Sonar is a powerful program, but it performance is greatly impacted both by unneeded DPC latency and by having the CPU have to shoulder all the work of conversion of digital files to analog signal, or analog signal into digital data.
A dedicated audio interface and its drivers take over all the work of the analog and digital conversion, and is pretty much a basic needed component of any recording setup, even if it is just you in your living room.
A basic but decent audio interface with 2 inputs and outputs, phantom power, and midi ports, can run in the neighborhood of $125 - $200. The more inputs and outputs, or other features, the higher the cost, with some running well over $500. I happen to have a Presonus AudioBox 1818VSL, and it has 8 inputs and outputs, and runs about $500. But if I didn't need all of those inputs, I just as easily could have bought one of their smaller units for about $150, and it would have worked just fine.
Lots of folks in the forums have and like units from Focusrite, or Presonus, and there are others that work well too. You want to make sure the one you get has enough inputs and outputs for your needs, phantom power (if you have mics that need it), and midi ports (again, only if you need them). If a device HAS features you don't need that's fine they will just sit there, so as long as your feature needs are met, and the cost is within your budget, go for it. One more important thing is to make sure that the interface you pick up has drivers that are available for Windows 8 or 8.1, as you are running 8.1 - check the manufacturer's web site prior to purchase to make sure those drivers are OK, and you also might want to post to this forum any interface you are considering, to get some feedback from forum members on that specific device.
I hope some of the above is helpful,
Bob Bone