Forum rules
Under no circumstances is spamming or advertising of any kind allowed. Do not post any abusive, obscene, vulgar, slanderous, hateful, threatening, sexually-orientated or any other material that may violate others security. Profanity or any kind of insolent behavior to other members (regardless of rank) will not be tolerated. Remember, what you don’t find offensive can be offensive to other members. Please treat each other with the kind of reverence you’d expect from other members.
Failure to comply with any of the above will result in users being banned without notice. If any further details are needed, contact: “The team” using the link at the bottom of the forum page. Thank you.
User avatar
oss
Site Admin
Posts: 5890
Joined: Sat Feb 25, 2006 11:26 pm
Contact: Website

Sat May 09, 2009 11:58 am

ok, danger recompiled varnish with fix posted by developers, it seems it helps. So lets see, how it will perform now. Anyway, handle 5000-6000 users online is not fun anymore. We need one more webserver it seems.

User avatar
eduo
Posts: 716
Joined: Sat Feb 10, 2007 1:40 am
Location: Information Technology
Contact: ICQ Website Yahoo Messenger

Sat May 09, 2009 10:09 pm

Are there any plans to revise the API and the methods before the big rewrite? Some of that might help.

What exactly is the most expensive(*) action in OpenSubtitles? Is it search? Is it a web query? Is it an API method?

