Alpha Software Mobile Development Tools:   Alpha Anywhere    |   Alpha TransForm subscribe to our YouTube Channel  Follow Us on LinkedIn  Follow Us on Twitter  Follow Us on Facebook

Announcement

Collapse

The Alpha Software Forum Participation Guidelines

The Alpha Software Forum is a free forum created for Alpha Software Developer Community to ask for help, exchange ideas, and share solutions. Alpha Software strives to create an environment where all members of the community can feel safe to participate. In order to ensure the Alpha Software Forum is a place where all feel welcome, forum participants are expected to behave as follows:
  • Be professional in your conduct
  • Be kind to others
  • Be constructive when giving feedback
  • Be open to new ideas and suggestions
  • Stay on topic


Be sure all comments and threads you post are respectful. Posts that contain any of the following content will be considered a violation of your agreement as a member of the Alpha Software Forum Community and will be moderated:
  • Spam.
  • Vulgar language.
  • Quotes from private conversations without permission, including pricing and other sales related discussions.
  • Personal attacks, insults, or subtle put-downs.
  • Harassment, bullying, threatening, mocking, shaming, or deriding anyone.
  • Sexist, racist, homophobic, transphobic, ableist, or otherwise discriminatory jokes and language.
  • Sexually explicit or violent material, links, or language.
  • Pirated, hacked, or copyright-infringing material.
  • Encouraging of others to engage in the above behaviors.


If a thread or post is found to contain any of the content outlined above, a moderator may choose to take one of the following actions:
  • Remove the Post or Thread - the content is removed from the forum.
  • Place the User in Moderation - all posts and new threads must be approved by a moderator before they are posted.
  • Temporarily Ban the User - user is banned from forum for a period of time.
  • Permanently Ban the User - user is permanently banned from the forum.


Moderators may also rename posts and threads if they are too generic or do not property reflect the content.

Moderators may move threads if they have been posted in the incorrect forum.

Threads/Posts questioning specific moderator decisions or actions (such as "why was a user banned?") are not allowed and will be removed.

The owners of Alpha Software Corporation (Forum Owner) reserve the right to remove, edit, move, or close any thread for any reason; or ban any forum member without notice, reason, or explanation.

Community members are encouraged to click the "Report Post" icon in the lower left of a given post if they feel the post is in violation of the rules. This will alert the Moderators to take a look.

Alpha Software Corporation may amend the guidelines from time to time and may also vary the procedures it sets out where appropriate in a particular case. Your agreement to comply with the guidelines will be deemed agreement to any changes to it.



Bonus TIPS for Successful Posting

Try a Search First
It is highly recommended that a Search be done on your topic before posting, as many questions have been answered in prior posts. As with any search engine, the shorter the search term, the more "hits" will be returned, but the more specific the search term is, the greater the relevance of those "hits". Searching for "table" might well return every message on the board while "tablesum" would greatly restrict the number of messages returned.

When you do post
First, make sure you are posting your question in the correct forum. For example, if you post an issue regarding Desktop applications on the Mobile & Browser Applications board , not only will your question not be seen by the appropriate audience, it may also be removed or relocated.

The more detail you provide about your problem or question, the more likely someone is to understand your request and be able to help. A sample database with a minimum of records (and its support files, zipped together) will make it much easier to diagnose issues with your application. Screen shots of error messages are especially helpful.

When explaining how to reproduce your problem, please be as detailed as possible. Describe every step, click-by-click and keypress-by-keypress. Otherwise when others try to duplicate your problem, they may do something slightly different and end up with different results.

A note about attachments
You may only attach one file to each message. Attachment file size is limited to 2MB. If you need to include several files, you may do so by zipping them into a single archive.

If you forgot to attach your files to your post, please do NOT create a new thread. Instead, reply to your original message and attach the file there.

When attaching screen shots, it is best to attach an image file (.BMP, .JPG, .GIF, .PNG, etc.) or a zip file of several images, as opposed to a Word document containing the screen shots. Because Word documents are prone to viruses, many message board users will not open your Word file, therefore limiting their ability to help you.

Similarly, if you are uploading a zipped archive, you should simply create a .ZIP file and not a self-extracting .EXE as many users will not run your EXE file.
See more
See less

