I am trying to evaluate the recommender algorithms on my data set which probably is sparse, and I have only 341 items for around 20 000 users. I just want to evaluate all of the similarity algorithms. I tried almost all user-based recommendations, and for all of them I am getting this INFO from the evaluator, no matter which one, (AverageAbsoluteDifferenceRecommenderEvaluator or Root mean-square scoring Evaluator) which is Unable to recommend in xXXX cases. However the final output still have some result. Here is the output of my evaluator:
3/06/17 14:11:35 INFO eval.AbstractDifferenceRecommenderEvaluator: Beginning evaluation using 0.7 of org.apache.mahout.cf.taste.impl.model.jdbc.PostgreSQLJDBCDataModel#44303e7b
13/06/17 14:15:17 INFO model.GenericDataModel: Processed 10000 users
13/06/17 14:15:17 INFO model.GenericDataModel: Processed 20000 users
13/06/17 14:15:17 INFO model.GenericDataModel: Processed 20530 users
13/06/17 14:15:17 INFO eval.AbstractDifferenceRecommenderEvaluator: Beginning evaluation of 11240 users
13/06/17 14:15:17 INFO eval.AbstractDifferenceRecommenderEvaluator: Starting timing of 11240 tasks in 4 threads
13/06/17 14:15:17 INFO eval.AbstractDifferenceRecommenderEvaluator: Average time per recommendation: 4ms
13/06/17 14:15:17 INFO eval.AbstractDifferenceRecommenderEvaluator: Approximate memory used: 57MB / 101MB
13/06/17 14:15:17 INFO eval.AbstractDifferenceRecommenderEvaluator: Unable to recommend in 3 cases
13/06/17 14:15:19 INFO eval.AbstractDifferenceRecommenderEvaluator: Average time per recommendation: 4ms
13/06/17 14:15:19 INFO eval.AbstractDifferenceRecommenderEvaluator: Approximate memory used: 48MB / 99MB
13/06/17 14:15:19 INFO eval.AbstractDifferenceRecommenderEvaluator: Unable to recommend in 882 cases
13/06/17 14:15:20 INFO eval.AbstractDifferenceRecommenderEvaluator: Average time per recommendation: 5ms
13/06/17 14:15:20 INFO eval.AbstractDifferenceRecommenderEvaluator: Approximate memory used: 33MB / 109MB
13/06/17 14:15:20 INFO eval.AbstractDifferenceRecommenderEvaluator: Unable to recommend in 1787 cases
13/06/17 14:15:22 INFO eval.AbstractDifferenceRecommenderEvaluator: Average time per recommendation: 5ms
13/06/17 14:15:22 INFO eval.AbstractDifferenceRecommenderEvaluator: Approximate memory used: 41MB / 86MB
13/06/17 14:15:22 INFO eval.AbstractDifferenceRecommenderEvaluator: Unable to recommend in 2687 cases
13/06/17 14:15:23 INFO eval.AbstractDifferenceRecommenderEvaluator: Average time per recommendation: 5ms
13/06/17 14:15:23 INFO eval.AbstractDifferenceRecommenderEvaluator: Approximate memory used: 38MB / 98MB
13/06/17 14:15:23 INFO eval.AbstractDifferenceRecommenderEvaluator: Unable to recommend in 3569 cases
13/06/17 14:15:24 INFO eval.AbstractDifferenceRecommenderEvaluator: Average time per recommendation: 5ms
13/06/17 14:15:24 INFO eval.AbstractDifferenceRecommenderEvaluator: Approximate memory used: 28MB / 93MB
13/06/17 14:15:24 INFO eval.AbstractDifferenceRecommenderEvaluator: Unable to recommend in 4465 cases
13/06/17 14:15:26 INFO eval.AbstractDifferenceRecommenderEvaluator: Average time per recommendation: 5ms
13/06/17 14:15:26 INFO eval.AbstractDifferenceRecommenderEvaluator: Approximate memory used: 41MB / 88MB
13/06/17 14:15:26 INFO eval.AbstractDifferenceRecommenderEvaluator: Unable to recommend in 5420 cases
13/06/17 14:15:27 INFO eval.AbstractDifferenceRecommenderEvaluator: Average time per recommendation: 5ms
13/06/17 14:15:27 INFO eval.AbstractDifferenceRecommenderEvaluator: Approximate memory used: 45MB / 90MB
13/06/17 14:15:27 INFO eval.AbstractDifferenceRecommenderEvaluator: Unable to recommend in 6317 cases
13/06/17 14:15:28 INFO eval.AbstractDifferenceRecommenderEvaluator: Average time per recommendation: 5ms
13/06/17 14:15:28 INFO eval.AbstractDifferenceRecommenderEvaluator: Approximate memory used: 46MB / 103MB
13/06/17 14:15:28 INFO eval.AbstractDifferenceRecommenderEvaluator: Unable to recommend in 7220 cases
13/06/17 14:15:30 INFO eval.AbstractDifferenceRecommenderEvaluator: Average time per recommendation: 5ms
13/06/17 14:15:30 INFO eval.AbstractDifferenceRecommenderEvaluator: Approximate memory used: 72MB / 102MB
13/06/17 14:15:30 INFO eval.AbstractDifferenceRecommenderEvaluator: Unable to recommend in 8145 cases
13/06/17 14:15:31 INFO eval.AbstractDifferenceRecommenderEvaluator: Average time per recommendation: 5ms
13/06/17 14:15:31 INFO eval.AbstractDifferenceRecommenderEvaluator: Approximate memory used: 67MB / 99MB
13/06/17 14:15:31 INFO eval.AbstractDifferenceRecommenderEvaluator: Unable to recommend in 9084 cases
13/06/17 14:15:33 INFO eval.AbstractDifferenceRecommenderEvaluator: Average time per recommendation: 5ms
13/06/17 14:15:33 INFO eval.AbstractDifferenceRecommenderEvaluator: Approximate memory used: 31MB / 83MB
13/06/17 14:15:33 INFO eval.AbstractDifferenceRecommenderEvaluator: Unable to recommend in 9982 cases
13/06/17 14:15:33 INFO eval.AbstractDifferenceRecommenderEvaluator: Evaluation result: 1.643042326271061
I don't understand the numbers, why they show so many times, and is this unable to recommend in xxx cases bigger then 20% of all my data? Does it mean that for one user it can't recommend in 3 cases, and for other in 9892?
Related
I have been using rails 4.2.8 and ruby 2.6.6
In my application we have huge database(postGresql).
In report section when I am trying to generate reports(much more complex quesries, many models used), I see total allocated memory is huge.
I am using worker to generate report. Here is the main part of the memory profiler gem's generate report:
Total allocated: 335531877 bytes (4301278 objects)
Total retained: 2100410 bytes (21442 objects)
allocated memory by gem
-----------------------------------
263364691 activerecord-4.2.8
As you can see total memory used: 335MB where active record consumed 263MB. It is my local report. In production server consumed memory almost 700MB.
Is it normal scenario? Sometimes I am getting Error R14 (Memory quota exceeded) in production server.
Appreciate your time and help!
I have a request in a Postman request batch that takes longer than usual. Here is the request as a standalone request:
As you can see it takes about 300ms on average.
Here is that same request in a batch of requests:
In the batch, 8 requests are sent out 5 times. 3/5 iterations all the requests are handled in the expected 300ms avg. but in 2/5 of the iterations that one request takes around 4000-10000ms. I thought it might be a problem with the IIS App pool, but even if I process that request first, it still takes longer than it should take. Any idea as to what could be going on? Note this running on a VM, not sure if that makes a difference, but here is the CPU info:
CPU
Intel(R) Xeon(R) Gold 6226R CPU # 2.90GHz
Maximum speed: 2,89 GHz
Sockets: 8
Virtual processors: 8
Virtual machine: Yes
L1 cache: N/A
Utilization 1%
Speed 2,89 GHz
Up time 0:04:52:24
Processes 63
Threads 1124
Handles 27599
I host a static web page with Caddy Server on Google's managed Kubernetes service. I monitor this site with Google Stackdriver.
I deploy my code via a Helm chart. See the source code here (permalink).
I have noticed that the latency will oscillate between about 40 ms and 200 ms every 3 minutes. Almost like clockwork.
As far as I can tell there isn't an obvious correlation between CPU usage and the latency period.
Here is a histogram of CPU usage and latency:
What could be causing this oddly repetitive pattern?
We have built a rails app and are trying to support around 6k concurrent users making on average 6 request each per minute, with an average rails web transaction response time of 700 ms.
We did the maths, and it works out that we would need around 420 nginx/passenger instances running (we are not running in multithreaded mode due to legacy codebase that may not be threadsafe). This seems like an awful lot of nginx instances needed to support this kind of load.
We are running 20 nginx/passenger instances per server at the moment, so we need about 20 servers to get to the 420 instances of nginx/passenger required to serve that traffic.
Here is the math:
6k Users X 6 RPM Per User = 36k Total RPM
36k X .7 Seconds (AVG response time) = 25200 seconds of processing
25200/60 = 420 instances (Divide by 60 to fit all that processing into 1 min)
Does anybody have any experience around this that could help us out?
Is this just how it has to be with the amount of servers we must run?
thanks
I've been running with this problem lately. I can spot the following in server console:
Completed 200 OK in 2748ms (Views: 0.2ms | ActiveRecord: 42.8ms)
As you can see active record and views takes less than a second but still takes around 4 second to get a response from the server. I've run multiple Active record optimization but I can't find why does it take that long to see it.
Give rack-mini-profiler a try.
Middleware that displays speed badge for every html page. Designed to work both in production and in development.
Features:
Database profiling - Currently supports Mysql2, Postgres, Oracle (oracle_enhanced ~> 1.5.0) and Mongoid3 (with fallback support to ActiveRecord)
Call-stack profiling - Flame graphs showing time spent by gem
Memory profiling - Per-request memory usage, GC stats, and global allocation metrics