Friday 19 August 2011

Optimizing CPU performance.

Most of the views which we'll get on this post would be from people who have just bought a new laptop or a PC. So, 'boost your PC performance' won't allure them right away. But let me assure you, 3 months down the line, when your machine becomes sluggish (which it will), you'll be glad to know that there are plenty of tips and tweaks which can help make your laptop as good as new. Well, almost.

So, this post shows you how to do it. It's divided into 4 major sub-topics, each referring to a different technique of optimizing your PC. To make it easier to comprehend, each of the 4 sub-topics point to a different blog, hence you can read all or only the ones you’re interested in.

Before going further, I would recommend that you back-up all your data. If you're not aware of how to do that, this should help you.


All backed-up, here we go!


Click on any one of the following links to read more about them :


The effects of all these tweaks can be noticed by clocking the boot-up time (here’s how) before and after implementing them. If being tried for the first time, a decrease in 3-4 seconds is expected. The time taken to boot up isn't necessarily a indication of the 'performance' of a PC. But, it's always better if you don't have to wait long, isn't it ?

There are software’s which can measure the performance of your hardware components (like RAM, processor etc), but they come in handy only when you’re either overclocking or upgrading your hardware.

To see the quantitative change in performance in more detail, we devised a small test :

Using an laptop with an i5-2410M (2.3 GHz) processor, 4 GB of RAM, running Windows 7 (64-bit), we clocked the time it took for a 'heavy' application to load (like Photoshop CS4), before and after applying some of the above mentioned tweaks.

The software used to keep time was AppTimer. We used it to open and close Photoshop a total of 10 times and keep a log in the form of a text document. These were the settings used :



I would advice that you first go through the 'ReadMe' file which comes with the application, to better understand how this works.


The results after the first run (the values are in seconds) :

The results under default conditions

Many might be surprised to see such good timings under default settings. The reason being, it was a brand new laptop with a fresh copy of Windows 7. But still, we had faith in our methods and were confident that even these timings could be bettered.

The tweaks we used were,


  • Disk Defragmenter (it wouldn't have had much effect on a new laptop)
  • Check Disk
  • Turning off the visual effects and using the classic theme.
  • Reducing the display resolution.
  • Adding a power supply and using 'Max Performance' settings.

And, here's what we got :


The results after tweaking

It wouldn't seem much at first glance, but the difference was more than expected.

The percentage decrease in the timing was a whopping 22.51% !

Thus, we can successfully conclude that using such tweaks not only helps in opening an application faster, but it's effect would be more evident when the user multi-tasks. (we couldn't find a software to measure it though)


There you go, signed, sealed and delivered ! :)


And one last thought,

If everything mentioned above fails to boost your PC performance, it's probably time to upgrade your hardware or start using LINUX, it' free! (It costs nothing, so a little free publicity is my way of saying thanks)




Freeing up hard disk space and Organizing it.

This blog is a part of a blog on Optimizing CPU Performance, found here.


Defragment: As we know, the hard disk is an essential part of the computer, but what many don't realize that it is very slow when compared to the speeds of the processor and the memory. Hence, a very simple yet effective way to speed up your PC is to keep the disk well organized. Usually, over time, due to lack of continuous free clusters; the OS saves files in fragmented pieces. As the file gets updated, the OS saves it on the next free cluster available, this might result in it to be very far from the original saved position of the file. This makes it time consuming when the files are to be read later on.

This is where the Windows Disk Defragmenter comes in. Without going much into the details of its working, it's best to say that it moves the files around and stores them sequentially, keeping all the free space apart in one big chunk. It can take a long time to finish, so it's advised to let it run over-night. Luckily, Windows 7 and Windows Vista can be configured to defragment weekly/monthly .

Linux users need not worry. Linux uses Ext4 file system which is far less prone to fragmentation than the Windows (NTFS) file system. Defragmenting Linux systems will lead to a negligible performance boost.


Check Disk: Often known as ‘chkdsk’, is a windows command which helps in checking for any errors and bad sectors in the drive and then tries to repair them. It can also act as an early warning system if it shows too many errors which can’t be repaired, implying that health of the drive is attenuating. Here’s how it can be run.

A counter for this is the fsck command in Linux.


Temporary Internet Files: Almost all of the internet browsers today keep a copy of every webpage you visit, on the hard drive. These saved files help in loading a webpage faster when it is opened in future. The files accumulate over time and can end up occupying a lot of space. Deleting them, clearing the cache and cookies can free up the space. The procedure can be found for Internet Explorer and Chrome users.