(*)Expensive as in "the one that slows everything the most" or "the one that takes most resources".
http://eduo.info/
[url=http://eduo.info/soleol/]OpenSubtitles from your desktop: SolEol for Mac/Windows/Linux[/url]
[url=http://forums.plexapp.com/index.php?showtopic=325&st=0&p=2480&#entry2480]My current episode processing work flow[/url].

User avatar
oss
Site Admin
Posts: 5890
Joined: Sat Feb 25, 2006 11:26 pm
Contact: Website

Sun May 10, 2009 1:14 pm

there are some issues:

1. when website doesnt respond at all, it is down for long time - thats some big problem, like we had now recently. Now it is fixed (at least workaround, I still think there is something more behind that)

2. when website doesnt respond for short time - usually something is taking resources in mysql. Long query needed for statistics, for example I disabled to show downloaded subtitles per user. I got it database, but it takes long time to filter all downloads from HUGE download table(s)

3. connection error...

User avatar
eduo
Posts: 716
Joined: Sat Feb 10, 2007 1:40 am
Location: Information Technology
Contact: ICQ Website Yahoo Messenger

Sun May 10, 2009 1:47 pm

there are some issues:
2. when website doesnt respond for short time - usually something is taking resources in mysql. Long query needed for statistics, for example I disabled to show downloaded subtitles per user. I got it database, but it takes long time to filter all downloads from HUGE download table(s)
Consider running overnight job for this. And doing the grouping and summarising in PHP, not MySQL. I have several similar statistics jobs at the office and what I do is generate an overnight larger table and process it separately, filling out a "stats" table.

Users know the data there is refreshed overnight, so that's OK. Also, I don't include anything below a certain threshold. That eliminates more than 80% of users who don't know nor care about statistics. There's a "minimum" to appear in the statistics ladder. Improves competition and lowers processing needs.
http://eduo.info/
[url=http://eduo.info/soleol/]OpenSubtitles from your desktop: SolEol for Mac/Windows/Linux[/url]
[url=http://forums.plexapp.com/index.php?showtopic=325&st=0&p=2480&#entry2480]My current episode processing work flow[/url].

Sorku
Posts: 3
Joined: Sun May 10, 2009 4:48 pm

Sun May 10, 2009 5:15 pm

2. when website doesnt respond for short time - usually something is taking resources in mysql. Long query needed for statistics, for example I disabled to show downloaded subtitles per user. I got it database, but it takes long time to filter all downloads from HUGE download table(s)
Like eduo said, caching is the way to resolve all heavy queries. There are quite a few free frameworks for caching available in PHP out there, many of them are quite easy to implement if opensubtitles is object oriented :)

User avatar
eduo
Posts: 716
Joined: Sat Feb 10, 2007 1:40 am
Location: Information Technology
Contact: ICQ Website Yahoo Messenger

Sun May 10, 2009 5:27 pm

2. when website doesnt respond for short time - usually something is taking resources in mysql. Long query needed for statistics, for example I disabled to show downloaded subtitles per user. I got it database, but it takes long time to filter all downloads from HUGE download table(s)
Like eduo said, caching is the way to resolve all heavy queries. There are quite a few free frameworks for caching available in PHP out there, many of them are quite easy to implement if opensubtitles is object oriented :)
OS uses a lot of caching already. This is more than caching, it's changing the way some queries are made so they run on a separate "thread" than the site's requests.
http://eduo.info/
[url=http://eduo.info/soleol/]OpenSubtitles from your desktop: SolEol for Mac/Windows/Linux[/url]
[url=http://forums.plexapp.com/index.php?showtopic=325&st=0&p=2480&#entry2480]My current episode processing work flow[/url].

Sorku
Posts: 3
Joined: Sun May 10, 2009 4:48 pm

Sun May 10, 2009 9:30 pm

OS uses a lot of caching already. This is more than caching, it's changing the way some queries are made so they run on a separate "thread" than the site's requests.
I'm aware of that, but last time I checked the user statistics it was calculated on the fly, this was a couple of months ago though...

mataka80
Posts: 10
Joined: Wed Mar 11, 2009 9:04 pm

Sun May 17, 2009 12:08 pm

I just was wondering also that statistic calculation. One possibility would be to take kind of data warehousing approach and keep all older statistic in fact tables.

In other words e.g. last month would be in product db but older data would be in "DW". Containing only well defined tables for those statistic purposes. E.g. tables like UserDownloadsFact (e.g. user, month, amount), SubtitleDownloadsFact (e.g. subtitle, mont, amount) having sums of downloads and those have time dimension on day or month level. Ok there will be lost connection from which user downloaded which subtitle and exactly on what time but it is always good to ask is that information really important for history data to take space and slowing down queries. (Of course if space is not an issue and that is still wanted to keep there it can be kept in another table. main idea is to get that old data away from product tables and have well defined summary facts for data that is needed on reports.)

Data from product environment can be moved to summarized fact tables once per day/week or whatever would be good interval.

Anyway this would make also possible to calculate "current" information by using both product and DW because product table would have lot less data and queries would be quite fast for it.

Of course this needs more work that approach that eduo proposed.

User avatar
eduo
Posts: 716
Joined: Sat Feb 10, 2007 1:40 am
Location: Information Technology
Contact: ICQ Website Yahoo Messenger

Sun May 17, 2009 8:01 pm

Or, even better, disable the godforsaken stats page and run it as a batch job overnight and leave it mostly static.

Without knowing the architecture of the site and where the loads are happening there isn't much we can do to help other than blindly offering suggestions.

One hint: Caching is a band-aid. Caching doesn't replace good coding practices. We can help with the latter while caching holds up.
http://eduo.info/
[url=http://eduo.info/soleol/]OpenSubtitles from your desktop: SolEol for Mac/Windows/Linux[/url]
[url=http://forums.plexapp.com/index.php?showtopic=325&st=0&p=2480&#entry2480]My current episode processing work flow[/url].

User avatar
eduo
Posts: 716
Joined: Sat Feb 10, 2007 1:40 am
Location: Information Technology
Contact: ICQ Website Yahoo Messenger

Mon May 18, 2009 1:45 am

Incidentally: Users are dropping like flies from the clients using the API. We can't tell them much because it's all a gray area. I don't know if the API is officially down or if it comes up from time to time.

One idea: To make a method (or use the serverinfo one) to report the status of the API. The XML could be static and it could be anonymous ( http://api.opensubtitles.org/apistatus.xml for example) which reports the overall status of the API and the methods that are working.

That way we could code the clients to let the users know the API is not fully functional. Representing this in the blog, forum and main pages would be an added bonus, similar to http://status.twitter.com/ .
http://eduo.info/
[url=http://eduo.info/soleol/]OpenSubtitles from your desktop: SolEol for Mac/Windows/Linux[/url]
[url=http://forums.plexapp.com/index.php?showtopic=325&st=0&p=2480&#entry2480]My current episode processing work flow[/url].

User avatar
eduo
Posts: 716
Joined: Sat Feb 10, 2007 1:40 am
Location: Information Technology
Contact: ICQ Website Yahoo Messenger

Thu Apr 22, 2010 11:39 pm

Suddenly this whole thread feels like Deja Vu.

I guess OS takes holidays on the same date always :)

As in the past, I offer my help in sharing the load of serving the files and/or the database.

As has been stated in the past, a mirror wouldn't be amiss. If at least to cover for them vacation time comes.
http://eduo.info/
[url=http://eduo.info/soleol/]OpenSubtitles from your desktop: SolEol for Mac/Windows/Linux[/url]
[url=http://forums.plexapp.com/index.php?showtopic=325&st=0&p=2480&#entry2480]My current episode processing work flow[/url].

User avatar
SimplyTheBOSS
Site Admin
Posts: 1326
Joined: Mon Feb 01, 2010 3:02 pm
Location: Finland

Fri Apr 23, 2010 3:20 pm


User avatar
oss
Site Admin
Posts: 5890
Joined: Sat Feb 25, 2006 11:26 pm
Contact: Website

Sat Apr 24, 2010 7:50 am

"opensubtitles fucked up BSplayer"

if you can, please explain this, it sounds quite offensive.

danger
Moderator
Posts: 43
Joined: Sun May 07, 2006 12:11 am

Sat Apr 24, 2010 11:11 am

should be fixed now.

User avatar
farslegender
Posts: 6
Joined: Tue Nov 10, 2009 1:03 am
Location: United States (U.S.A.)
Contact: Website Yahoo Messenger

Sat Apr 24, 2010 7:36 pm

Thanks Boss!
From what I can see the site is normal again.

:D
ॐ "If you ever felt fear, shame or pain, is because we never take risks." ॐ

Return to “General talk”

Who is online

Users browsing this forum: No registered users and 103 guests