Preference to set maximum number of searches in the queue
-
- Posts: 1293
- Joined: Sun Apr 20, 2008 9:57 am
- Location: Pittsburgh, PA
- Contact:
Preference to set maximum number of searches in the queue
When a large number of searches are submitted simultaneously, even with the new system (thanks Dave) the whole system grinds to a halt. I am not sure about systems overall, but for my system, the magic number is three. Fewer than four, and searches proceed at a reasonable pace. Add a fourth one, though, and ALL searches, for all intents and purposes, freeze. This gets even worse if the host mistakenly submits a search, since top level searches lock the user completely out of the interface.
As such, it would be nice if a preference could be set limiting the maximum number of simultaneous searches. Any searches beyond this would enter a queue, and not be submitted to the filtering engine until the queue length dropped below the threshold. Although the user making this search will have to wait a long time for results (and thus it would be nice if queued users could get an alert to this (in the webclient <div> using the current messaging mechanism)) the amount of time would still be FAR less than if their search was actually submitted, since it would slow down ALL searches, and make theirs take even longer.
In the same regard, it would be nice if there were some way to give the host's search priority (since they actually have other things to do!) as well as to move it to a back thread, so that it did NOT lock me out of the interface for 10 seconds or more while waiting for results!
As such, it would be nice if a preference could be set limiting the maximum number of simultaneous searches. Any searches beyond this would enter a queue, and not be submitted to the filtering engine until the queue length dropped below the threshold. Although the user making this search will have to wait a long time for results (and thus it would be nice if queued users could get an alert to this (in the webclient <div> using the current messaging mechanism)) the amount of time would still be FAR less than if their search was actually submitted, since it would slow down ALL searches, and make theirs take even longer.
In the same regard, it would be nice if there were some way to give the host's search priority (since they actually have other things to do!) as well as to move it to a back thread, so that it did NOT lock me out of the interface for 10 seconds or more while waiting for results!
Re: Preference to set maximum number of searches in the queu
i'm actually investing my time in making searching be extremely fast, rather than investing in stop-gap, throw away code. but a good idea if i were not making search faster.
-
- Posts: 1293
- Joined: Sun Apr 20, 2008 9:57 am
- Location: Pittsburgh, PA
- Contact:
Re: Preference to set maximum number of searches in the queu
Well, the thing to keep in mind then is what the reason is that four searches is SIGNIFICANTLY slower than 3. If the bottleneck it not in the search routine, but somewhere else, that latency might survive even instantaneous searches using really great hash code.
If that all gets taken care of, then yeah, last brick in the wall.
If that all gets taken care of, then yeah, last brick in the wall.
Re: Preference to set maximum number of searches in the queu
Bottleneck = stupid search algorithm
-
- Posts: 1293
- Joined: Sun Apr 20, 2008 9:57 am
- Location: Pittsburgh, PA
- Contact:
Re: Preference to set maximum number of searches in the queu
Weird that four searches would be so much worse than three. By which I mean, if you have three searches, you can see each progress bar, um, progressing, but as soon as you submit a forth search, all four simply stop. it then can take as long as five to ten minutes to complete.
Re: Preference to set maximum number of searches in the queu
beating a dead horse.
but it's because they're all contending for the same resource.
but it's because they're all contending for the same resource.
-
- Posts: 1293
- Joined: Sun Apr 20, 2008 9:57 am
- Location: Pittsburgh, PA
- Contact:
Re: Preference to set maximum number of searches in the queu
Got that much, just not clear why the magic number always seems to be four. Four or more, and you're dead in the water. Three or fewer, and you're fine.
Re: Preference to set maximum number of searches in the queu
how many cores in your computer?
-
- Posts: 1293
- Joined: Sun Apr 20, 2008 9:57 am
- Location: Pittsburgh, PA
- Contact:
Re: Preference to set maximum number of searches in the queu
2.4GHz C2D with 4 GB of RAM, and because I have issues mounting one of my external firewire drives, I always start a night with a fresh reboot, with no other apps running (though I usually at some point launch Adium and Mail.)
Re: Preference to set maximum number of searches in the queu
sorry, i mean how many "hyperthreads"? like, i have one CPU, which has 2 cores, but each core has 2 hyperthreads. so that's 4 HTs. so mine bogs down when it hits 4, cuz that means the main thread is being pushed out.
-
- Posts: 1293
- Joined: Sun Apr 20, 2008 9:57 am
- Location: Pittsburgh, PA
- Contact:
Re: Preference to set maximum number of searches in the queu
Dave:
I am not quite sure what you mean. Core family processors do not support hyper-threading, which only exists in previous Pentiums, as well as the Nehalem and Westmere processors.
I am not quite sure what you mean. Core family processors do not support hyper-threading, which only exists in previous Pentiums, as well as the Nehalem and Westmere processors.
Re: Preference to set maximum number of searches in the queu
in the below pic, you can see i have 1 CPU, 2 cores, but the "Activity Monitor" *believes* i have 4 CPUs. i take that ti mean hyperthreads.
-
- Posts: 1293
- Joined: Sun Apr 20, 2008 9:57 am
- Location: Pittsburgh, PA
- Contact:
Re: Preference to set maximum number of searches in the queu
The core i series supports hyperthreading, the core and core2duo series do not.
I have two cores, that's is.
Searches work fine for the first three. Four brings it to its knees.
I am going to hack the webcode, to include a warning about submitting new searches before the previous results are in.
I have two cores, that's is.
Searches work fine for the first three. Four brings it to its knees.
I am going to hack the webcode, to include a warning about submitting new searches before the previous results are in.
Last edited by DeusExMachina on Sat Jan 22, 2011 5:06 pm, edited 1 time in total.
Re: Preference to set maximum number of searches in the queu
just tell me how many CPUs your Activity Monitor shows you?
you probably know: i am, at this moment, frantically working on the SQL database. all other work is halted! so: wicked fast searching coming very soon! (on the order of weeks)
-dave
you probably know: i am, at this moment, frantically working on the SQL database. all other work is halted! so: wicked fast searching coming very soon! (on the order of weeks)
-dave
-
- Posts: 1293
- Joined: Sun Apr 20, 2008 9:57 am
- Location: Pittsburgh, PA
- Contact:
Re: Preference to set maximum number of searches in the queu
I am listed with two. This is most likely the case for anyone with a CD or C2D, since they do not support virtual cores a la hyperthreading.