SlideShare una empresa de Scribd logo
1 de 61
Descargar para leer sin conexión
Performance - Under The Hood 
Jon Thatcher 
FileMaker, Inc. 
FileMaker Konferenz 2014 Winterthur 
! 
www.filemaker-konferenz.com 
Jon Thatcher 
Performance - Under The Hood
Who is Jon Thatcher? 
• Lead Software Engineer on Database Server 
• 25 years at FileMaker (and Claris) 
• Directed development of Draco engine, FileMaker Pro and 
Server 7 
• Helped Clay Maeckel ship the first FileMaker Server in 1994 
• Worked on FileMaker Pro starting in 1993 
• Previous experience at Intel, Convergent Technologies, and 
Esvel (database startup) 
Jon Thatcher 
Performance - Under The Hood 
FileMaker Konferenz 2014 Winterthur 
! 
www.filemaker-konferenz.com
Performance - Under The Hood: Agenda 
• Under The Hood 
• How and when FileMaker moves and caches data 
• Some Performance Dos and Don’ts 
• Measuring performance in your own solutions 
• When and how to measure performance 
• Real-world performance diagnosis examples 
Jon Thatcher 
Performance - Under The Hood 
FileMaker Konferenz 2014 Winterthur 
! 
www.filemaker-konferenz.com
How FileMaker moves data 
• Data read the first time it is needed 
• Read from disk into Server RAM cache 
• Read from Server into the client RAM cache / temporary file 
• Data uploaded from clients to Server temp file 
• Only Server commits data from temp file to main database 
• Result: network failure during upload from client has no 
impact on the main database 
Jon Thatcher 
Performance - Under The Hood 
FileMaker Konferenz 2014 Winterthur 
! 
www.filemaker-konferenz.com 
Will talk more about the client temporary file in a bit…
How FileMaker moves data 
Jon Thatcher 
Performance - Under The Hood 
Main DB 
FileMaker Konferenz 2014 Winterthur 
! 
www.filemaker-konferenz.com 
Client RAM 
Host 
Client 
Read / Write Read / Write Temp File 
Read / Write 
FMS RAM 
Read / Write 
Read / Write 
Temp File 
Read / Write
FileMaker moves data in whole units 
• Whole record, script or layout is moved at once 
• All stored fields* of a record are moved at once 
• All steps in a script, all objects* on layout moved at once 
• *Except for container fields or layout images 
• Only the container or image key in library is moved 
• Unstored fields are never downloaded or uploaded 
• Tip: “wide” tables, complex layouts and huge 
scripts are slow to load over WAN 
Jon Thatcher 
Performance - Under The Hood 
FileMaker Konferenz 2014 Winterthur 
! 
www.filemaker-konferenz.com 
Unstored calculation and summary fields are just that, unstored.
“Demo” opening a wide table over WAN 
Jon Thatcher 
Performance - Under The Hood 
FileMaker Konferenz 2014 Winterthur 
! 
www.filemaker-konferenz.com 
Not a real demo, but the time taken to open this database over the WAN is simulated with animation here.
“Demo” opening a wide table over WAN 
5 seconds 
Jon Thatcher 
Performance - Under The Hood 
FileMaker Konferenz 2014 Winterthur 
! 
www.filemaker-konferenz.com 
10 seconds 
15 seconds 
20 seconds 
Not a real demo, but the time taken to open this database over the WAN is simulated with animation here.
What is making each record so big? 
Jon Thatcher 
Performance - Under The Hood 
FileMaker Konferenz 2014 Winterthur 
! 
www.filemaker-konferenz.com 
Same detail view shown by clicking TotalLen column in either version of solution, note FullText field with the scroll bar. That is where the long text is, 16KB to 85KB per record.
Wide table, notice FullText and FullLen 
Jon Thatcher 
Performance - Under The Hood 
FileMaker Konferenz 2014 Winterthur 
! 
www.filemaker-konferenz.com 
And just in case, here are the field definitions for the “Wide” table. Note FullText, FullLen, and that FullLen is included in TotalLen calculation.
Narrow table with 1:1 relationship instead 
Jon Thatcher 
Performance - Under The Hood 
FileMaker Konferenz 2014 Winterthur 
! 
www.filemaker-konferenz.com 
Use the ArticleID unique field to make a 1:1 relationship to separate table containing just the FullText and FullLen, so all that data doesn’t have to be downloaded for any layout.
Opening the narrow table over WAN 
Jon Thatcher 
Performance - Under The Hood 
FileMaker Konferenz 2014 Winterthur 
! 
www.filemaker-konferenz.com
Opening the narrow table over WAN 
Jon Thatcher 
Performance - Under The Hood 
FileMaker Konferenz 2014 Winterthur 
! 
www.filemaker-konferenz.com
How to verify results? 
• Use Server Statistics to view Kbytes In / Out 
• Can use Server values if you are the only user 
• Enable Statistics logging to capture Stats.log 
• Good idea to always have this enabled on Server 
• For even better detail, use Client Statistics 
• See Bytes In from and Bytes Out to each active client 
• Use checkbox in Statistics view to capture the 
ClientStats.log while panel open 
Jon Thatcher 
Performance - Under The Hood 
FileMaker Konferenz 2014 Winterthur 
! 
www.filemaker-konferenz.com
Tip: Use narrow tables 
Jon Thatcher 
Performance - Under The Hood 
FileMaker Konferenz 2014 Winterthur 
! 
www.filemaker-konferenz.com 
Narrow 
Wide 
!I 
Note that the number of remote calls was exactly the same, since only one remote call needed to download all of record X, it’s just that the “width” of record X was much greater, making the total bytes sent out much higher. 
will talk more about remote calls in second half of presentation.
What about frequently changing data? 
• Whole record is also uploaded at once when 
client commits a change, so… 
• Tip: put frequently changing fields like 
InventoryCount in table separate from rest of 
Product data (type, name, description) 
• Smaller, faster upload when committing change 
• Smaller, faster download when displaying new count 
Jon Thatcher 
Performance - Under The Hood 
FileMaker Konferenz 2014 Winterthur 
! 
www.filemaker-konferenz.com
Tip: Frequently changed data in own table 
Jon Thatcher 
Performance - Under The Hood 
Whole record copied to host whenever 
inventoryCount is updated; very expensive 
if productLongHTML is large 
Slow 
Faster 
FileMaker Konferenz 2014 Winterthur 
! 
www.filemaker-konferenz.com
Tip: Frequently changed data in own table 
Jon Thatcher 
Performance - Under The Hood 
Whole record copied to host whenever 
inventoryCount is updated; very expensive 
if productLongHTML is large 
Slow 
Faster 
FileMaker Konferenz 2014 Winterthur 
! 
www.filemaker-konferenz.com
Client loads records based on view 
• Multiple records may be fetched at once by 
client, reducing number of download requests 
• Form View: 25 records 
• List or Table View: count of visible records + 2 
• Portal: count of visible portal rows 
• List/Table View with many rows and columns 
can be slow to load, especially over WAN 
Jon Thatcher 
Performance - Under The Hood 
FileMaker Konferenz 2014 Winterthur 
! 
www.filemaker-konferenz.com 
Yet another reason to use narrow tables where possible
Tip: Manage the user’s found set 
• Have the user find just the records they want to 
work with, instead of showing all records 
• Speeds up display of large list or table views 
• Especially important with a view that is sorted 
or includes a summary 
• Why? … 
Jon Thatcher 
Performance - Under The Hood 
FileMaker Konferenz 2014 Winterthur 
! 
www.filemaker-konferenz.com
Tip: Use sorted / summary views carefully 
• Having a view automatically sort or summarize 
requires that ALL records in the found set be 
downloaded to perform the sort / aggregate 
• If user can enter such a view with large found 
set or showing all records, the sort or summary 
may take a very long time and make user very 
unhappy 
Jon Thatcher 
Performance - Under The Hood 
FileMaker Konferenz 2014 Winterthur 
! 
www.filemaker-konferenz.com
Tip: Enter Find Mode first 
• To limit the found set, Enter Find Mode before 
going to layout of a large table: 
Enter Find Mode [] 
Go to Layout [ “Customer (customers)” ] 
• This will avoid hidden download of the first 25 
records (or N + 2 records for List/Table view), 
which the user may never want to see 
Jon Thatcher 
Performance - Under The Hood 
FileMaker Konferenz 2014 Winterthur 
! 
www.filemaker-konferenz.com
Tip: Load portal rows only when needed 
• Multiple child records will load at same time as 
parent record if portal is showing on the layout 
• Tip: to avoid downloading child records, 
• Relocate portal to a layout where it will only be shown 
when it is needed, or 
• Place portal on the second panel of a Slide Control so it 
isn’t visible by default 
Jon Thatcher 
Performance - Under The Hood 
FileMaker Konferenz 2014 Winterthur 
! 
www.filemaker-konferenz.com
Bulk operation: many records at once 
• Import: up to 1000 
• Sort / Export / Summary: 5000 
• Replace: 500 
• Relookup: 100 
• Delete: 100 
Jon Thatcher 
Performance - Under The Hood 
FileMaker Konferenz 2014 Winterthur 
! 
www.filemaker-konferenz.com
Tip: Use Perform Script on Server 
• For bulk operations, use Perform Script on 
Server to have Server do the work for you 
• Especially useful when operating across all 
records in a large table or when find can easily 
be done on Server via script parameter(s) 
• Avoids having to copy all that data to the 
client, a huge win for clients on the WAN 
Jon Thatcher 
Performance - Under The Hood 
FileMaker Konferenz 2014 Winterthur 
! 
www.filemaker-konferenz.com
Server data caching 
• RAM cache stores all blocks read from disk 
• When block modified in RAM, immediately put on flush list 
• Whole flush list written to disk once per second 
• Block N will stay in the RAM cache until the cache gets full, 
then when block N is the "least recently used" some other 
block takes its place in the cache 
• Tip: if Cache Hit % statistic stays below 100 
• Increase size of Database RAM Cache on the Server 
• Archive old little-used data to avoid users accessing it 
Jon Thatcher 
Performance - Under The Hood 
FileMaker Konferenz 2014 Winterthur 
! 
www.filemaker-konferenz.com
Client data caching 
• Client stores all downloaded data in a 
temporary file (one per database file), and 
keeps most recently used blocks in RAM cache 
• Downloaded data kept cached locally until: 
• another user modifies the record (or script, layout, etc) 
• the file is closed 
• the temporary file grows too large 
Jon Thatcher 
Performance - Under The Hood 
FileMaker Konferenz 2014 Winterthur 
! 
www.filemaker-konferenz.com
Client caching tips 
• Tip: If a user is sorting or summarizing large 
data sets (>100s of MB), try increasing RAM 
cache in FM Pro preferences for that user 
• Tip: Make sure clients have plenty of free disk 
space, or temporary file size will be limited, 
and client may download same data over and 
over, slowing performance for everyone 
Jon Thatcher 
Performance - Under The Hood 
FileMaker Konferenz 2014 Winterthur 
! 
www.filemaker-konferenz.com
Performance - Under The Hood: Agenda 
• Under The Hood 
• How and when FileMaker moves and caches data 
• Some Performance Dos and Don’ts 
• Measuring performance in your own solutions 
• When and how to measure performance 
• Real-world performance diagnosis examples 
Jon Thatcher 
Performance - Under The Hood 
FileMaker Konferenz 2014 Winterthur 
! 
www.filemaker-konferenz.com
Performance - When to measure 
• Avoid premature optimization 
• Without studying your solution’s usage, guesses about 
what is slow are just guesses 
• If solution is simple and there will be few users, just make 
the solution available 
• When slowness is reported, measure the operations users 
are actually performing 
Jon Thatcher 
Performance - Under The Hood 
FileMaker Konferenz 2014 Winterthur 
! 
www.filemaker-konferenz.com
Performance - When to measure 
• If solution business-critical or has many users, 
measure before deploying 
• If at all possible, use actual data of appropriate size 
• Otherwise, use randomized actual data or randomly 
generated data if you must 
Jon Thatcher 
Performance - Under The Hood 
FileMaker Konferenz 2014 Winterthur 
! 
www.filemaker-konferenz.com
Performance - How to measure 
• Use database of actual size, otherwise testing 
will miss issues 
• If solution will hold 10GB of active data, test with 10GB 
• Use similar hardware for hosting and testing (especially 
CPU count/speed, RAM size and disk speed) 
Jon Thatcher 
Performance - Under The Hood 
FileMaker Konferenz 2014 Winterthur 
! 
www.filemaker-konferenz.com
Performance - How to measure 
• If you can’t use actual data, try randomized 
actual data 
• Randomly reassign first names to last names, randomize 
all street/phone/ID numbers, etc. 
• Randomly generated data WON’T have the 
same distribution as your real data 
• Real data has clusters of names, postal codes, cities, 
countries, etc., which impacts indexes, finds and sorting 
• All that said, generatedata.com is your friend 
Jon Thatcher 
Performance - Under The Hood 
FileMaker Konferenz 2014 Winterthur 
! 
www.filemaker-konferenz.com 
generatedata.com is pretty useful, and generates up to 5000 random rows at a time…
How NOT to measure script run time 
Set Variable [ $start; Value:GetAsNumber(Get(CurrentTime)) ] 
Perform Script [ “NiceLongScript” ] 
Set Variable [ $end; Value:GetAsNumber(Get(CurrentTime)) ] 
Show Custom Dialog [ Title: "test time"; 
Message: "Seconds: " & GetAsText( $end - $start ); 
Default Button: “OK”, Commit: “No” ] 
Jon Thatcher 
Performance - Under The Hood 
FileMaker Konferenz 2014 Winterthur 
! 
www.filemaker-konferenz.com
! 
! 
start 50000.999 - 50000 - 
point A 50001.001 0.002 50001 1 
! 
point B 50001.999 0.998 50001 0 
Get(CurrentTime) is inaccurate 
“actual” time “actual” diff Get(CurrentTime) Get(Curr..) diff 
! 
• This timing can randomly return +/- 1 second! 
• Plus, $end < $start if test run at midnight or at 
daylight time change 
Jon Thatcher 
Performance - Under The Hood 
FileMaker Konferenz 2014 Winterthur 
! 
www.filemaker-konferenz.com 
But in FileMaker 12 or 13 you can use…
Use Get(CurrentTimeUTCMilliseconds) 
• UTC = Coordinated Universal Time (aka GMT) 
• NO changes due to daylight savings time, so doesn’t jump 
by an hour seasonally 
• Doesn’t “roll over” at midnight (does in 580 million years) 
• Millisecond accuracy (1/1000th of a second) 
• Available in FM13, and FM12 as Get(UTCmSecs) 
• Same function in 13 and 12, just with a different name, 
and “hidden” in 12 
• Returns a Number, so no GetAsNumber needed 
Jon Thatcher 
Performance - Under The Hood 
FileMaker Konferenz 2014 Winterthur 
! 
www.filemaker-konferenz.com 
P.S.: No, I don’t like the new name either. New name too long, old name too short
The right way to measure 
Set Variable [ $start; Value:Get(CurrentTimeUTCMilliseconds) ] 
Perform Script [ “NiceLongScript” ] 
Set Variable [ $end; Value:Get(CurrentTimeUTCMilliseconds) ] 
Show Custom Dialog [ Title: "test time"; 
Message: "Seconds: " & ( $end - $start ) / 1000; 
Default Button: “OK”, Commit: “No” ] 
Jon Thatcher 
Performance - Under The Hood 
FileMaker Konferenz 2014 Winterthur 
! 
www.filemaker-konferenz.com
Diagnose “real world” performance issue 
• Customer says their database takes 3 minutes 
to open on WAN (actually an example db) 
• Using WiFi + VPN, took 5 minutes to open! 
Jon Thatcher 
Performance - Under The Hood 
FileMaker Konferenz 2014 Winterthur 
! 
www.filemaker-konferenz.com 
Turns out customer got this file from a FileMaker tips site, where it was NOT intended to show good performance! 
http://filemakerhacks.com/2014/01/19/summary-list-fields-in-fm-13-part-1/
Step #1 - Use easiest tool(s) for diagnosis! 
• Server Statistics view, Clients tab shows work 
Server did for client: 
! 
! 
• 3500 remote calls to open file!? 
Jon Thatcher 
Performance - Under The Hood 
FileMaker Konferenz 2014 Winterthur 
! 
www.filemaker-konferenz.com 
Note that all those calls only took 1 second over LAN… So the time to open was still slightly noticeable even over Gigabit Ethernet, but nothing compared to WAN time.
An aside: what is a remote call? 
• A remote call is one request from a FileMaker 
client to a FileMaker host, like: 
• Get list of hosted files 
• Download layout ID 1 
• Download records with IDs 5,7,9… from table Y 
• Upload and perform query 
• A remote call is always one or more network 
packets (remote call maximum size is ~1MB) 
• Packet size is usually 1500 bytes 
Jon Thatcher 
Performance - Under The Hood 
FileMaker Konferenz 2014 Winterthur 
! 
www.filemaker-konferenz.com
Step #2 - How large is the data? 
• Use Manage Database, Tables tab to see how 
many tables + records: 
! 
! 
! 
• Under 10000 records total. How can this be so 
slow? 
Jon Thatcher 
Performance - Under The Hood 
FileMaker Konferenz 2014 Winterthur 
! 
www.filemaker-konferenz.com
Step #3 - How complex is the solution? 
• Use Manage Database, Relationships tab to see 
complexity: 
! 
! 
! 
! 
• Nice and simple… 
Jon Thatcher 
Performance - Under The Hood 
FileMaker Konferenz 2014 Winterthur 
! 
www.filemaker-konferenz.com
Step #4 - Check for likely culprits 
• Summary or Aggregate functions are a 
common cause of slowness… 
! 
! 
• Header with summary of $ across multiple 
invoices and customers looks “interesting”, 
what is in that locked grouped object with 
<…>? 
Jon Thatcher 
Performance - Under The Hood 
FileMaker Konferenz 2014 Winterthur 
! 
www.filemaker-konferenz.com
Step #4 - Down the rabbit hole! 
• Copied highlighted text and pasted elsewhere 
to find: 
• In Manage Database, Fields tab for Customers 
this turns out to be: 
! 
• Unstored calculation Sum( cfs_invoices::total), 
and total is…? 
Jon Thatcher 
Performance - Under The Hood 
FileMaker Konferenz 2014 Winterthur 
! 
www.filemaker-konferenz.com
Step #4 continued - Keep digging! 
• Unstored calculation Sum( cfs_invoices::total) => 
• total: Unstored calculation, Sum( line_items::ext_price ) => 
• And line_items::ext_price is a stored value 
• Join from 7 customers to 44 invoices to 312 
line_items, retrieve >360 records, then Sum 
ext_price per invoice, Sum total per customer 
• Looks like the cause of a lot of round trips to 
Server! 
Jon Thatcher 
Performance - Under The Hood 
FileMaker Konferenz 2014 Winterthur 
! 
www.filemaker-konferenz.com 
Why cfs_invoices instead of Invoices? Does that impact performance? 
Quick answer is no, the performance was the same, whichever TO was used.
Step #5 - Confirm the culprit then fix it 
• Confirm the culprit by just removing it from the 
layout and re-test 
• Or try a fix, change invoices total from 
unstored Calculation to stored Number field: 
Jon Thatcher 
Performance - Under The Hood 
FileMaker Konferenz 2014 Winterthur 
! 
www.filemaker-konferenz.com 
!Using negative value to mark the non-final invoice total is just a hack. Actually, you might want to keep the old unstored calc as “totalEstimate” for display only in the Invoice layout, plus the final invoice total as calculated above or as ( isFinal * 
This is probably more like how you would want your invoice total to behave in any case: the final total should get calculated only when the invoice is marked final, not 3 months later when the price of the item changes! 
… ) so the total would be ZERO until marked final.
Step #6 - Verify the result 
• Do exactly the same test as before and 
compare the Client stats: 
• 45 remote calls versus 3541. Wow! 
• Opening database over hotel WiFi + VPN went 
from 295 to 7 seconds 
Jon Thatcher 
Performance - Under The Hood 
FileMaker Konferenz 2014 Winterthur 
! 
www.filemaker-konferenz.com
Rule: always plan for the WAN 
• Latency = time delay in the network between 
request and response 
• Multiply latency by # of remote calls to roughly 
estimate total overhead: 
Network Latency (ms) # Calls Overhead 
Gigabit LAN 1 3500 3½ sec 
Corporate LAN 10 3500 35 sec 
WAN (Internet) 100+ 3500 350 sec 
Jon Thatcher 
Performance - Under The Hood 
FileMaker Konferenz 2014 Winterthur 
! 
www.filemaker-konferenz.com 
!Overhead meaning time it will take just to send and receive all the packets, separate from any processing done by FileMaker Server or client or even the number of bytes being sent 
This is a rule, not a tip, because even if your solution may never be used on the WAN, making your solution perform better on the WAN will save significant time for users on the LAN, too!
A true real world diagnosis 
• Customer reports Import taking too long 
• Data from external system requires FMP updates hourly 
• But each Import process is taking 30 minutes! 
• Didn’t figure out the problem at first because I 
skipped a step in diagnosis 
Jon Thatcher 
Performance - Under The Hood 
FileMaker Konferenz 2014 Winterthur 
! 
www.filemaker-konferenz.com
Measure slowest part 
• Recalculating price of today’s shipments, based 
on updated surcharge from trucking carrier 
• This script took 7 minutes over slow LAN 
Jon Thatcher 
Performance - Under The Hood 
FileMaker Konferenz 2014 Winterthur 
! 
www.filemaker-konferenz.com
How complex? 
• This part of solution was really simple! 
Jon Thatcher 
Performance - Under The Hood 
FileMaker Konferenz 2014 Winterthur 
! 
www.filemaker-konferenz.com
Likely culprits? 
• Steps of script were also simple: 
Jon Thatcher 
Performance - Under The Hood 
FileMaker Konferenz 2014 Winterthur 
! 
www.filemaker-konferenz.com
Use client statistics! 
Jon Thatcher 
Performance - Under The Hood 
FileMaker Konferenz 2014 Winterthur 
! 
www.filemaker-konferenz.com 
Why is there more data going IN to Server than OUT??? 
! 
And why are there 20000 remote calls?
I missed: How large is the data? 
• Only 20 carrier records, but 10000 trucking 
• So Replace Field Contents is doing 1 join for 
every trucking record, or 10000 joins 
• Plus 10000 replaces => 20000 remote calls 
Jon Thatcher 
Performance - Under The Hood 
FileMaker Konferenz 2014 Winterthur 
! 
www.filemaker-konferenz.com
• Fast: 
• Slow: 
Fix 
Jon Thatcher 
Performance - Under The Hood 
FileMaker Konferenz 2014 Winterthur 
! 
www.filemaker-konferenz.com
Measure the fix 
• Fix: 216 seconds 
• Original: 427 seconds 
• Remote calls and time halved (only 20 joins)! 
Jon Thatcher 
Performance - Under The Hood 
FileMaker Konferenz 2014 Winterthur 
! 
www.filemaker-konferenz.com 
!And you can see that cutting the joins also cut in half the amount of data being sent to server (Net Bytes In). 
FYI: the “RelatedLoop” is a script I did with Go To Related Record to prove that the results were the same as using the Replace Field Contents from the “carriers” context
Take-home work: what else to try here? 
• Why are there still >10000 remote calls? 
• Would initial forced download of all trucking records allow 
more records to be packed in one remote call? 
• Is the process doing more work than needed? 
• E.g., did all carrier surcharges actually change today? 
• If not, find only the changed carrier records, then perform 
the Replace Field Contents from “carrier” context, and it 
will update only the related records of the found set 
Jon Thatcher 
Performance - Under The Hood 
FileMaker Konferenz 2014 Winterthur 
! 
www.filemaker-konferenz.com
Steps to diagnose performance problems 
1. Use easiest tools for measuring and diagnosis! 
2. How large is the data? 
3. How complex is the solution? 
4. Check for likely culprits 
5. Confirm the culprit then fix it 
6. Verify the result 
Jon Thatcher 
Performance - Under The Hood 
FileMaker Konferenz 2014 Winterthur 
! 
www.filemaker-konferenz.com
Performance - Summary 
• Solve the real user problem 
• Avoid premature optimization 
• Measure to find the real problem, then fix! 
• Consistently use all the diagnostic steps 
• Helps you find the real problem sooner 
• Plan for the WAN 
Jon Thatcher 
Performance - Under The Hood 
FileMaker Konferenz 2014 Winterthur 
! 
www.filemaker-konferenz.com
Q & A
Vielen Dank unseren Sponsoren 
Danke für das Bewerten dieses Vortrages! 
Jon Thatcher 
Performance - Under The Hood 
FileMaker Konferenz 2014 Winterthur 
! 
www.filemaker-konferenz.com

