Bugzilla – Bug 18082
Allow custom input to Database Memory Config
Last modified: 2014-07-26 16:36:46 UTC
In the current LMS setup users can opt to increase the memory allocated the sqlite buffer by going to Settings-Advanced-Performance-Memory Config and from the combobox they can select Normal or High. Based on my understanding this triggers the following code in SQLiteHelper.pm # Wweak some memory-related pragmas if dbhighmem is enabled if ( $prefs->get('dbhighmem') ) { # Default cache_size is 2000 pages, a page is normally 1K but may be different # depending on the OS/filesystem. So default is usually 2MB. # Highmem we will try 20M push @{$sql}, 'PRAGMA cache_size = 20000'; # Default temp_store is to create disk files to save memory # Highmem we'll let it use memory push @{$sql}, 'PRAGMA temp_store = MEMORY'; } Based on some threads in Squeezebox Forums, notably: http://forums.slimdevices.com/showthread.php?93260-Optimizing-to-use-more-memory&highlight=sqlitehelper I have changed the PRAGMA cache_size by a factor of 100 with a noticeable increase in performance. It would be great if we could add the ability to manually tweak this value through the Web UI as opposed to changing this in the code.
(In reply to comment #0) > I have changed the PRAGMA cache_size by a factor of 100 with a noticeable > increase in performance. It would be great if we could add the ability to > manually tweak this value through the Web UI as opposed to changing this in > the code. Where did you see the biggest performance improvement?
I created a small plugin which does, among other things, allow setting the cache_buffer value dynamically from the web UI: http://forums.slimdevices.com/showthread.php?101469-Plugin-to-test-database-tweaks Depending on the outcome of some tests by users of this plugin I'm probably going to implement parts of it in LMS.
Thanks Michael!