Address poor battery life in OS X Mavericks
While Mavericks has increased battery life for the most part, as with past versions of OS X, at times certain processes may bog down and cut expected lifetime significantly short.
OS X Mavericks is built to improve battery life on laptop systems, by including features to automatically suspend battery-draining tasks (such as movies) that are not in the foreground, and using memory compression to lessen paging of RAM contents to the hard drive. However, you may find at times even with these improvements, that your laptop periodically has very short battery life.
If your battery is draining fast, then there are several things you can do. First is to go to the Energy Saver pane of System Preferences and check the option to "Show battery status in menu bar." Doing this will put a menu extra next to the Date, Volume, and Wi-Fi menus that allows you to monitor battery status. Clicking this menu with the Option key held down will then give you two quick pieces of information. The first is the battery condition, which if anything but "Normal," indicates your battery is damaged or otherwise needs replacing. The second is a list of the top-most applications that are using significant energy (the Option key is not necessary for showing this feature).
With these features, you can see if your battery hardware is in good condition, and then determine which applications you have open that are draining the battery, and close them or otherwise manage their activities.
In addition to using this menu, you can open the Activity Monitor utility in the Applications > Utilities folder, and use its "CPU" and "Energy" tabs to sort running processes by "%CPU" usage and energy impact. The benefit of this approach is you can view these statistics for background tasks in addition to programs, and also view them for running programs in other accounts on the system instead of just your own. To do this, ensure "All Processes" is chosen in Activity Monitor's "View" menu.
Standard options for increasing battery life
While you can spend time troubleshoot the specifics of what might be causing poor battery life in your Mac, another approach is to just take measures to overall improve battery life.
One example of this is to turn off the Bluetooth or Wi-Fi radios when not in use, which can be done easily from their respective status menus in the system menu bar. Doing this can easily tack on another hour to a system's run time.
In addition, quit unneeded applications and application windows, especially active ones such as network monitors, scanners, and third-party status updaters. While you might find it fun to keep Activity Monitor open, keep in mind that Activity Monitor itself will use regular CPU cycles, so only keep it open when troubleshooting and then quit it.
Dimming keyboards and displays as much as possible (if not all the way off when not in use), will greatly increase battery life as well. If you find yourself pausing when working, try keeping your hands on the F1 and F2 keys, or whatever keys are configured for dimming your display, and crank down the output to zero when you pause, or just sleep the system for extended pauses.
If you use peripheral devices with your Mac, then be sure they are unplugged when you are running on the battery, and only attach them for their brief use before unplugging them again.
If your system is one which has upgradable RAM, then increasing levels as high as you have a budget for will lessen paging of RAM contents to the hard disk as it gets full. Upgrading to an SSD for older systems will not only increase speed, but also cut down on energy usage. Lastly, set the Energy Saver preferences to set the hard drive to sleep when possible, and enable "Automatic graphics switching," as these settings will ensure the system's hardware is only ramped up to high-energy usage when you need it.
Managing "mds" or "mdworker"
A couple of the more common CPU-hogging tasks in OS X are the metadata management tasks "mds" and "mdworker" which index your drive for Apple's Spotlight search and other related technologies. When a drive needs re-indexing, these tasks may stay at high CPU usage for up to a few hours, and in the meantime, can easily cut battery life to a third or fourth of its expected length.
Sometimes after a crash, forced-restart, or if you unplug a hard drive from the system without properly unmounting it, the system will re-index the entire drive, which can take a while to complete. During this time you will see a progress bar in the Spotlight menu, and see the "mds" and "mdworker" tools running in Activity Monitor. If these continue to run at high CPU usage, then you might have some corruption in your drive or in the spotlight index which is keeping them active.
To fix this, first try adding all of your mounted hard drives to the Spotlight "Privacy" list (go to the "Privacy" list in the Spotlight pane of System Preferences, and then drag your hard drives there). Keep your drives here, and check Activity Monitor for "mds" and "mdworker" activity. If not immediately, then after a short while, the activity of these processes should drop, but you can also force-quit the processes or restart your computer to kill any current activity in them.
When the system has calmed down, open Disk Utility and select a drive in the left-hand list of devices. Then press Command-A to select all drives, followed by clicking the "Verify Disk" button in the First Aid tab. This will sequentially run verifications on all mounted drives and partitions, and indicate if a formatting error exists in any of them. If so for a secondary drive, then select it and click the "Repair Disk" button. For the boot drive, you will need to reboot to the Recovery partition by restarting with the Command-R keys held down, and then re-run Disk Utility.
With the disks verified and repaired, reboot normally and remove them from the Spotlight Privacy list. After this, they will index again and take a number of minutes (if not an hour or two) to complete, but hopefully after, should spur less "mds" and "mdworker" activity.