467,144 Members | 1,143 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,144 developers. It's quick & easy.

Performance of separate processes V threads

Hi,

I am trying to understand the performance implications of running a
number of separate ActiveXexe processes as opposed to a single
ActiveXexe with multiple threads on a Windows 2000 server.

I have been told that Windows does not allocate a fixed memory space
to its processes, so they are always paged off to disk when inactive.
However, all the threads in a single process operate within the same
memory space, so are relatively quicker (presumably, if the single
process remains active, then all the threads will remain in memory,
not getting paged to disk).

This seems reasonable, except that the Windows server being used has
about 3GB of memory, each process takes up approximately 40k and there
will be only about 10 of these processes running in total. Surely
Windows will only write the processes to disk when it has no memory
available? Why would it use disk when there is still a lot of
available physical memory?

Thanks.
Jul 17 '05 #1
  • viewed: 1623
Share:
1 Reply

"Michael Williams" <mi****************@iname.com> wrote in message
news:c8**************************@posting.google.c om...
Hi,

I am trying to understand the performance implications of running a
number of separate ActiveXexe processes as opposed to a single
ActiveXexe with multiple threads on a Windows 2000 server.

I have been told that Windows does not allocate a fixed memory space
to its processes, so they are always paged off to disk when inactive.
However, all the threads in a single process operate within the same
memory space, so are relatively quicker (presumably, if the single
process remains active, then all the threads will remain in memory,
not getting paged to disk).

This seems reasonable, except that the Windows server being used has
about 3GB of memory, each process takes up approximately 40k and there
will be only about 10 of these processes running in total. Surely
Windows will only write the processes to disk when it has no memory
available? Why would it use disk when there is still a lot of
available physical memory?

Thanks.


Here's two cents worth:

I think "always paged off to disk" should be changed to "always may be
paged off to disk". If, when, for how long, and why are questions best
left unanswered. Treat virtual memory as if it were memory, and leave
the management to the virtual memory software. In your case, there is a
very good chance they will not be paged out, unless the server gets very
busy with other tasks.

Separate processes have the advantage of being isolated from each
other - if one dies, the others are unaffected. Threads in a single
process will live or die together.

If you need a lot of shared data among the instances, marshalling data
across processes is quite a bit slower than using shared memory within a
process. If you don't need or use a lot of shared data, this is no
concern.

Jul 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by joerg | last post: by
8 posts views Thread by Michael C | last post: by
2 posts views Thread by Shahid Siddiqui | last post: by
35 posts views Thread by Carl J. Van Arsdall | last post: by
12 posts views Thread by Ilyas | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.