I have used:

ps ax |grep chrome

That gave the following along with other details:

 6254 ?        SLl    0:01 /opt/google/chrome/chrome
 6265 ?        S      0:00 /opt/google/chrome/chrome --type=zygote
 6266 ?        S      0:00 /opt/google/chrome/nacl_helper
 6269 ?        S      0:00 /opt/google/chrome/chrome --type=zygote
 6328 ?        Sl     0:00 /opt/google/chrome/chrome --type=gpu-process --field-

As I understand, first column give the process IDs . In order to assess the performance of chrome which process I need to track? 6254 or 6328?


Google Chrome uses multiple processes at once as part of its ordinary operation, and all the processes that you're seeing listed are Google Chrome. When you do more with the browser, more will appear. Processes will also terminate during the normal course of using Google Chrome. Which process or processes you will be interested in monitoring depends on why you are monitoring them in the first place, but if you want to see what resources Google Chrome is consuming, then you will likely want to look at all of them.

The Chromium and Google Chrome browsers use multiple processes for things that most browsers use multiple threads in the same process. Although there is a main "browser" process that creates the browser's own user interface, accesses data on disk, and communicates over a network, this isn't necessarily the process that will be using the most CPU or memory resources. More often than not, creating a new tab and navigating to a website creates a new process, and closing such a tab terminates the process.

Chromium and Google Chrome use the boundaries between processes, provided and enforced by the kernel of the operating system, as a form of sandboxing to maintain higher security and stability. For example, separate processes cannot easily read and write one another's memory, while different threads in the same process may easily do so.

As for how you will go about examining all these processes, that depends on what you are actually looking for. But if you are interested in how many CPU cycles are used and how much memory is consumed, this will likely be spread across the different processes. You can use top or htop to examine this. (Your system should provide a top command; the htop command, you'll probably have to install, but some users prefer its interface.) You can list processes in real time by CPU, memory consumption, or usage of other resources. Many systems also have graphical programs that serve this purpose.

If you are interested in disk usage, that might be largely confined to a single process, but I still suggest examining all of them. If you are troubleshooting unexpectedly bad performance, it's useful to avoid unnecessary assumptions. In particular, plugins typically run in separate processes, and I believe some of those may directly access the disk.

Running top may provide you with some useful information about disk usage, on some systems. You haven't said what OS you're running, but the format that ps uses for output suggests you might be running GNU/Linux. On GNU/Linux systems like Fedora, CentOS, Debian, and Ubuntu, I often find it beneficial to install and run iotop to see disk usage. Usually it must be run as root (e.g., sudo iotop).

Similarly, for network usage, you may find it useful to install and run bwm-ng.

|improve this answer|||||
  • I am interested to know the RAM access pattern. Not the overall usage statistics – Dileesh Dil Nov 15 '17 at 7:41
  • @DileeshDil For memory usage, you'll almost certainly be interested in all the processes. You can use top for this (the syntax to tell it to sort by memory usage differs across operating systems), as well as other tools. If you're interested more specifically in strategies for profiling memory usage, then you'll need to describe your goals more specifically, and I think that would probably be considered a separate question, though you could edit this question with more information about it if you think it belongs here. – Eliah Kagan Nov 15 '17 at 7:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.