Network / Multiuser very slow!

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Network / Multiuser very slow!

    Hi all,

    Situation:
    3 computers running windows XP, connected via 1Gbit switch - no server.
    database is on one of them and entire folder is shared for rest of the users.

    When any of the computers opens the Data Base alone (no other computers are connected) everything works fine - on every computer the same performance - does not matter if the DB is on local disk or networked.
    I have one form that does some calculation and I measure the time of that calculation - it is around 0.2 sec for average data.

    The moment other computer over the network connects to the DB performance rapidly drops!!
    Now the average time for the same calculation is around 2.0 sec! - 10 TIMES MORE! Whole application just slows down and is really annoying to use!

    I have done more tests:
    -> when several users open the same application from one computer (i have open 3 times runtime version on my desktop) everything works fine!
    -> when two computers run the application from the networked hard drive (the shared one) both of them run slow!
    -> when two computers run the same app. - one locally, one over the network the computer reading from local hard drive runs OK when the other runs SLOW.

    -> it does not matter whether computer uses Shadow Database from its local hard drive or reads straight from the networked drive - it is small difference between shadow and reading from network but it is nothing comparing to the 10 times slowing down for more than one user.

    one more thing - I can not blame the hardware - all the computers are new (2 x Intel Xeon 2GHz 4 cores).

    If somebody has similar issue please share with me your solution(s) - if there is any.
    I hope it is due to my poor development - not to Alpha5 problems - the first one can be easily changed ;)

    #2
    Re: Network / Multiuser very slow!

    I'm thinking it is because you don't have a server. The one computer with the database on it is in use and has to use its resources to run that computer plus act as a server which deminishes the resoureces it has available to share the database with the other two users.
    Dan

    Dan Blank builds Databases
    Skype: danblank

    Comment


      #3
      Re: Network / Multiuser very slow!

      Check your anti-virus settings. Have you disabled real time checking for reads and writes to the database folder?

      Comment


        #4
        Re: Network / Multiuser very slow!

        Hi Jarek,

        The amount of memory on your database computer probably should be 1 Gigabyte of memory at least, 2 Gigabytes or more even better. You should also check if any virus scanning programs are active on that directory, as that can slow things down as well in some cases.

        Where you run each computer's Alpha 5 exe, and the temporary and private directories should be on the local drive for all computers.

        If anything else is using the network (doubtful), it should not be maxing out the network ever.

        The indication you've outlined is that the moment the database is shared, the speed drops. Check if that is really so from each of the non-database computers while the database computer has Alpha 5 open on the database.

        Finally, what is the expression/code of the calculation that increases 10 times? There may be something wrong there, e.g. no LQO. How many records are in the table that the expression uses?
        Regards,

        Ira J. Perlow
        Computer Systems Design


        CSDA A5 Products
        New - Free CSDA DiagInfo - v1.39, 30 Apr 2013
        CSDA Barcode Functions

        CSDA Code Utility
        CSDA Screen Capture


        Comment


          #5
          Re: Network / Multiuser very slow!

          This issue sounds very strange. Most definitely will be hard to pin point with the currently available information.

          You will need to help troubleshoot and eliminate items in order to pin point the issue.

          I would start with the Anti-virus software. Completely disable it on your test machines when testing.

          Weather or not you need to bring a server into the enviroment I would be hesitant. If you machines are running Xeon processors you already have server spec'd processors. But in this situation I would hazard to guess that the processor's are not being over worked. The memory and networks could need an upgrade but honestly with Windows XP 512MB is plenty. If all you are running is alpha5 and AV you should have plenty of memory in an XP machine with 512MB. Vista needs a 1GB to start and then upgrade to 2GB but XP is much more efficient than Vista will ever be.

          You say you have a gigabyte switch but are the network cards also gigabyte? Even if you are running 10Mbps or 100Mbps I do not believe that you should be seeing these issues based on network speeds.

          In your testing you need to determine if the problem is hardware or software.
          Hardware side you have...

          Hard drive speed
          Network speed
          Memory speed and size
          Processor

          Software side you have...
          Operating system (XP is proven reliable- safe to eliminate this)
          Anti-virus (disable during testing)
          Alpha5
          Your database.


          Here is how I would proceed.
          Performance Monitoring - this tool will help eliminate if the issue is with your
          hardware. http://www.windowsnetworking.com/art...-Counters.html There is alot of information out there explaining how to configure and read the tests / results. This only scratches the surface. These tests will be the deciding factor if you need to upgrade your hardware.

          Single machine test. You mentioned that you tested on a single machine but did not mention the test procedure you used or if it was the same test that you used when testing across multiple machines. I would develop a set test routine that you know will generate the symptoms. Then using that test procedure I would test on a single machine with the database being local and then I would test on a single machine with the database being hosted on another machine.

          When testing and using multiple machines what are the other machines doing during the test? Do you just have the control panel open or are people trying to open forms, input data, sort data, run reports? All of this should be part of your test routine. You will need to determine when something works and when it does not and what the differences / similarities are at those times.

          With all of that said I will state I would start my investigation at the development side of your database. Two ways to do it, search the forums for the posts dealing making your database efficient and what issues others have done and how they have fixed them. Starting points are with set design (simple is best, many small sets are better than one big set). The next item is indexes.
          The next way is to post a working sample of the database with fictitious data. So that others may have a look, might be something that you are simply over looking that a different set of eyes will be able to spot.
          Andrew

          Comment


            #6
            Re: Network / Multiuser very slow!

            Thank you very much for all your replies!

            I will try to make an example application and show what exactly I have in mind.
            Yesterday I made some more tests and I have found out that when one computer makes an operation on the table - for example adds values from one filed for every record and at the same time other computer opens that table too then the speed drops dramatically.

            I know that we will have to buy the server (sooner or later for other purposes- not mainly for alpha) but I don't know if this will help much?
            Alpha5 is not really working as a database server - unless the Application server is created but just for the web pages applications?
            Could somebody explain me that? What will be the use of the server for my Alpha5 application (I just use the forms and reports - no www pages)?
            Will there be any difference from sharing the folder with database on one of the computers?
            Has this performance issue something to do with windows XP and some limitations about reading one file by many users?

            Once again there is no problems with the hardware - 2 quad core processors @ 2.0GH, 4Gb of RAM and dissent graphic card and 1Gbit working network on manageable switch can not be too week for alpha purposes.

            Thanks,

            Comment


              #7
              Re: Network / Multiuser very slow!

              We run a very large network using servers. It is paramount to make sure real time file system scanning is OFF for your data folders. Antivirus Software will bring any activity to its knees because each time anyone attempts to access even a single record, Antivirus kicks in and does its thing.

              Tom

              Comment


                #8
                Re: Network / Multiuser very slow!

                Thanks Tom,

                I'm pretty sure that the antivirus is disabled.

                Will use of the server give me better performance at all? - for desktop application use of Alpha five?


                If yes then how the server will be configured - Installing alpha on server will have no use at all, In my opinion!?

                Comment


                  #9
                  Re: Network / Multiuser very slow!

                  Yesterday I made some more tests and I have found out that when one computer makes an operation on the table - for example adds values from one filed for every record and at the same time other computer opens that table too then the speed drops dramatically.
                  This kind of test is very different from what you described initially. When you run the operation Alpha fires record changes at the table at a speed that resembles dozens and dozens of separate workstations sending single record changes in rapid succession. A slow down should be expected, given the file sharing model Alpha Five desktop apps employ. If running a table wide update operation against a live table used for transactions by other workstations is required, you might want to rethink your design, or look for ways to speed up the operation, and lock out other users altogether (until the op has finished).

                  Comment


                    #10
                    Re: Network / Multiuser very slow!

                    Attached simple application.
                    One table, one form and some script counting sum of all records.

                    Compared two methods - loop and tablesum function.
                    Attached also my results for:
                    - desktop computer (where the database is)
                    - connected laptop (reading the db from desktop) when no other user opens the table
                    - laptop when both computers open the form.

                    Is this normal behavior?

                    Comment


                      #11
                      Re: Network / Multiuser very slow!

                      Hi Jarek,

                      Originally posted by JarekZ View Post
                      Attached simple application.
                      One table, one form and some script counting sum of all records.

                      Compared two methods - loop and tablesum function.
                      Attached also my results for:
                      - desktop computer (where the database is)
                      - connected laptop (reading the db from desktop) when no other user opens the table
                      - laptop when both computers open the form.

                      Is this normal behavior?
                      I ran some tests on my A5V8 systems and saw similar times that you saw.

                      I tried tbl.batch_begin() and tbl.batch_end() with no improvements and it apparently doesn't work with Read-Only table opens (I'd say that this should not matter and would say it should still work for R/O)

                      However, it seems that by some process step I can't identify, at points the table seemed to go back to the faster speed after editing the script. So there might be a bug here, but I've yet to identify the cause

                      On the other hand, one might ask what the issue is with using tablesum() for you? It is a lower-level (read as faster) function of Alpha 5. It would potentially always be faster than an XBasic loop.
                      Regards,

                      Ira J. Perlow
                      Computer Systems Design


                      CSDA A5 Products
                      New - Free CSDA DiagInfo - v1.39, 30 Apr 2013
                      CSDA Barcode Functions

                      CSDA Code Utility
                      CSDA Screen Capture


                      Comment


                        #12
                        Re: Network / Multiuser very slow!

                        Thanks Ira for reply,

                        good that somebody gets the same results - it is not my antivirus then..


                        Originally posted by csda1 View Post
                        On the other hand, one might ask what the issue is with using tablesum() for you? It is a lower-level (read as faster) function of Alpha 5. It would potentially always be faster than an XBasic loop.
                        yes you are right, for this particular example tablesum is perfect, however in my real application I have to do some more complicated operation than just sum up the values. Ive just put it here to make my point more visible - but difference in time can be also visible for tablesum.

                        So the question now is ... what do we do about it? and will server with real server software help here at all - Im pretty sure that this situation will not take place for 'real' database like MySQL for example - weekend is coming and ill test it too.

                        Any more opinions?

                        Comment


                          #13
                          Re: Network / Multiuser very slow!

                          Hello,

                          If somebody is still interesting in that topic:

                          I have tried the same thing using MySQL & PHP and off course situation like that (slowing down when more users reads the same table) has no place.

                          I have done some more test and I found out that quering table that is opened by other user is ridiculously slow!

                          I have attached a simple app that is showing what i have in mind.
                          When you run script2 on the form you will see times for 3 different methods that can be use to achieve the same result. In my case all times are similar when one computer uses the table. When other user connects then quering the table is almost impossible.

                          The worst thing is that when you develop and application everything seems ok but when application starts to work on network then speed problem is an issue!

                          Can somebody point my mistake(s) and show me better way than in the attached app?

                          In my real application I use a lot of onFetch events (that by the way seems not working in the newer patches than 3212) where script is counting different things (and very often quering some tables many times).That application is almost impossible to work on the network.
                          Now I have to rebuild all the application and search for alternative approaches - I wish I know about it before I have started to work with Alpha!

                          Thanks for help!

                          Comment


                            #14
                            Re: Network / Multiuser very slow!

                            Jarek,
                            I took a look---Is it necessary to have your queries inside your loop?? I would think not and if not by placing them prior to your loop the query (and the others as well) significantly speed up.....also made your two indices for ALL instead of Unique so as to satisfy LQO--I will have to check out if this actually helped at all though.

                            Try this and if the results are still what you want, then the speed increase should help....
                            Mike
                            __________________________________________
                            It is only when we forget all our learning that we begin to know.
                            It's not what you look at that matters, it's what you see.
                            Henry David Thoreau
                            __________________________________________



                            Comment


                              #15
                              Re: Network / Multiuser very slow!

                              Mike,
                              Thank you very much for your interest in that post.

                              Originally posted by MikeC View Post
                              Is it necessary to have your queries inside your loop?? I would think not and if not by placing them prior to your loop the query (and the others as well) significantly speed up.....
                              I'm not sure if I understand what you are saying... I will try to play with it though.

                              If you have some time to spare, could you modify my application and post it back here? - My problem is that I don;t really get the Idea of indexes and how to properly use them... (it is sad i know)

                              Originally posted by MikeC View Post
                              also made your two indices for ALL instead of Unique so as to satisfy LQO
                              After doing that alpha is showing an error that some temporary file can not be created...

                              Your help is greatly appreciated.

                              Comment

                              Working...
                              X