Más contenido relacionado

La actualidad más candente

La actualidad más candente (20)

RNUG - DeepDive Workshop - HCL Notes Client upgrades/deployments using Marvel...
RNUG - DeepDive Workshop - HCL Notes Client upgrades/deployments using Marvel...RNUG - DeepDive Workshop - HCL Notes Client upgrades/deployments using Marvel...
RNUG - DeepDive Workshop - HCL Notes Client upgrades/deployments using Marvel...
 
HCL Domino Volt Installation, Configuration & New Features
HCL Domino Volt Installation, Configuration & New FeaturesHCL Domino Volt Installation, Configuration & New Features
HCL Domino Volt Installation, Configuration & New Features
 
CollabSphere 2020 Live - HCL Notes 11.0.1 FP1 Upgrades: Easy - Fast - Seamless
CollabSphere 2020 Live - HCL Notes 11.0.1 FP1 Upgrades: Easy - Fast - SeamlessCollabSphere 2020 Live - HCL Notes 11.0.1 FP1 Upgrades: Easy - Fast - Seamless
CollabSphere 2020 Live - HCL Notes 11.0.1 FP1 Upgrades: Easy - Fast - Seamless
 
RNUG - SUPERCHARGED HCL Notes V11 Upgrades: Turning the WORST Notes deploymen...
RNUG - SUPERCHARGED HCL Notes V11 Upgrades: Turning the WORST Notes deploymen...RNUG - SUPERCHARGED HCL Notes V11 Upgrades: Turning the WORST Notes deploymen...
RNUG - SUPERCHARGED HCL Notes V11 Upgrades: Turning the WORST Notes deploymen...
 
