Announcement

Collapse
No announcement yet.

Search taking ages 1st time

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

    Search taking ages 1st time

    I just tried a search on my site in progress and it took 12 seconds for the results to come back (there were 222 results). The next 3 searches (for different terms) came back imediately (10 results, 0 results, 112 results). A subsequent search for the inital term came back in 3 seconds.

    (this is with my test server sitting next to the client on a 100mb/s network - that server disks were thrashing away for most of the 12 seconds)

    I also noticed this when I was working on it last week - so what is going on? Is it starting from scratch on the 1st search, then caching the info for subsequent searches? Is the cache expiring after a certain period? Or after an upload/refresh?

    The search will be a big feature on my site and I can't afford for it to take that long to return results (especially adding on even more time or internet traffic and a busy server).
    John

    #2
    one possible reason...

    perl is used for the searches.

    the perl executable is cached, this can then be dropped out of memory, to the swap file, as your system uses its ram for more immidiate things, such as apache, and other technologies, such as php, if you have it installed.

    the first time the perl is loaded, it will 'thrash' the disk. since this machine is in your proximity, i'm guessing you rebooted the machine? this means that perl is no longer in the immidiate cache.

    dont worry. webservers hardly ever get rebooted, and even if they did, chances are someone will use perl before you do, meaning that it'll allready be in memory.

    edit:
    add more ram.

    Comment


      #3
      so the thrashing is the actual search module being loaded, not the actual search itself?
      John

      Comment

      Working...
      X