Slow with 2 users on Synology SAN

Hi,

When using our C10 application the performance with 2 people at the sametime is very very slow. We are using it on a Synology DS214Play. The database contains 2500 customers, 2600 dogs and 5000 courses. When a second person opens a browse window the performance is gone.

Thanks!

Are you usng TPS files?
If so I would assume you’re being hit with the oplocks effect. 1 person is fast because they are allowed to cache data locally. when a 2nd and 3rd arrives you can no longer cache and drop to normal wire speeds.
You can alter some params or turn off oplocks. But really thats just the way it is.

Also, is this on a local network or are the clients connecting over the internet?

Hi Yes it’s TPS and I have disabled oplocks but that didn’t work. The network speed couldn’t be the issue, I have created C55 apps on an Netware network with 10 users working at the same time and no issues…

I’ve taken a few days before posting to avoid ranting too much. I’ll try and keep this post rant free. I suspect I’ll fail;

"Are you using TPS files?If so I would assume you’re being hit with the oplocks effect.

Two things are important to understand here;
a) Oplocks (Opportunistic Locks) do not slow the program down. They speed it up. They allow files to be cached locally but only when one user is using the program. It’s traditional to turn them off (to avoid possible file corruptions) but in themselves they are not the problem.

The “one person fast, second person slow” is “caused” by Oplocks, but they cause the “one person fast” not the “second person slow”.

b) >> " the performance with 2 people at the same time is very very slow. "
While “performance” covers a range of possible situations, (do you mean read-speed? write-speed? All browses are slow? Some browses are slow? Reports are slow?) I’m going to assume you mean that specific browses take a long time to load - as this is what most people notice.

This is caused by you “doing it wrong”. Specifically you should test your problem browses in the following 2 ways;

  1. remove the filter? Does that make it faster? Most programmers create terrible filters without matching keys. Which means whole-table-scans - which are slow.

  2. remove embed code. Does that make it faster? Lots of programmers write unnecessary embed code (like doing manual record FETCHES instead of just adding to the browse VIEW). Worse, filtering in code is “client side” which is the slowest filtering there is.

So my suggestion to you is find out which browse is slow, then deploy test versions of the browse to see which technique you’ve used is causing the slowness.

Of course it’s possible that the LAN is just congested, or the SAN is just slow (both helped in the single-user case by local caching) but more often it’s your code that’s bad, not the network.

Cheers
Bruce

And is there a solution? (other then not using a NAS).

We use Synology boxes and don’t have an issue.
12 of us use an RS2418+ with multiple tps files, some have >1 million records.
A few of us test via a more domestic DS918 again without issue.

Our RS2418 is populated with SSD giving far greater performance than the Windows domain controller that it replaced.

Could be a network cable between switch and workstation.
Simple test is using file explorer copy a sizable folder ~1gb in size, from server/nas/central file store to workstation, log time taken. Copy folder back, log time.
Repeat on different workstation. Workstation with slowest time could have a dodgy network cable which needs swapping out or reterminating if hand made.

If slow on all workstations could be cable between switch and server/nas/central file store. This assumes same speed nics on all workstations to switch and the switch is not congested with other traffic.

Oplocks off, smb1/2/3 need reg settings checked on all workstations, I used to code that check into the apps and it was performed when the app started but server/nas/central file store need checking as well. Windows servers could have a service that simply checked these settings periodically. Theres posts on here which can be searched for exact info.

Windows updates and other apps could change these settings as could firmware updates on nas.

Re cables, if not shielded does the cable trucking/cable runs pass by electrical cables or electrical machines. Magnetic flux leakage as seen in hifi can interfere especially on long cables. Managed Switches have an interface, typically webpages and a command line which besides being used to configure the switch they can also perform tests on cables including approximating the length of the cable which can be handy. Check for firmware updates for the switch as well.

I have now a DS720+ performance with 1 user no issue, but when I second user start using the prog it still is a disaster. I going to look if SSD will help.

I don’t believe SSD is the answer.
Once a conventional HDD is up and spinning a second user shouldn’t have much impact so I think you need to look elsewhere for the bottleneck.

NAS units don’t tend to have very much memory and it appears this unit only has 1G so having two users access that drive together would seem to be pushing the boundaries of what the unit is designed to provide.

I have two Synology NAS units but they are only used for folder and disk image backups. I’ve never used one to store data that needs to be readily available.

1 Like

Is the browse on a single table or does it contain data from two or more joined tables?

I’ve had bad past experience with joined TPS tables when multiple users were accessing.

While faster drives will probably help a little, I suspect that the two person slow problem is caused by the code you have written. Bruce, six years ago, gave some advice, but I think those would have overall slowness as a symptom, not just second person slow.

IMO the problem is likely to be caused by conflict writing to a file. One thing it could be is that you turned on some sort of tracing and didn’t turn it off, so on each disk access your two users are competing to write into the log file. You might get similar if you have some sort of auditing that causes write conflicts.

I think @Jane is right. I have some tables which are related. Also in one window multiple tables with relations are shown. But installing a separate SQL server is a bit to much.

I don’t think you should give up that easily! Firstly, people are going to pile in here and say they have TPS systems with 25 joined tables and 5000 simultaneous users, and no trouble. Won’t be me, because I mostly haven’t used TPS for many moons. But I’m pretty sure that people will point out that no one would ever have used TPS if it didn’t handle multiple users and joined tables well most of the time.

Secondly, there are many different flavours of SQL systems. Unfortunately Clarion does not work well with the SQLite driver, but you could easily use SQLite or Firebird (but probably not embedded Firebird), or Postgres. There is a dedicated server process, so I think the way you would have to set that up (if you want to keep your data on the NAS), is to have the server process on a computer that has access to the NAS. Your two users would have to be able to talk to that “server”. Can be the same machine as one of your users.

A fairly simple solution to the 2-user slow problem with TPS files is to change it from connecting to a shared folder on a network server and everyone running the application on their local computer (with data records going over the network), to signing on the server and running the application on the server (and the data is transmitted from its local drive). There is no Oplock issue.
But you are limited to only 2 admin user accounts when you sign on to a server. You can buy client access licenses from Microsoft or a license from TSplus.net to have as many users as you need to sign on.
You are limited by the server’s RAM. Probably 15 concurrent users for 8 GB RAM; probably 40 for 16 GB RAM.
Performance will be about the same for one user or for multiple users.
TSplus lets you use a Windows Pro computer for the server.
TSplus lets you create a little web page so you can sign on using a browser. (Your Clarion app is still a Windows app; just the sign on to the server is a little web page.
You can still print to your local printer (just fine).
You can open Excel, Word, PDF files that are on the server using your local Excel, Word or PDF application.
The server can be a cloud server and you will still get the same fast performance. Your users can be anywhere (with access to the internet).
Bob