IBM Connect 2016 BP1491: Virtual, Faster, Better! How to Virtualize the Rich ...
IBM Connect 2016 BP1491: Virtual, Faster, Better! How to Virtualize the Rich ...IBM Connect 2016 BP1491: Virtual, Faster, Better! How to Virtualize the Rich ...
IBM Connect 2016 BP1491: Virtual, Faster, Better! How to Virtualize the Rich ...
 
HCL Sametime V11 installation - tips
HCL Sametime V11 installation - tipsHCL Sametime V11 installation - tips
HCL Sametime V11 installation - tips
 
HCL Sametime V11 - Step by Step v1.1 (include FP2)
HCL Sametime V11 - Step by Step v1.1 (include FP2)HCL Sametime V11 - Step by Step v1.1 (include FP2)
HCL Sametime V11 - Step by Step v1.1 (include FP2)
 
Engage 2020 - HCL Notes V11 Performance Boost
Engage 2020 - HCL Notes V11 Performance BoostEngage 2020 - HCL Notes V11 Performance Boost
Engage 2020 - HCL Notes V11 Performance Boost
 
DNUG 2017 - IBM Notes Performance Boost - Reloaded
DNUG 2017 - IBM Notes Performance Boost - ReloadedDNUG 2017 - IBM Notes Performance Boost - Reloaded
DNUG 2017 - IBM Notes Performance Boost - Reloaded
 