If you aren't very keen on knowing what you did yesterday, set the history in internet options for 0 days to prevent the browser from storing information about what you did on the internet today. Yea, a bit confusing. Read it twice. :)


Disk Cleanup: It is another pre-installed utility in Microsoft Windows which searches for unused and unneeded files (for ex; files in the Recycle Bin) and then gives an option to select which ones you would like to remove. From personal experience, I find it really useful as it can free up quite a lot of space, especially if used for the first time or after a very long period. (Once, it cleared ~ 1.2 GB!). Go on, try it.

You can use autoclean/clean/autoremove commands in Linux to serve the same purpose.


Remove previous restore points: Backing-up your data can be a valuable use of your time, but it also has a flip-side. Once you create a new back-up (or the system creates one on its own), the previous restore points might (can be automated in Windows 7) or might not be deleted. These earlier backups and restore points utilize a LOT of space. Hence, it makes sense to delete older restore points.

Backing up using the terminal (Linux) can be a tricky task, so it’s easier to use software’s which do it. I would recommend FlyBack.


Uninstall programs: Have you ever opened the Add/Remove window and found many programs which you don't remember installing? Maybe they came installed on your new computer or some you don't use anymore. Obviously, these programs use up space and are worth uninstalling.

Two things to be kept in mind; Firstly, 'deleting' the icon of a program doesn't remove it from your computer; you have to still uninstall it. Secondly, don't uninstall blindly, if you're not sure of what it does, Google it before uninstalling.

Linux users can simply use the Software Centre for managing their programs on the disk.


Recycle Bin Reduction: The recycle bin is allotted some percentage of space in each drive.
The percentage allotted would generally be 10%. You can allot the recycle bin different percentages for each drive also, but keeping it around 3-4% in general, should be optimum. For doing so :

Right click on Recycle Bin > Properties > Custom Size >3-4% of your hard disk size.


Tweaking the Operating System.


This blog is a part of a blog on Optimizing CPU Performance, found here.



Other than the OS?: When we boot our computer, it's not just the OS which is loading, in fact it’s just the beginning; a host of drivers and programs load in the background simultaneously. Although we can't do much about the drivers, but we can surely filter out which services we want to load at start-up. This can be done using the 'msconfig' command.

It's recommended that you don't mess around with the Microsoft services and leave out the anti- virus services to start-up. Also, stopping these services doesn't delete/uninstall them; they can be started whenever the need may be. This has to be THE best way in my opinion to speed up the boot-up time. I only allow AVG to start up.

Linux users can use Boot-Up Manager.


Change boot preferences: Although not a part of the OS, BIOS can also be used to speed up the boot time. Usually, the first place a system looks for a bootable device is the Floppy/CD-DVD drive and then moves onto the hard disk, if nothing is detected in the former drives. For daily use, this unnecessary search adds 1-2 seconds in the boot-up time.

You can access the BIOS (Esc, F12, Del key etc) and configure the settings such that the first preference is the hard disk. Since there are many different BIOS' around, there isn't a universal tutorial for it. So, go 'Learn-it-Yourself'!


Update Drivers: Drivers can be thought of as codes which help the OS interact with different components of the computer; ex Graphics Card. Keeping these drivers up to date can optimize the interaction. By default, Windows automatically checks for any new driver updates, but in case it isn't automated, you can turn it on.

Ubuntu is cool, so you don’t need to worry about updating them as most drivers come pre-installed and are automatically updated. If there are (rarely) any drivers you want to update, here’s how.


Visual Appeal: If speed of the ultimate importance, then you can give up on the stylish and glossy looks of your OS. Disabling the visual effects, removing unnecessary fonts and disabling desktop backgrounds (and even screen savers) can give a SLIGHT boost to the performance and boot-up time. Beware though; your Windows can go from looking like this, to this !

The default visual effects in Ubuntu are pretty minimal and don’t need much tweaking.


Indexing: Windows is very smart when it comes to saving our time on the tasks that we perform over and over again. An example of that is that it keeps track of the regular and common searches we do within our computer. To optimize future searches, it uses service known as Windows Search Indexing. This indexing of files consumes processing power, and if you don't use the Windows search regularly, it’s better to turn it off.


Use more Power! : It might go slightly against the whole ‘go-green’ drive, but I would rather sit in an AC-less room using a faster laptop than the other way around. So, using the ‘High-Performance’ option in the Power Plans (Control Panel -> Power Options) will, well, do as the name suggests. It works great if your laptop is connected to a power supply.

You can do the same in Ubuntu, System > Preferences > Power Management.


