MySQL High Availability- P7

50 340 0
MySQL High Availability- P7

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

Indeed, there are a great many tools available to the Windows administrator. We won’t try to cover them all here, but instead we’ll focus on tools that let you monitor a Win- dows system in real time. Let’s examine some of the basic reporting tools first. The following are the most popular tools you can use to diagnose and monitor per- formance issues in Windows: • Windows Experience Index • System Health Report • Event Viewer • Task Manager • Reliability Monitor • Performance Monitor An excellent source for information about Microsoft Windows performance, tools, techniques, and documentation can be found at the Microsoft Technet website. The Windows Experience If you want a quick glance at how your system is performing compared to the expect- ations of Microsoft’s hardware performance indexes, you can run the Windows Expe- rience report. To launch the report, click Start, then select Control Panel→System and Mainte- nance→Performance Information and Tools. You will have to acknowledge the User Account Control (UAC) to continue. You can also access the System Health Report using the search feature on the Start menu. Click Start and enter “performance” in the search box, then click Performance Information and Tools. Click Advanced Tools and then click the link “Generate a sys- tem health report” at the bottom of the dialog. You will have to acknowledge the UAC to continue. Microsoft has changed the Windows Experience in Windows 7. The report is very similar to that of earlier Windows versions, but it supplies more information that you can use to judge the performance of your system. The report is run once after installation, but you can regenerate the report by clicking Update My Score. This report rates five areas of your system’s performance: processor (CPU), memory, video controller (graphics), video graphics accelerator (gaming graphics), and the pri- mary hard drive. Figure 7-24 shows an example of the Windows Experience report. Microsoft Windows Monitoring | 277 Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark. There is a little-known feature of this report you may find valuable—click on the link “Learn how you can improve your computer’s performance” to get a list of best prac- tices for improving each of these scores. You should run this report and regenerate the metrics every time you change the configuration of your system. This will help you identify situations where configuration changes affect the performance of your server. The best use for this tool is to get a general impression of how your system is performing without analyzing a ton of metrics. A low score in any of the categories can indicate a performance issue. If you examine the report in Figure 7-24, for instance, you will see that the system has a very low graphics and gaming graphics score. This is not unex- pected for a Windows system running as a virtual machine or a headless server, but it might be alarming to someone who just shelled out several thousand dollars for a high- end gaming system. The System Health Report One of the unique features and diagnostic improvements in Windows Vista and Win- dows 7 is the ability to generate a report that takes a snapshot of all of the software, hardware, and performance metrics for your system. It is analogous to the System Pro- filer of Mac OS X, but also contains performance counters. To launch the System Health Report, click Start, then select Control Panel→System and Maintenance→Performance Information and Tools. Next, select Advanced Tools, then Figure 7-24. The Windows Experience report 278 | Chapter 7: Getting Started with Monitoring Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark. click the link “Generate a system health report” at the bottom of the dialog. You will have to acknowledge the UAC to continue. You can also access the System Health Report using the search feature on the Start menu. Click Start and enter “performance” in the search box, then click Performance Information and Tools. Click Advanced Tools and select the link “Generate a system health report” at the bottom of the dialog. Another way to access the System Health Report is to use the search feature on the Start menu. Click Start and enter “system health report” in the search box, then click the link in the Start menu. You will have to acknowledge the UAC to continue. Figure 7-25 shows an example of the System Health Report. This report has everything—all of the hardware, software, and many other aspects of your system are documented here. Notice the report is divided into sections that you can expand or collapse for easier viewing. The following list briefly describes the in- formation displayed by each section: System Diagnostics Report The system name and the date the report was generated. Diagnostic Results Warning messages generated while the report was being run, identifying potential problem areas on your computer. Also included is a brief overview of the perform- ance of your system at the time the report was run. Software Configuration A list of all of the software installed on your system, including system security settings, system services, and startup programs. Hardware Configuration A list of the important metadata for disk, CPU performance counters, BIOS infor- mation, and devices. CPU A list of the processes running at report time and metadata about system compo- nents and services. Network Metadata about the network interfaces and protocols on your system. Disk Performance counters and metadata about all of the disk devices. Memory Performance counters for memory, including the process list and memory usage. Report Statistics General information about the system when the report was run, such as processor speed and the amount of memory installed. Microsoft Windows Monitoring | 279 Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark. The System Health Report is your key to understanding how your system is configured and is performing at a glance. It is a static report, representing a snapshot of the system. There is a lot of detailed information in the Hardware Configuration, CPU, Network, Disk, and Memory sections. Feel free to explore those areas for greater details about your system. The best use of this tool, beyond examining the performance counters, is to save the report for later comparison to other reports when your system is performing poorly. You can save an HTML version of the report by selecting File→Save As. You can use the saved report as a baseline for performance of your system. If you generate the report several times over the course of low, medium, and high usage, you should be able to put together a general expectation for performance. These expecta- tions are important because you can use them to determine whether your performance issues are within the bounds of expectations. When a system enters a period of un- usually high load during a time when it is expected to have a low load, the users’ experience may generate complaints. If you have these reports to compare to, you can save yourself a lot of time investigating the exact source of the slowdown. Figure 7-25. The System Health Report 280 | Chapter 7: Getting Started with Monitoring Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark. The Event Viewer The Windows Event Viewer shows all the messages logged for application, security, and system events. It is a great source of information about events that have occurred (or continue to occur) and should be one of the primary tools you use to diagnose and monitor your system. You can accomplish a great deal with the Event Viewer. For example, you can generate custom views of any of the logs, save the logs for later diagnosis, and set up alerts for specific events in the future. We will concentrate on viewing the logs. For more infor- mation about the Event Viewer and how you can set up custom reports and subscribe to events, consult your Windows help files. To launch the Event Viewer, click the Start button, then right-click Computer and choose Manage. You will have to acknowledge the UAC to continue. You can then click the Event Viewer link in the left panel. You can also launch the Event Viewer by clicking Start, typing “event viewer,” and pressing Enter. The dialog has three panes by default. The left pane is a tree view of the custom views, logfiles, and applications and services logs. The logs are displayed in the center pane, and the right pane contains the Action menu items. The log entries are sorted, by de- fault, in descending order by date and time. This allows you to see the most recent messages first. You can customize the Event Viewer views however you like. You can even group and sort events by clicking on the columns in the log header. Open the tree for the Windows logs to see the base logfiles for the applications, security, and system (among others). Figure 7-26 shows the Event Viewer open and the log tree expanded. The logs available to view and search include: Application All messages generated from user applications as well as operating system services. This is a good place to look when diagnosing problems with applications. Security Messages related to access and privileges exercised, as well as failed attempts to access any secure object. This can be a good place to look for application failures related to username and password issues. Setup Messages related to application installation. This is the best place to look for in- formation about failures to install or remove software. Microsoft Windows Monitoring | 281 Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark. System Messages about device drivers and Windows components. This can be the most useful set of logs for diagnosing problems with devices or the system as a whole. It contains information about all manner of devices running at the system level. Forwarded Events Messages forwarded from other computers. Consult the Windows documentation about working with remote event logging. Digging through these logs can be challenging, because many of them display infor- mation that is interesting to developers and not readable by mere mortals. To make things easier, you can search any of the logs by clicking the Find operation in the Actions pane and entering a text string. For example, if you are concerned about memory issues, you can enter “memory” to filter all of the log entries for ones containing the string “memory,” which will then be shown in the center pane. Each log message falls into one of the following three categories. These apply to user processes, system components, and applications alike. Error Indicates a failure of some magnitude, such as a failed process, out-of-memory problem, or system fault. Figure 7-26. The Windows Event Viewer 282 | Chapter 7: Getting Started with Monitoring Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark. Warning Indicates a less serious condition or event of note, such as low memory or low disk space. Information Conveys data about an event. This is generally not a problem, but it could provide additional information when diagnosing problems, such as when a USB drive was removed. To view a log, open the corresponding tree in the left pane. To view the details about any message, click on the message. The message will be displayed below the log entries, as shown in Figure 7-26. In the lower part of the center pane, you can click the General tab to see general information about the message, such as the statement logged, when it occurred, what log it is in, and the user who was running the process or application. You can click the Details tab to see a report of the data logged. You can view the information as text (Friendly View) or XML (XML View). You can also save the infor- mation for later review; the XML View is useful to pass the report to tools that recognize the format. The Reliability Monitor The most interesting monitoring tool in Windows is the Reliability Monitor. This is a specialized tool that plots the significant performance and error events that have oc- curred over time in a graph. A vertical bar represents each day over a period of time. The horizontal bar is an ag- gregate of the performance index for that day. If there are errors or other significant events, you will see a red X on the graph. Below the bar is a set of drop-down lists that contain the software installations and removals, any application failures, hardware failures, Windows failures, and any additional failures. This tool is great for checking the performance of the system over a period of time. It can help diagnose situations when an application or system service has performed cor- rectly in the past but has started performing poorly, or when a system starts generating error messages. The tool can help locate the day the event first turned up, as well as give you an idea of how the system was performing when it was running well. Another advantage of this tool is that it gives you a set of daily baselines of your system over time. This can help you diagnose problems related to changing device drivers (one of the banes of Windows administration), which could go unnoticed until the system degrades significantly. In short, the Reliability Monitor gives you the opportunity to go back in time and see how your system was performing. The best part of all? You don’t have to turn it on— it runs automatically, gleaning much of its data from the logs, and therefore automat- ically knowing your system’s history. Microsoft Windows Monitoring | 283 Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark. One big source of problems on Windows is connecting and configuring hardware. We will not discuss this subject here, as it can easily fill a book in its own right. If you have problems with hardware and drivers, one excellent reference is Microsoft Windows XP Inside Out, by Ed Bott et al. (Microsoft Press). You can access the Reliability Monitor by clicking Start, typing “reliability,” and press- ing Enter or clicking on Reliability and Performance Monitor. You will have to ac- knowledge the UAC. Click Reliability Monitor in the tree pane on the left. Fig- ure 7-27 shows an example of the Reliability Monitor. In Windows 7, you can launch the Reliability Monitor by clicking Start, entering “action center” in the search box, and pressing Enter. You can then select Maintenance→View reliability report. The report differs from previous versions of Windows, but offers the same information in a tidier package. For example, instead of the drop-down lists, the new Reliability Monitor report lists known incidents in a single list. Figure 7-27. The Reliability Monitor 284 | Chapter 7: Getting Started with Monitoring Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark. The Task Manager The Windows Task Manager displays a dynamic list of running processes. It has been around for a long time and has been improved over various versions of Windows. The Task Manager offers a tabbed dialog with displays for running applications, pro- cesses (this is most similar to the Linux top command), services active on the system, a CPU performance meter, a network performance meter, and a list of users. Unlike some other reports, this tool generates its data dynamically, refreshing periodically. This makes the tool a bit more useful in observing the system during periods of low performance. The reports display the same information as the System Health Report, but in a much more compact form, and are updated continuously. You can find all of the critical metrics needed to diagnose performance issues with CPU, resource-hogging processes, memory, and the network. Conspicuously missing is a report on disk performance. One of the interesting features of the Task Manager is that it shows a miniature per- formance meter in the notification area on the Start bar that gives you a chance to watch for peaks in usage. Running a dynamic performance monitoring tool consumes resources and can affect a system that already suffers poor performance. You can launch the Task Manager any time by pressing Ctrl+Alt+Del and choosing Task Manager from the menu. Figure 7-28 shows an example of the Task Manager and the process list. The Performance Monitor The Performance Monitor is the premier tool for tracking performance in a Windows system. It allows you to select key metrics and plot their values over time. It can also store the session so you can later review it and create a baseline for your system. The Performance Monitor has metrics for just about everything in your system. There are counters for many of the smaller details having to do with the basic areas of per- formance: CPU, memory, disk, and network. There are a great many other categories as well. To launch the Performance Monitor, click Start, then select Control Panel→System and Maintenance→Performance Information and Tools. Click Advanced Tools and then click the link Open Reliability and Performance Monitor near the middle of the dialog. You will have to acknowledge the UAC to continue. Click Reliability Monitor in the tree pane on the left to access the Performance Monitor feature. Microsoft Windows Monitoring | 285 Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark. You can also launch the Performance Monitor by clicking Start, typing “reliability,” and pressing Enter or clicking on Reliability and Performance Monitor. You will have to acknowledge the UAC. Click Reliability Monitor in the tree pane on the left to access the Performance Monitor feature. Figure 7-29 shows an example of the Performance Monitor. Microsoft has two levels of metrics: objects that offer a high-level view of an area such as the processor or memory, and counters that represent a specific detail of the system. Thus, you can monitor the CPU’s performance as a whole or watch the finer details, such as percentage of time idle or the number of user processes running. Add these objects or counters to the main chart by clicking the green plus sign on the toolbar. This opens a dialog that allows you to choose from a long list of items to add to the chart. Adding the items is a simple matter of selecting the object and expanding the drop-down list on the left, then dragging the desired object to the list on the right. Figure 7-28. The Task Manager 286 | Chapter 7: Getting Started with Monitoring Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark. [...]... information about the mysqladmin tool, see the section titled “mysqladmin—Client for Administering a MySQL Server” in the online MySQL Ref erence Manual Figure 8-1 shows the sample output of a system with no load Figure 8-1 Sample mysqladmin process and status report MySQL GUI Tools The MySQL GUI tools are currently bundled together in a single download and are available on the MySQL website You can... systems: • MySQL Administrator 1.2 • MySQL Query Browser 1.2 • MySQL Migration Toolkit 1.1 We will discuss the MySQL Administrator and MySQL Query Browser in more detail in the following sections The MySQL Migration Toolkit is designed to automate the migration of database schema and data from other database systems It can be a really handy tool to make adoption of MySQL easier and faster The MySQL Migration... performance of the MySQL server and databases MySQL Server Monitoring Managing the MySQL server falls in the category of application monitoring This is because most of the performance parameters are generated by the MySQL software and are not part of the host operating system As mentioned previously, you should always monitor your base operating system in tandem with monitoring MySQL because MySQL is very... this chapter The mysqladmin Utility The mysqladmin command-line utility is the workhorse of the suite of command-line tools There are many options and tools (called commands) this utility can perform The online MySQL Reference Manual discusses the mysqladmin utility briefly In this section, we examine the options and tools for monitoring a MySQL server 300 | Chapter 8: Monitoring MySQL Please purchase... are several tools you can use to monitor your MySQL server The tools available in the standard distributions are somewhat limited in that they are console tools and include special commands you can execute from a MySQL client (e.g., SHOW STATUS) and utilities you can run from a command line (e.g., mysqladmin) The MySQL client tool is sometimes called the MySQL monitor, but should not be confused with... most challenging part of monitoring a MySQL server As mentioned, a great deal of valuable information on this topic is included in the online MySQL Reference Manual To illustrate the kinds of features you can monitor in a MySQL server, let us examine the variables that control the query cache The query cache is one of the most important performance features in MySQL if you use the MyISAM storage engine... command: mysqladmin -uroot password socket= extended-status -relative sleep 3 You can also combine commands to get several reports at the same time For example, to see the process list and status information together, issue the following command: mysqladmin root processlist status MySQL Server Monitoring | 301 Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark The mysqladmin... custom health graphs, make performance tuning a much easier and more immediate process MySQL Query Browser The MySQL Query Browser is another of the optional GUI tools available for MySQL Use it to build queries and execute them in a graphical form Result sets are returned and displayed in a spreadsheet-like dialog MySQL Query Browser allows for vertical scrolling through all of the results as well as... the section titled “Query Cache Configuration” in the online MySQL Reference Manual You can observe the performance of the query cache by examining several status variables, as shown in Example 8-3 MySQL Server Monitoring | 299 Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark Example 8-3 Query cache status variables mysql> SHOW STATUS LIKE '%Qcache%'; + -+ -+ |... demonstrate the complexity of monitoring the MySQL server No single volume (or chapter in a broader work) can cover all such topics The practices described in this chapter therefore are general and are designed to be used with any feature in the MySQL server However, the specific details may require additional research and a good read through the online MySQL Reference Manual Another pair of commands . from a MySQL client (e.g., SHOW STATUS) and utilities you can run from a command line (e.g., mysqladmin). The MySQL client tool is sometimes called the MySQL. monitoring MySQL because MySQL is very sensitive to performance issues of the host operating system. There is an entire chapter in the online MySQL Reference

Ngày đăng: 24/10/2013, 15:15

Từ khóa liên quan

Tài liệu cùng người dùng

Tài liệu liên quan