IBM Connections adoption seminar
IBM Connections adoption seminarIBM Connections adoption seminar
IBM Connections adoption seminar
 
HCL Sametime V11 - Step by Step
HCL Sametime V11 - Step by StepHCL Sametime V11 - Step by Step
HCL Sametime V11 - Step by Step
 
Caching strategies with lucee
Caching strategies with luceeCaching strategies with lucee
Caching strategies with lucee
 
Lucee writing your own debugging template
Lucee   writing your own debugging templateLucee   writing your own debugging template
Lucee writing your own debugging template
 
ICONUK 2018 - IBM Notes V10 Performance Boost
ICONUK 2018 - IBM Notes V10 Performance BoostICONUK 2018 - IBM Notes V10 Performance Boost
ICONUK 2018 - IBM Notes V10 Performance Boost
 
Lucee writing your own debugging template
Lucee   writing your own debugging templateLucee   writing your own debugging template
Lucee writing your own debugging template
 
Engage 2020 - Kubernetes for HCL Connections Component Pack - Build or Buy?
Engage 2020 - Kubernetes for HCL Connections Component Pack - Build or Buy?Engage 2020 - Kubernetes for HCL Connections Component Pack - Build or Buy?
Engage 2020 - Kubernetes for HCL Connections Component Pack - Build or Buy?
 
RNUG - Virtual, Faster, Better! How to deploy HCL Notes 11.0.1 FP2 for Citrix...
RNUG - Virtual, Faster, Better! How to deploy HCL Notes 11.0.1 FP2 for Citrix...RNUG - Virtual, Faster, Better! How to deploy HCL Notes 11.0.1 FP2 for Citrix...
RNUG - Virtual, Faster, Better! How to deploy HCL Notes 11.0.1 FP2 for Citrix...
 
HCL Sametime Meetings 11.5 Pre-Release - Step-by-Step
HCL Sametime Meetings 11.5 Pre-Release - Step-by-StepHCL Sametime Meetings 11.5 Pre-Release - Step-by-Step
HCL Sametime Meetings 11.5 Pre-Release - Step-by-Step
 
Still All on One Server: Perforce at Scale
Still All on One Server: Perforce at Scale Still All on One Server: Perforce at Scale
Still All on One Server: Perforce at Scale
 
CollabSphere 2020 Live - HCL Notes 11.0.1 FP1 - Performance Boost Re-Reloaded
CollabSphere 2020 Live - HCL Notes 11.0.1 FP1 - Performance Boost Re-ReloadedCollabSphere 2020 Live - HCL Notes 11.0.1 FP1 - Performance Boost Re-Reloaded
CollabSphere 2020 Live - HCL Notes 11.0.1 FP1 - Performance Boost Re-Reloaded
 

Similar a FMK2014 FileMaker Performance Under the Hood by Jon Thatcher

mxmlc: fitter, happier, more productive
mxmlc: fitter, happier, more productivemxmlc: fitter, happier, more productive
mxmlc: fitter, happier, more productive
Brian Deitte
 

Similar a FMK2014 FileMaker Performance Under the Hood by Jon Thatcher (20)

Domino Server Health - Monitoring and Managing
 Domino Server Health - Monitoring and Managing Domino Server Health - Monitoring and Managing
Domino Server Health - Monitoring and Managing
 
Engage 2020 - HCL Notes V11 Performance Boost
Engage 2020 - HCL Notes V11 Performance BoostEngage 2020 - HCL Notes V11 Performance Boost
Engage 2020 - HCL Notes V11 Performance Boost
 
mxmlc: fitter, happier, more productive
mxmlc: fitter, happier, more productivemxmlc: fitter, happier, more productive
mxmlc: fitter, happier, more productive
 
AutoSender
AutoSenderAutoSender
AutoSender
 
Back to FME School - Day 2: Your Data and FME
Back to FME School - Day 2: Your Data and FMEBack to FME School - Day 2: Your Data and FME
Back to FME School - Day 2: Your Data and FME
 
Sutol - A Hitchhiker’s Guide to troubleshooting IBM Connections
Sutol - A Hitchhiker’s Guide to troubleshooting IBM ConnectionsSutol - A Hitchhiker’s Guide to troubleshooting IBM Connections
Sutol - A Hitchhiker’s Guide to troubleshooting IBM Connections
 
