Options

Performance different when using service or direct connectio

PoltergeistPoltergeist Member Posts: 200
We have some performance issues with some code we've written. Trying to solve one and other, we noticed a big difference in performance, when opening the database in different ways.

First off, we opened the database (which is a 4.00 native DB) using a service. When opening a form, it takes (across the network) approximately 11 seconds to open the form. the server is a Xeon 3.4 Ghz machine, and cache is 100000 bytes (approx. 100 MB). Commitcache is on.

After that, we stopped the service, but left the database on the server. Shared the directory, and opened the database from a client through an UNC path (e.g. \\server\share\database.fdb). With the same database, on the same network (even using the same cables), opening that same form took approx 6 seconds. The database is on the exact same location as before, but performance is almost twice at fast!

Then, I started a client on the server, using the Navision service. Opening the form now took approx. 6 seconds. Opening the database locally with the client on the server, the form opened in less then 4 seconds. Again, almost a factor 2 faster.

I do understand that the network causes delays, but what I do not understand is why opening the same database directly with the client is much faster (it's almost twice at fast!) then when using the client/server model, even across the same network link.

If someone could shed some light on this, please do!

Comments

  • Options
    kinekine Member Posts: 12,562
    There are many sources of this:

    1) In your scenario you do not think about system disc cache. After first access to e DB file, something will be in cache and access to this file will be faster. (if you want to measure the times correctly, you need to do restart beteen the tests - restart of the server...

    2) If you are using service, do not forget that this service have some DB cache (for example 700MB) and it need somewhen allocate the memory etc. The client have the cache too, but smaller. It may be difference...

    3) The DB service means some Overhead of course, it need some checking etc... (I think that it is the biggest part of the difference)

    4) If you hve performance problems, do not forget, that in any cases is required to have 64MB Object cache on the client to have faster reactions when opening forms etc.... Navision 4.00 have bigger object cache as default...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • Options
    PoltergeistPoltergeist Member Posts: 200
    1. True. After opening the same form for the second time, it goes slightly faster. Times mentioned are times taken after a restart of the service (not the complete server) and the client.
    2. For this test, a 100MB cache size was used. With two users and a 700 MB file (50% used) this should be more then enough, I'd say.
    3. Some overhead is always needed. However, doubling the time is a lot of checking...
    4. Strangely enough, altering the cache sizes on the client (both object cache and "normal" cache) did not change the performance. Not when using a service, not when opening the database locally. At least not more then what can be contributed to standard deviations.
  • Options
    kinekine Member Posts: 12,562
    OK, than some other reason can be there... ;-)

    May be that service have another system priority than user Application... no more tips for you yet...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
Sign In or Register to comment.