Archived

This forum has been archived. Please start a new discussion on GitHub.

Questions.

1) What's glaicerstarter? I read some threads in the forums about it but can not find it in the doc. and src. An obsolete application?

2) How to select the stack size of glacier2? Of course I know it depends on the applications,but are there some generic advices?

3) So for as the demo glacier2/callback, the stack size is 256K, that is, if there are 8000 clients at the same time, it needs about 8000*3*256K=6G memory? Is it possible in win32 platform? In another words, is there a limitation of the maximum clients? For example, assuming the 2G user address space in NT, only about 2000 clients are permitted at the same time?
I guess Glacier2 selected the thread-per-connection mode just to deal with the situation where may be hostile clients and made a tradeoff with the threadpool mode. If is it possible to provide a property in config file to allow user to choose between the two modes just like other ice app.?

I am confused about this very much though Marc have once explained this issue in other thread.

4) If memory is not enough, the galcier2 will break down or just the new clients can not connect to the glacier2?

Comments

  • bernard
    bernard Jupiter, FL
    OrNot wrote:
    1) What's glaicerstarter? I read some threads in the forums about it but can not find it in the doc. and src. An obsolete application?

    Yes, glacierstarter was part of Glacier 1; it was used to start one process per session.
    OrNot wrote:
    2) How to select the stack size of glacier2? Of course I know it depends on the applications,but are there some generic advices?
    Why does it depend on the application?
    The stack size is not RAM consumed by each thread, but really virtual address space consumed by each thread. It's not very difficult to reach the virtual address space limit with a big stack size and many threads!
    OrNot wrote:
    3) So for as the demo glacier2/callback, the stack size is 256K, that is, if there are 8000 clients at the same time, it needs about 8000*3*256K=6G memory? Is it possible in win32 platform? In another words, is there a limitation of the maximum clients? For example, assuming the 2G user address space in NT, only about 2000 clients are permitted at the same time?
    I guess Glacier2 selected the thread-per-connection mode just to deal with the situation where may be hostile clients and made a tradeoff with the threadpool mode. If is it possible to provide a property in config file to allow user to choose between the two modes just like other ice app.?

    I am confused about this very much though Marc have once explained this issue in other thread.
    According to Microsoft the virtual address space limit for 32-bit Windows is either 2GB or 3GB.
    If you need more threads, try a smaller stack size. Glacier2 uses only thread per connection; it's not configurable.
    OrNot wrote:
    4) If memory is not enough, the galcier2 will break down or just the new clients can not connect to the glacier2?
    I don't know, but it's easy to try.

    Cheers,
    Bernard
  • hi, Bernard,
    Why does it depend on the application?
    You are right. The stacksize of the Glacier2 is only used by itself.
    But, if the stacksize of the glacier2 can be set in config, what is the floor limit?
    The stack size is not RAM consumed by each thread, but really virtual address space consumed by each thread. It's not very difficult to reach the virtual address space limit with a big stack size and many threads
    I know this. What I man is how Glacier2 deals with very huge number threads at the same time. This is also what I want to know in the third question. Assuming the following conditions:
    1) 2G virtual meromy
    2) 8000 connections at the same time, client and server buffered.

    The stacksize is approximately : 2,000,000 K/ 8000/3=80K.
    80K is enough for one thread of Glacier2? This is same as the above question about the floor limit. Or, I can freely set the stacksize of the glacier2?
    I think that there should be a floor limit. I wonder why not set this floor limit interally. What is the reason to give out this property in config? :)

    BTW: How to use Glacier2 with ICEbox?

    Thanks alot.
  • bernard
    bernard Jupiter, FL
    Setting the stack size of threads created by Ice thread pools is not specific to Glacier2 ... the ThreadPoolName.StackSize property applies to any Ice application.

    We did not research the minimum stack size for Glacier2 threads; I suspect a few KBs are sufficient. In the real world, this thread stack-size is not going to be the limiting factor for your Glacier2 process; presumably all your clients are not idle and you want a reasonable response time.
    I recommend you run a benchmark with a typical workload (specific to your application) to find out how many clients a Glacier2 process running on your Windows PC can handle.

    Glacier2 is not an IceBox service, so you can't load it as an IceBox service. But obviously you can use IceBox servers with Glacier2.

    Cheers,
    Bernard
  • I think I have gotten a very good and clear answer.
    Thank you Bernard, thank your time.


    Best Regards
    OrNot