DNUG Webcast: IBM Notes V10 Performance Boost
DNUG Webcast: IBM Notes V10 Performance BoostDNUG Webcast: IBM Notes V10 Performance Boost
DNUG Webcast: IBM Notes V10 Performance Boost
 
BEST AND WORST PRACTICES DEPLOYING IBM CONNECTIONS
BEST AND WORST PRACTICES DEPLOYING IBM CONNECTIONSBEST AND WORST PRACTICES DEPLOYING IBM CONNECTIONS
BEST AND WORST PRACTICES DEPLOYING IBM CONNECTIONS
 
Best and worst practices deploying IBM Connections
Best and worst practices deploying IBM ConnectionsBest and worst practices deploying IBM Connections
Best and worst practices deploying IBM Connections
 
Soccnx10: Best and worst practices deploying IBM Connections
Soccnx10: Best and worst practices deploying IBM ConnectionsSoccnx10: Best and worst practices deploying IBM Connections
Soccnx10: Best and worst practices deploying IBM Connections
 
Engage 2018: IBM Notes and Domino Performance Boost - Reloaded
Engage 2018: IBM Notes and Domino Performance Boost - ReloadedEngage 2018: IBM Notes and Domino Performance Boost - Reloaded
Engage 2018: IBM Notes and Domino Performance Boost - Reloaded
 
Lug
LugLug
Lug
 
CollabSphere 2020 - INF105 - HCL Notes 11.0.1 FP1 - Performance Boost Re-Relo...
CollabSphere 2020 - INF105 - HCL Notes 11.0.1 FP1 - Performance Boost Re-Relo...CollabSphere 2020 - INF105 - HCL Notes 11.0.1 FP1 - Performance Boost Re-Relo...
CollabSphere 2020 - INF105 - HCL Notes 11.0.1 FP1 - Performance Boost Re-Relo...
 
Cashing in on logging and exception data
Cashing in on logging and exception dataCashing in on logging and exception data
Cashing in on logging and exception data
 
Virtual,Faster,Better! How To Virtualize the IBM Notes Client and IBM Client ...
Virtual,Faster,Better! How To Virtualize the IBM Notes Client and IBM Client ...Virtual,Faster,Better! How To Virtualize the IBM Notes Client and IBM Client ...
Virtual,Faster,Better! How To Virtualize the IBM Notes Client and IBM Client ...
 
3 Ways to Improve Performance from a Storage Perspective
3 Ways to Improve Performance from a Storage Perspective3 Ways to Improve Performance from a Storage Perspective
3 Ways to Improve Performance from a Storage Perspective
 
AdminCamp 2018 - IBM Notes V10 Performance Boost
AdminCamp 2018 - IBM Notes V10 Performance BoostAdminCamp 2018 - IBM Notes V10 Performance Boost
AdminCamp 2018 - IBM Notes V10 Performance Boost
 
Virtual, Faster, Better! How to Virtualize the Rich Client and Browser Plugin...
Virtual, Faster, Better! How to Virtualize the Rich Client and Browser Plugin...Virtual, Faster, Better! How to Virtualize the Rich Client and Browser Plugin...
Virtual, Faster, Better! How to Virtualize the Rich Client and Browser Plugin...
 
BP1491: Virtual, Faster, Better - How to Virtualize the Rich Client and Brows...
BP1491: Virtual, Faster, Better - How to Virtualize the Rich Client and Brows...BP1491: Virtual, Faster, Better - How to Virtualize the Rich Client and Brows...
BP1491: Virtual, Faster, Better - How to Virtualize the Rich Client and Brows...
 
Performance test
Performance testPerformance test
Performance test
 

Más de Verein FM Konferenz

Más de Verein FM Konferenz (20)

FMK2022 Excel und FileMaker Schittko.pdf
FMK2022 Excel und FileMaker Schittko.pdfFMK2022 Excel und FileMaker Schittko.pdf
FMK2022 Excel und FileMaker Schittko.pdf
 
FMK2022 Drucken über Dateigrenzen hinweg von Philipp Puls
FMK2022 Drucken über Dateigrenzen hinweg von Philipp PulsFMK2022 Drucken über Dateigrenzen hinweg von Philipp Puls
FMK2022 Drucken über Dateigrenzen hinweg von Philipp Puls
 
FMK2022 Custom Functions von Philipp Puls
FMK2022 Custom Functions von Philipp PulsFMK2022 Custom Functions von Philipp Puls
FMK2022 Custom Functions von Philipp Puls
 
FMK2022 FileMaker Fehler von Martin Schwarz
FMK2022 FileMaker Fehler von Martin SchwarzFMK2022 FileMaker Fehler von Martin Schwarz
FMK2022 FileMaker Fehler von Martin Schwarz
 
FMK2022 FileMaker Server unter Linux Workshop von Bernhard Schulz
FMK2022 FileMaker Server unter Linux Workshop von Bernhard SchulzFMK2022 FileMaker Server unter Linux Workshop von Bernhard Schulz
FMK2022 FileMaker Server unter Linux Workshop von Bernhard Schulz
 
FMK2022 FileMaker DataAPI und Java von Bernhard Schulz
FMK2022 FileMaker DataAPI und Java von Bernhard SchulzFMK2022 FileMaker DataAPI und Java von Bernhard Schulz
FMK2022 FileMaker DataAPI und Java von Bernhard Schulz
 
FMK2022 Neue Programmiertechniken von Adam Augusting
FMK2022 Neue Programmiertechniken von Adam AugustingFMK2022 Neue Programmiertechniken von Adam Augusting
FMK2022 Neue Programmiertechniken von Adam Augusting
 
FMK2022 FileMaker und Javascript von Adam Augustin
FMK2022 FileMaker und Javascript von Adam AugustinFMK2022 FileMaker und Javascript von Adam Augustin
FMK2022 FileMaker und Javascript von Adam Augustin
 
FMK2022 Arbeiten mit SVG in FileMaker - Robert Kaiser
FMK2022 Arbeiten mit SVG in FileMaker - Robert KaiserFMK2022 Arbeiten mit SVG in FileMaker - Robert Kaiser
FMK2022 Arbeiten mit SVG in FileMaker - Robert Kaiser
 
FMK2022 Dokumentation - Thomas Hirt
FMK2022 Dokumentation - Thomas HirtFMK2022 Dokumentation - Thomas Hirt
FMK2022 Dokumentation - Thomas Hirt
 
FMK2022 CustomFunctions Fuer Einsteiger - Thomas Hirt
FMK2022 CustomFunctions Fuer Einsteiger - Thomas HirtFMK2022 CustomFunctions Fuer Einsteiger - Thomas Hirt
FMK2022 CustomFunctions Fuer Einsteiger - Thomas Hirt
 
FMK2022 FileMaker Integrated Development Environment - Russell Watson
FMK2022 FileMaker Integrated Development Environment - Russell WatsonFMK2022 FileMaker Integrated Development Environment - Russell Watson
FMK2022 FileMaker Integrated Development Environment - Russell Watson
 
FMK2022 Datenschutz DSGVO Christoph Kluss
FMK2022 Datenschutz DSGVO Christoph KlussFMK2022 Datenschutz DSGVO Christoph Kluss
FMK2022 Datenschutz DSGVO Christoph Kluss
 
FMK2022 Rechnungen Inkasso - Christoph Kluss
FMK2022 Rechnungen Inkasso - Christoph KlussFMK2022 Rechnungen Inkasso - Christoph Kluss
FMK2022 Rechnungen Inkasso - Christoph Kluss
 
FMK2022 Die Zukunft von FileMaker - Marcel Moré.pdf
FMK2022 Die Zukunft von FileMaker - Marcel Moré.pdfFMK2022 Die Zukunft von FileMaker - Marcel Moré.pdf
FMK2022 Die Zukunft von FileMaker - Marcel Moré.pdf
 
FMK2019 bug off lightning talk by Russell Watson
FMK2019 bug off lightning talk by Russell WatsonFMK2019 bug off lightning talk by Russell Watson
FMK2019 bug off lightning talk by Russell Watson
 