Taking external help.


This blog is a part of a blog on Optimizing CPU Performance, found here.



Anti-virus: Not only do viruses cause harm to your PC, some can even slow it down. So its advantageous to install a good anti-virus and to update it regularly for keeping your computer malware-free. If you're short on cash (which we all are), AVG is a great free anti-virus, but it can't repair infected files.

As Ubuntu users would know, Ubuntu (Like Mac OS) is almost virus-free. But those who still feel insecure, go check this out.


ReadyBoost: If your computer is really low-spec, then one can use an inbuilt service (in Vista and W7) known as ReadyBoost. It borrows memory from external USB devices (pen drive, external HDD) and uses it to speed up your PC. However, if you have a decent RAM (>512 MB), the effect of this tool is negligible. They wouldn’t really need it, but Ubuntu users can also take advantage of this technology. Ubuntu can also create a partition in the hard drive, commonly called the 'Swap'. This area is used as a virtual memory as and when the system needs some extra resources.

Read more about it here.


Registry: The Windows Registry can be thought of as a log book that keeps a log of all the processes that are taking place, say, installation/uninstallation of programs, changes is system configurations etc. These registry keys can over time become corrupt or redundant and hence need rectification. Software’s like Registry Mechanic can be used to go about these tasks.

WARNING: Making changes in the registry can be dangerous and should only be made if you know 100% about its outcomes. Always back-up your system before making any such changes.


The Hardware.


This blog is a part of a blog on Optimizing CPU Performance, found here.



Windows Experience Index: Windows 7 uses a concept of base-scores to give you an idea of how up to date your hardware is. A very low base score signifies that you have old/slow hardware and it's better to upgrade it. Read how to see your base score and more about it here.

Over-clocking: If you are really hungry for more processing muscle without spending any cash, you can take help of over-clocking. In layman terms; the companies which manufacture processor chipsets and graphic cards put a bottle neck on how fast their products perform. This is because using them at full capacity (especially for long) can cause over-heating and hence damage the hardware.


This bottle neck can however be removed. A few companies offer over-clocking options in the BIOS. There are other software’s available which can be used if BIOS doesn't provide these options. I wouldn't recommend any though, as none guarantee protection from adverse effects. If you really want to over-clock, it’s better that you buy a more effective cooling unit to replace the stock one.

Don’t even think about OCing a laptop, unless you want fried legs. (your legs, not the chickens)

Once again, this should ONLY be practiced if you are 110% sure about it, because unlike registry tweaks, this can actually cause irreversible damage to your hardware.

All the warnings aside, a well-informed, advanced user can find the right balance between power and over-heating. Once that’s done, viola! You got the performance of a costlier chip at no extra cost!


A Care from your side!: Quite basic, but when it comes to the building of high rises, the building blocks matter. You must use a UPS, since voltage fluctuation can damage the hardware and power cuts might create errors on hard disk. Subsequently, direct switching off the UPS frequently might reduce efficiency of the PC, apart from the loss of unsaved data.


Monday 8 August 2011

DIFFERENCE BETWEEN PCI & PCI-EXPRESS.





What is PCI?


PCI stands for 'PERIPHERAL COMPONENT INTERCONNECT'.This is a connection within the system motherboard. These include sound cards, video cards, LAN cards & RAID cards. The predecessor to PCI was ISA - which was one of the carrier connection type in modern computers.








What is PCI - Express ?


PCI-E is the latest incatation of peripheral interconnection. It is destined to replace PCI, especially in the word of video cards. Most modern motherboards have PCI-E built-in. The speed of PCI-E is another key difference between PCI & PCI-E.







PCI vs PCI-E.

  • PCI-E uses a serial interface & alows for point to point interconnections between these connections points. This differs from previous PCI bus architectures that used a shared, parallel bus architecture.
  • PCI cards have a peek transfer rate of 133MB/S. Where as PCI-E cards have data transfer rate of 16GB/S.




SUMMARY

  1. PCI-E is much faster compared to PCI.
  2. PCI-E uses serial interface while PCI uses parallel interface.
  3. PCI-E speed is classified into lanes, each capable of delivering upto 1GB/S data transfer.
  4. PCI slots are standarized while PCI-E slots are very depending on the no.of lanes the slot is intended for.
  5. Despite PCI-E superiority, most manufacturers still use the PCI standard for their devices.
I hope that this blog would help the viewer's to get the basic idea of PCI & PCI - Express.

:-)Thanks for viewing !




Friday 5 August 2011

Cloud-An Introduction

