User Tools

Site Tools


scratchpad:random_magic_spells

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
scratchpad:random_magic_spells [2018/08/23 12:01] bmagicscratchpad:random_magic_spells [2024/08/30 13:01] (current) mmorgan
Line 228: Line 228:
 netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); JSAN.use('util.file'); var f = new util.file('ws_info'); alert(f._file.path); netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); JSAN.use('util.file'); var f = new util.file('ws_info'); alert(f._file.path);
 </code> </code>
 +
 +====== Performance ======
 +=====Preload Your database into RAM=====
 +Find your database's oid and make a note of it:
 +<code>
 +psql -U evergreen -h localhost -d postgres -c "select oid from pg_database where datname = 'evergreen'"
 +</code>
 +
 +Then, as the root or postgres user, run the following commands
 +<code>
 +cd /var/lib/postgresql/${pgversion}/main/base/${oid}
 +cat * > /dev/null
 +</code>
 +
 +Replace ${pgversion} with your PostgreSQL version number, ex. 9.5.  Replace ${oid} with the number returned by the database query.
  
 ====== Utility ====== ====== Utility ======
Line 839: Line 854:
 memcdump --servers localhost|grep open-ils.search | xargs -n 1 memcrm --servers localhost memcdump --servers localhost|grep open-ils.search | xargs -n 1 memcrm --servers localhost
 </code> </code>
 +
 +===== Clear cached catalog search results for a single term =====
 +
 +This "cache killer" can be used to bypass cached results for a single search. Append your search term with a random unique string of characters preceded by a hyphen. As an example, a search term to re-execute a search for puffins, bypassing previous cached results could be:
 +
 +<code bash>
 +puffins -oononromfh879ui
 +</code>
 +
 +Thank you Mike Rylander for this tip!
scratchpad/random_magic_spells.1535040072.txt.gz · Last modified: 2022/02/10 13:33 (external edit)

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki

© 2008-2022 GPLS and others. Evergreen is open source software, freely licensed under GNU GPLv2 or later.
The Evergreen Project is a U.S. 501(c)3 non-profit organization.