FMK2019 being an optimist in a pessimistic world by vincenzo menanno
FMK2019 being an optimist in a pessimistic world by vincenzo menannoFMK2019 being an optimist in a pessimistic world by vincenzo menanno
FMK2019 being an optimist in a pessimistic world by vincenzo menanno
 
FMK2019 FileMaker Performance Update 2019 by HOnza Koudelka
FMK2019 FileMaker Performance Update 2019 by HOnza KoudelkaFMK2019 FileMaker Performance Update 2019 by HOnza Koudelka
FMK2019 FileMaker Performance Update 2019 by HOnza Koudelka
 
FMK2019 Hardware Integrated by HOnza Koudelka
FMK2019 Hardware Integrated by HOnza KoudelkaFMK2019 Hardware Integrated by HOnza Koudelka
FMK2019 Hardware Integrated by HOnza Koudelka
 
Fmk2019 Produktentwicklung mit FileMaker by Harald Mair
Fmk2019 Produktentwicklung mit FileMaker by Harald MairFmk2019 Produktentwicklung mit FileMaker by Harald Mair
Fmk2019 Produktentwicklung mit FileMaker by Harald Mair
 

Último

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Último (20)

Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 

FMK2014 FileMaker Performance Under the Hood by Jon Thatcher

  • 1. Performance - Under The Hood Jon Thatcher FileMaker, Inc. FileMaker Konferenz 2014 Winterthur ! www.filemaker-konferenz.com Jon Thatcher Performance - Under The Hood
  • 2. Who is Jon Thatcher? • Lead Software Engineer on Database Server • 25 years at FileMaker (and Claris) • Directed development of Draco engine, FileMaker Pro and Server 7 • Helped Clay Maeckel ship the first FileMaker Server in 1994 • Worked on FileMaker Pro starting in 1993 • Previous experience at Intel, Convergent Technologies, and Esvel (database startup) Jon Thatcher Performance - Under The Hood FileMaker Konferenz 2014 Winterthur ! www.filemaker-konferenz.com
  • 3. Performance - Under The Hood: Agenda • Under The Hood • How and when FileMaker moves and caches data • Some Performance Dos and Don’ts • Measuring performance in your own solutions • When and how to measure performance • Real-world performance diagnosis examples Jon Thatcher Performance - Under The Hood FileMaker Konferenz 2014 Winterthur ! www.filemaker-konferenz.com
  • 4. How FileMaker moves data • Data read the first time it is needed • Read from disk into Server RAM cache • Read from Server into the client RAM cache / temporary file • Data uploaded from clients to Server temp file • Only Server commits data from temp file to main database • Result: network failure during upload from client has no impact on the main database Jon Thatcher Performance - Under The Hood FileMaker Konferenz 2014 Winterthur ! www.filemaker-konferenz.com Will talk more about the client temporary file in a bit…
  • 5. How FileMaker moves data Jon Thatcher Performance - Under The Hood Main DB FileMaker Konferenz 2014 Winterthur ! www.filemaker-konferenz.com Client RAM Host Client Read / Write Read / Write Temp File Read / Write FMS RAM Read / Write Read / Write Temp File Read / Write
  • 6. FileMaker moves data in whole units • Whole record, script or layout is moved at once • All stored fields* of a record are moved at once • All steps in a script, all objects* on layout moved at once • *Except for container fields or layout images • Only the container or image key in library is moved • Unstored fields are never downloaded or uploaded • Tip: “wide” tables, complex layouts and huge scripts are slow to load over WAN Jon Thatcher Performance - Under The Hood FileMaker Konferenz 2014 Winterthur ! www.filemaker-konferenz.com Unstored calculation and summary fields are just that, unstored.
  • 7. “Demo” opening a wide table over WAN Jon Thatcher Performance - Under The Hood FileMaker Konferenz 2014 Winterthur ! www.filemaker-konferenz.com Not a real demo, but the time taken to open this database over the WAN is simulated with animation here.
  • 8. “Demo” opening a wide table over WAN 5 seconds Jon Thatcher Performance - Under The Hood FileMaker Konferenz 2014 Winterthur ! www.filemaker-konferenz.com 10 seconds 15 seconds 20 seconds Not a real demo, but the time taken to open this database over the WAN is simulated with animation here.
  • 9. What is making each record so big? Jon Thatcher Performance - Under The Hood FileMaker Konferenz 2014 Winterthur ! www.filemaker-konferenz.com Same detail view shown by clicking TotalLen column in either version of solution, note FullText field with the scroll bar. That is where the long text is, 16KB to 85KB per record.
  • 10. Wide table, notice FullText and FullLen Jon Thatcher Performance - Under The Hood FileMaker Konferenz 2014 Winterthur ! www.filemaker-konferenz.com And just in case, here are the field definitions for the “Wide” table. Note FullText, FullLen, and that FullLen is included in TotalLen calculation.
  • 11. Narrow table with 1:1 relationship instead Jon Thatcher Performance - Under The Hood FileMaker Konferenz 2014 Winterthur ! www.filemaker-konferenz.com Use the ArticleID unique field to make a 1:1 relationship to separate table containing just the FullText and FullLen, so all that data doesn’t have to be downloaded for any layout.
  • 12. Opening the narrow table over WAN Jon Thatcher Performance - Under The Hood FileMaker Konferenz 2014 Winterthur ! www.filemaker-konferenz.com
  • 13. Opening the narrow table over WAN Jon Thatcher Performance - Under The Hood FileMaker Konferenz 2014 Winterthur ! www.filemaker-konferenz.com
  • 14. How to verify results? • Use Server Statistics to view Kbytes In / Out • Can use Server values if you are the only user • Enable Statistics logging to capture Stats.log • Good idea to always have this enabled on Server • For even better detail, use Client Statistics • See Bytes In from and Bytes Out to each active client • Use checkbox in Statistics view to capture the ClientStats.log while panel open Jon Thatcher Performance - Under The Hood FileMaker Konferenz 2014 Winterthur ! www.filemaker-konferenz.com
  • 15. Tip: Use narrow tables Jon Thatcher Performance - Under The Hood FileMaker Konferenz 2014 Winterthur ! www.filemaker-konferenz.com Narrow Wide !I Note that the number of remote calls was exactly the same, since only one remote call needed to download all of record X, it’s just that the “width” of record X was much greater, making the total bytes sent out much higher. will talk more about remote calls in second half of presentation.
  • 16. What about frequently changing data? • Whole record is also uploaded at once when client commits a change, so… • Tip: put frequently changing fields like InventoryCount in table separate from rest of Product data (type, name, description) • Smaller, faster upload when committing change • Smaller, faster download when displaying new count Jon Thatcher Performance - Under The Hood FileMaker Konferenz 2014 Winterthur ! www.filemaker-konferenz.com
  • 17. Tip: Frequently changed data in own table Jon Thatcher Performance - Under The Hood Whole record copied to host whenever inventoryCount is updated; very expensive if productLongHTML is large Slow Faster FileMaker Konferenz 2014 Winterthur ! www.filemaker-konferenz.com
  • 18. Tip: Frequently changed data in own table Jon Thatcher Performance - Under The Hood Whole record copied to host whenever inventoryCount is updated; very expensive if productLongHTML is large Slow Faster FileMaker Konferenz 2014 Winterthur ! www.filemaker-konferenz.com
  • 19. Client loads records based on view • Multiple records may be fetched at once by client, reducing number of download requests • Form View: 25 records • List or Table View: count of visible records + 2 • Portal: count of visible portal rows • List/Table View with many rows and columns can be slow to load, especially over WAN Jon Thatcher Performance - Under The Hood FileMaker Konferenz 2014 Winterthur ! www.filemaker-konferenz.com Yet another reason to use narrow tables where possible
  • 20. Tip: Manage the user’s found set • Have the user find just the records they want to work with, instead of showing all records • Speeds up display of large list or table views • Especially important with a view that is sorted or includes a summary • Why? … Jon Thatcher Performance - Under The Hood FileMaker Konferenz 2014 Winterthur ! www.filemaker-konferenz.com
  • 21. Tip: Use sorted / summary views carefully • Having a view automatically sort or summarize requires that ALL records in the found set be downloaded to perform the sort / aggregate • If user can enter such a view with large found set or showing all records, the sort or summary may take a very long time and make user very unhappy Jon Thatcher Performance - Under The Hood FileMaker Konferenz 2014 Winterthur ! www.filemaker-konferenz.com
  • 22. Tip: Enter Find Mode first • To limit the found set, Enter Find Mode before going to layout of a large table: Enter Find Mode [] Go to Layout [ “Customer (customers)” ] • This will avoid hidden download of the first 25 records (or N + 2 records for List/Table view), which the user may never want to see Jon Thatcher Performance - Under The Hood FileMaker Konferenz 2014 Winterthur ! www.filemaker-konferenz.com
  • 23. Tip: Load portal rows only when needed • Multiple child records will load at same time as parent record if portal is showing on the layout • Tip: to avoid downloading child records, • Relocate portal to a layout where it will only be shown when it is needed, or • Place portal on the second panel of a Slide Control so it isn’t visible by default Jon Thatcher Performance - Under The Hood FileMaker Konferenz 2014 Winterthur ! www.filemaker-konferenz.com
  • 24. Bulk operation: many records at once • Import: up to 1000 • Sort / Export / Summary: 5000 • Replace: 500 • Relookup: 100 • Delete: 100 Jon Thatcher Performance - Under The Hood FileMaker Konferenz 2014 Winterthur ! www.filemaker-konferenz.com
  • 25. Tip: Use Perform Script on Server • For bulk operations, use Perform Script on Server to have Server do the work for you • Especially useful when operating across all records in a large table or when find can easily be done on Server via script parameter(s) • Avoids having to copy all that data to the client, a huge win for clients on the WAN Jon Thatcher Performance - Under The Hood FileMaker Konferenz 2014 Winterthur ! www.filemaker-konferenz.com
  • 26. Server data caching • RAM cache stores all blocks read from disk • When block modified in RAM, immediately put on flush list • Whole flush list written to disk once per second • Block N will stay in the RAM cache until the cache gets full, then when block N is the "least recently used" some other block takes its place in the cache • Tip: if Cache Hit % statistic stays below 100 • Increase size of Database RAM Cache on the Server • Archive old little-used data to avoid users accessing it Jon Thatcher Performance - Under The Hood FileMaker Konferenz 2014 Winterthur ! www.filemaker-konferenz.com
  • 27. Client data caching • Client stores all downloaded data in a temporary file (one per database file), and keeps most recently used blocks in RAM cache • Downloaded data kept cached locally until: • another user modifies the record (or script, layout, etc) • the file is closed • the temporary file grows too large Jon Thatcher Performance - Under The Hood FileMaker Konferenz 2014 Winterthur ! www.filemaker-konferenz.com
  • 28. Client caching tips • Tip: If a user is sorting or summarizing large data sets (>100s of MB), try increasing RAM cache in FM Pro preferences for that user • Tip: Make sure clients have plenty of free disk space, or temporary file size will be limited, and client may download same data over and over, slowing performance for everyone Jon Thatcher Performance - Under The Hood FileMaker Konferenz 2014 Winterthur ! www.filemaker-konferenz.com
  • 29. Performance - Under The Hood: Agenda • Under The Hood • How and when FileMaker moves and caches data • Some Performance Dos and Don’ts • Measuring performance in your own solutions • When and how to measure performance • Real-world performance diagnosis examples Jon Thatcher Performance - Under The Hood FileMaker Konferenz 2014 Winterthur ! www.filemaker-konferenz.com
  • 30. Performance - When to measure • Avoid premature optimization • Without studying your solution’s usage, guesses about what is slow are just guesses • If solution is simple and there will be few users, just make the solution available • When slowness is reported, measure the operations users are actually performing Jon Thatcher Performance - Under The Hood FileMaker Konferenz 2014 Winterthur ! www.filemaker-konferenz.com
  • 31. Performance - When to measure • If solution business-critical or has many users, measure before deploying • If at all possible, use actual data of appropriate size • Otherwise, use randomized actual data or randomly generated data if you must Jon Thatcher Performance - Under The Hood FileMaker Konferenz 2014 Winterthur ! www.filemaker-konferenz.com
  • 32. Performance - How to measure • Use database of actual size, otherwise testing will miss issues • If solution will hold 10GB of active data, test with 10GB • Use similar hardware for hosting and testing (especially CPU count/speed, RAM size and disk speed) Jon Thatcher Performance - Under The Hood FileMaker Konferenz 2014 Winterthur ! www.filemaker-konferenz.com
  • 33. Performance - How to measure • If you can’t use actual data, try randomized actual data • Randomly reassign first names to last names, randomize all street/phone/ID numbers, etc. • Randomly generated data WON’T have the same distribution as your real data • Real data has clusters of names, postal codes, cities, countries, etc., which impacts indexes, finds and sorting • All that said, generatedata.com is your friend Jon Thatcher Performance - Under The Hood FileMaker Konferenz 2014 Winterthur ! www.filemaker-konferenz.com generatedata.com is pretty useful, and generates up to 5000 random rows at a time…
  • 34. How NOT to measure script run time Set Variable [ $start; Value:GetAsNumber(Get(CurrentTime)) ] Perform Script [ “NiceLongScript” ] Set Variable [ $end; Value:GetAsNumber(Get(CurrentTime)) ] Show Custom Dialog [ Title: "test time"; Message: "Seconds: " & GetAsText( $end - $start ); Default Button: “OK”, Commit: “No” ] Jon Thatcher Performance - Under The Hood FileMaker Konferenz 2014 Winterthur ! www.filemaker-konferenz.com
  • 35. ! ! start 50000.999 - 50000 - point A 50001.001 0.002 50001 1 ! point B 50001.999 0.998 50001 0 Get(CurrentTime) is inaccurate “actual” time “actual” diff Get(CurrentTime) Get(Curr..) diff ! • This timing can randomly return +/- 1 second! • Plus, $end < $start if test run at midnight or at daylight time change Jon Thatcher Performance - Under The Hood FileMaker Konferenz 2014 Winterthur ! www.filemaker-konferenz.com But in FileMaker 12 or 13 you can use…
  • 36. Use Get(CurrentTimeUTCMilliseconds) • UTC = Coordinated Universal Time (aka GMT) • NO changes due to daylight savings time, so doesn’t jump by an hour seasonally • Doesn’t “roll over” at midnight (does in 580 million years) • Millisecond accuracy (1/1000th of a second) • Available in FM13, and FM12 as Get(UTCmSecs) • Same function in 13 and 12, just with a different name, and “hidden” in 12 • Returns a Number, so no GetAsNumber needed Jon Thatcher Performance - Under The Hood FileMaker Konferenz 2014 Winterthur ! www.filemaker-konferenz.com P.S.: No, I don’t like the new name either. New name too long, old name too short
  • 37. The right way to measure Set Variable [ $start; Value:Get(CurrentTimeUTCMilliseconds) ] Perform Script [ “NiceLongScript” ] Set Variable [ $end; Value:Get(CurrentTimeUTCMilliseconds) ] Show Custom Dialog [ Title: "test time"; Message: "Seconds: " & ( $end - $start ) / 1000; Default Button: “OK”, Commit: “No” ] Jon Thatcher Performance - Under The Hood FileMaker Konferenz 2014 Winterthur ! www.filemaker-konferenz.com
  • 38. Diagnose “real world” performance issue • Customer says their database takes 3 minutes to open on WAN (actually an example db) • Using WiFi + VPN, took 5 minutes to open! Jon Thatcher Performance - Under The Hood FileMaker Konferenz 2014 Winterthur ! www.filemaker-konferenz.com Turns out customer got this file from a FileMaker tips site, where it was NOT intended to show good performance! http://filemakerhacks.com/2014/01/19/summary-list-fields-in-fm-13-part-1/
  • 39. Step #1 - Use easiest tool(s) for diagnosis! • Server Statistics view, Clients tab shows work Server did for client: ! ! • 3500 remote calls to open file!? Jon Thatcher Performance - Under The Hood FileMaker Konferenz 2014 Winterthur ! www.filemaker-konferenz.com Note that all those calls only took 1 second over LAN… So the time to open was still slightly noticeable even over Gigabit Ethernet, but nothing compared to WAN time.
  • 40. An aside: what is a remote call? • A remote call is one request from a FileMaker client to a FileMaker host, like: • Get list of hosted files • Download layout ID 1 • Download records with IDs 5,7,9… from table Y • Upload and perform query • A remote call is always one or more network packets (remote call maximum size is ~1MB) • Packet size is usually 1500 bytes Jon Thatcher Performance - Under The Hood FileMaker Konferenz 2014 Winterthur ! www.filemaker-konferenz.com
  • 41. Step #2 - How large is the data? • Use Manage Database, Tables tab to see how many tables + records: ! ! ! • Under 10000 records total. How can this be so slow? Jon Thatcher Performance - Under The Hood FileMaker Konferenz 2014 Winterthur ! www.filemaker-konferenz.com
  • 42. Step #3 - How complex is the solution? • Use Manage Database, Relationships tab to see complexity: ! ! ! ! • Nice and simple… Jon Thatcher Performance - Under The Hood FileMaker Konferenz 2014 Winterthur ! www.filemaker-konferenz.com
  • 43. Step #4 - Check for likely culprits • Summary or Aggregate functions are a common cause of slowness… ! ! • Header with summary of $ across multiple invoices and customers looks “interesting”, what is in that locked grouped object with <…>? Jon Thatcher Performance - Under The Hood FileMaker Konferenz 2014 Winterthur ! www.filemaker-konferenz.com
  • 44. Step #4 - Down the rabbit hole! • Copied highlighted text and pasted elsewhere to find: • In Manage Database, Fields tab for Customers this turns out to be: ! • Unstored calculation Sum( cfs_invoices::total), and total is…? Jon Thatcher Performance - Under The Hood FileMaker Konferenz 2014 Winterthur ! www.filemaker-konferenz.com
  • 45. Step #4 continued - Keep digging! • Unstored calculation Sum( cfs_invoices::total) => • total: Unstored calculation, Sum( line_items::ext_price ) => • And line_items::ext_price is a stored value • Join from 7 customers to 44 invoices to 312 line_items, retrieve >360 records, then Sum ext_price per invoice, Sum total per customer • Looks like the cause of a lot of round trips to Server! Jon Thatcher Performance - Under The Hood FileMaker Konferenz 2014 Winterthur ! www.filemaker-konferenz.com Why cfs_invoices instead of Invoices? Does that impact performance? Quick answer is no, the performance was the same, whichever TO was used.
  • 46. Step #5 - Confirm the culprit then fix it • Confirm the culprit by just removing it from the layout and re-test • Or try a fix, change invoices total from unstored Calculation to stored Number field: Jon Thatcher Performance - Under The Hood FileMaker Konferenz 2014 Winterthur ! www.filemaker-konferenz.com !Using negative value to mark the non-final invoice total is just a hack. Actually, you might want to keep the old unstored calc as “totalEstimate” for display only in the Invoice layout, plus the final invoice total as calculated above or as ( isFinal * This is probably more like how you would want your invoice total to behave in any case: the final total should get calculated only when the invoice is marked final, not 3 months later when the price of the item changes! … ) so the total would be ZERO until marked final.
  • 47. Step #6 - Verify the result • Do exactly the same test as before and compare the Client stats: • 45 remote calls versus 3541. Wow! • Opening database over hotel WiFi + VPN went from 295 to 7 seconds Jon Thatcher Performance - Under The Hood FileMaker Konferenz 2014 Winterthur ! www.filemaker-konferenz.com
  • 48. Rule: always plan for the WAN • Latency = time delay in the network between request and response • Multiply latency by # of remote calls to roughly estimate total overhead: Network Latency (ms) # Calls Overhead Gigabit LAN 1 3500 3½ sec Corporate LAN 10 3500 35 sec WAN (Internet) 100+ 3500 350 sec Jon Thatcher Performance - Under The Hood FileMaker Konferenz 2014 Winterthur ! www.filemaker-konferenz.com !Overhead meaning time it will take just to send and receive all the packets, separate from any processing done by FileMaker Server or client or even the number of bytes being sent This is a rule, not a tip, because even if your solution may never be used on the WAN, making your solution perform better on the WAN will save significant time for users on the LAN, too!
  • 49. A true real world diagnosis • Customer reports Import taking too long • Data from external system requires FMP updates hourly • But each Import process is taking 30 minutes! • Didn’t figure out the problem at first because I skipped a step in diagnosis Jon Thatcher Performance - Under The Hood FileMaker Konferenz 2014 Winterthur ! www.filemaker-konferenz.com
  • 50. Measure slowest part • Recalculating price of today’s shipments, based on updated surcharge from trucking carrier • This script took 7 minutes over slow LAN Jon Thatcher Performance - Under The Hood FileMaker Konferenz 2014 Winterthur ! www.filemaker-konferenz.com
  • 51. How complex? • This part of solution was really simple! Jon Thatcher Performance - Under The Hood FileMaker Konferenz 2014 Winterthur ! www.filemaker-konferenz.com
  • 52. Likely culprits? • Steps of script were also simple: Jon Thatcher Performance - Under The Hood FileMaker Konferenz 2014 Winterthur ! www.filemaker-konferenz.com
  • 53. Use client statistics! Jon Thatcher Performance - Under The Hood FileMaker Konferenz 2014 Winterthur ! www.filemaker-konferenz.com Why is there more data going IN to Server than OUT??? ! And why are there 20000 remote calls?
  • 54. I missed: How large is the data? • Only 20 carrier records, but 10000 trucking • So Replace Field Contents is doing 1 join for every trucking record, or 10000 joins • Plus 10000 replaces => 20000 remote calls Jon Thatcher Performance - Under The Hood FileMaker Konferenz 2014 Winterthur ! www.filemaker-konferenz.com
  • 55. • Fast: • Slow: Fix Jon Thatcher Performance - Under The Hood FileMaker Konferenz 2014 Winterthur ! www.filemaker-konferenz.com
  • 56. Measure the fix • Fix: 216 seconds • Original: 427 seconds • Remote calls and time halved (only 20 joins)! Jon Thatcher Performance - Under The Hood FileMaker Konferenz 2014 Winterthur ! www.filemaker-konferenz.com !And you can see that cutting the joins also cut in half the amount of data being sent to server (Net Bytes In). FYI: the “RelatedLoop” is a script I did with Go To Related Record to prove that the results were the same as using the Replace Field Contents from the “carriers” context
  • 57. Take-home work: what else to try here? • Why are there still >10000 remote calls? • Would initial forced download of all trucking records allow more records to be packed in one remote call? • Is the process doing more work than needed? • E.g., did all carrier surcharges actually change today? • If not, find only the changed carrier records, then perform the Replace Field Contents from “carrier” context, and it will update only the related records of the found set Jon Thatcher Performance - Under The Hood FileMaker Konferenz 2014 Winterthur ! www.filemaker-konferenz.com
  • 58. Steps to diagnose performance problems 1. Use easiest tools for measuring and diagnosis! 2. How large is the data? 3. How complex is the solution? 4. Check for likely culprits 5. Confirm the culprit then fix it 6. Verify the result Jon Thatcher Performance - Under The Hood FileMaker Konferenz 2014 Winterthur ! www.filemaker-konferenz.com
  • 59. Performance - Summary • Solve the real user problem • Avoid premature optimization • Measure to find the real problem, then fix! • Consistently use all the diagnostic steps • Helps you find the real problem sooner • Plan for the WAN Jon Thatcher Performance - Under The Hood FileMaker Konferenz 2014 Winterthur ! www.filemaker-konferenz.com
  • 60. Q & A
  • 61. Vielen Dank unseren Sponsoren Danke für das Bewerten dieses Vortrages! Jon Thatcher Performance - Under The Hood FileMaker Konferenz 2014 Winterthur ! www.filemaker-konferenz.com