It was just last week that one of friends, who is studying mechanical engineering, asked me a question- “Hey what is this cloud computing and why everyone is talking about this these days?”. Without going into many details I simply told him that cloud is nothing but big servers where you can store your large amounts of data. His next question, which made me laugh all the day through- “Hey in that case, what will happen to our data if the sun continuously shines and cloud does not appear at all!”

Hmm…So I dedicate this blog post to this friend of mine. In this article, I introduce you to the 3 types of cloud- Infrastructure as a service (IAAS), Software as a service (SAAS) and Platform as a service (PAAS) by providing some of their features, their examples from real world and their key advantages/ disadvantages.

Consider a road from Delhi to Mumbai. Our ultimate goal is to transfer goods/ people/ animals from Delhi to Mumbai using this road. This road alone is analogous to IAAS. Now, consider a truck which runs from Delhi to Mumbai on this road. This road along with the truck is analogous to PAAS. And now, consider the same truck carrying people from Delhi to Mumbai, running on this road. This road along with the truck carrying people from Delhi to Mumbai is analogous to SAAS.

To speak technically, if one uses Infrastructure as a service model, he rents out some space on the servers of large organizations which have huge datacenters consisting of thousands of servers. Some of these organizations are Rackspace or Amazon.com. Coming back to our analogy of a road from Delhi to Mumbai- we simply have the infrastructure (the road). We don’t think about what we’ll put into it. IIIT-D too uses this model since we’re using our own in-house servers! IAAS is quite a traditional cloud model. The main disadvantage of this model is that every time we do some kind of modifications to our applications and data, then we need to inform the server-providers to increase/decrease our rented space. Similarly, for eg: If IIIT-D thinks of taking more students this time or creating more applications and hosting them on local servers, then there might be a need of more servers.

SAAS, or Software as a service on the other hand, are the generic software solutions provided by third-party organizations. I am sure most of us use them on a daily basis. For example: Google Apps (Google docs, Google spreadsheets etc), Microsoft Office 365, SAP ERP etc. I stated it to be analogous to a road along with a truck carrying people from Delhi to Mumbai. It provides both the infrastructure (eg: Google docs saved on Google servers) as discussed above, as well as it provides a generic application (carrying people from Delhi to Mumbai on the truck, analogous to editing/saving/sharing documents using Google docs). But, consider that I don’t want people to be carried on the truck from Delhi to Mumbai, but rather I want goods to be carried. Here comes the disadvantage of SAAS model. One cannot modify the applications provided by third-party SAAS providers.

PAAS, or Platform as a service is the most recent cloud model. Microsoft Azure, Google App Engine and Salesforce’s force.com are some of the leading PAAS providers. It allows you to manage your applications offline and then migrate to the cloud (Microsoft or Google datacenters). It is like an OS, where you manage your applications and data, without caring about installing latest versions of applications and antivirus applications. You create an account in this case, for eg with Microsoft Azure, which allows you to scale up/down your database size. These products follow pay-as-you-go model, which allows you to only pay for the computational/ data which is actually used. As I mentioned, a road along with a truck is analogous to PAAS- truck is like a platform where you can fill in people/ animals/ goods and only pay for the number you fill in. In this way, you customize/ manage your applications on your own without getting bothered about contacting Microsoft datacenters for increasing your server space size every time you modify your application. You are assured of security of your application and since Microsoft/Google’s data centers are spread across the entire world, an application on cloud being run from any part of the world gets cached onto the nearest datacenter, which gives a good end user experience by reducing latency.

If you want to see the performance of an application hosted on Windows Azure, you can visit this site- www.ndtv.com/cloud . This is a TV broadcast, which was hosted onto Microsoft Windows Azure cloud. It takes few seconds to buffer before it starts, and then it runs as if one is watching a CD/DVD playing.

I hope that this blog post gives you a basic idea of the three main types of cloud models. Atleast you know now that data and applications inside cloud are not affected by sunshineJ .

References: My notes from Microsoft Azure Cloud Computing Workshop held at IIIT-D in January, 2011.

Thursday 4 August 2011

System Management Course - IIITD 2011

This blog is intended to provide a forum for students enrolled in the Systems Management Course in Monsoon 2011 to share interesting posts related to the course. The objective is also to create a reference location that acts as a resource for interesting utilities at one single place. We would encourage discussions on any blog posts pointing to discrepancies in the post or adding further resources that complement the related knowledge.

Blog for 2010 can be accessed here. Please try not to repeat any post and if you find any post interesting you can just link to that post.

Happy Blogging!