How To Determine Which Network Programming Architecture Is Being Used
Figure 1 | Figure
2 | Figure 3 | Sidebar 1 | Sidebar
2 | Article
Most program documentation remains vague about which network programming architecture
is used. Since the architecture is the single strongest determinant of performance
under load, you need a way to find out. Below are techniques you can use snoop
on an application, even if you do not have access to the source code. First,
you must set up a load-creating situation, with at least 200 simultaneous tasks.
Then, examine how the process is running with various tools:
Linux
- Run
top
- One-process-per-task Many processes running, all with a different
amount of memory use.
- One-thread-per-task Many processes running, all with the same amount
of memory use, and the number of processes changes over time.
- One-thread-many-tasks (one thread) A single process running.
- One-thread-many-tasks (several threads) Many processes running,
all with the same amount of memory use, and the number of processes is less
than 100.
Solaris
- Run
ps -efL. The NLWP column indicates
how many lightweight processes are running inside each process,
and lists each LWP in a separate row.
- One-process-per-task
ps -efL reports multiple
copies of your application, but each has a different process ID, then the
application uses the process-per-task approach.
- One-thread-per-task Multiple processes reported by
ps -efL
for your application. If all have the same process ID, and the number of copies
changes over time, then the application uses the one-thread-per-task (multi-threaded)
approach.
|