-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
improve startup and overall performance #42
Comments
The start up speed is limited by sqlite. Maybe I will find another embedded database to use, but atm you can only speed up loading time by installing a separate database like mysql and create your own hibernate config. If you need help, I can post an example. I noticed an slow interface loading speed, too. But as I am using an old atom 1,6ghz / 1,5gb ram / win7 laptop I thought it might be an hardware performance issue. Which specs does your XG pc have? |
It's a normal Desktop PC. Core i5 with some GHz, 16 GB RAM and I already moved those db files to my SSD drive. |
I have the same problem, running XG v3.1.0.1 on Windows 8.1. running basically nothing else than standard windows services and XG. I have added 2 servers and 3 channels |
Hmm, had a look into the database. 160k packets are in and are all up to date. So the size of the db is normal. Maybe one could load the whole database into the RAM and then start xg using the RAM database? I don't have a clear idea about it atm, but maybe you have one? I am going to think about it, too. Maybe a tmpfs or the like. A solution might be a script, manually copying the config files of XG to a tmpfs, starting XG and using the db out of this tmpfs. Shutdown with a script, too. This copies the db back to hard disk after shutdown. So, if PC crashes, database is still in place, but not up to date. Could that delete files in the XG/tmp folder? Any other side effects possible when using an old db? What is the best solution to stop XG via console/script? Sending some signal with the kill command? |
Why must we vacuum the DB on startup? Could we periodically vacuum during runtime instead. for example every 5 minutes do a mini vacuum.
Or something like that, my SQL skills isn't the best. The top 50 and the 5 minutes could be adjusted to suit performace vs cleanness. Loading the entire DB into ram is a bad idea, better off just creating indexes for the data you need to query frequently; like primary keys etc. Could it be a threading issue? spawn a worker thread to handle the vacuuming, so the main app execution does not get blocked. There are a few ways to deal with performance issues. Sorry, I should probably read the source code before offering suggestions. |
I think Lars is switching the database from sqlite to db4o. So we can expect performance boost with that. |
lformella: Is it possible to post a short howto about changing the the database from sqlite to mysql? |
https://github.com/scottc/xdcc-grabscher/commit/3c238611600ffd742872cacf6853f249f414dcba |
@adrenochrom @scottc I am keeping XG running untill it stops working or the machine reboots. So if the startup process takes two minutes or just 30 seconds is not really important. Do you restart XG so often that every second matters? |
I run it as a service on boot, on my desktop machine that I shutdown everynight. I don't mind the current performance, but faster is better. Here is a benchmark, for checking duplicates, comparing N^2 foreach loop, vs Linq groupby broadphase.
N^2, isn't actually that costly in this case, because we are just doing two equality comparisons. Also we are firing many object removed events, which is calling the database |
Can u please share ur service unit in the wiki? |
Is there a plan for a next release available? Last is from May... or shall i better build the SW by myself? |
What I'm using, for unit file:
On archlinux:
Ideally, I would install the app somewhere following the Linux Standards Base convention, or if i was going to keep the the app in my home directory, I might consider running the service under the service manager of my user, by using the
I should consider maintaining two packages in the AUR, xdcc-grabscher and xdcc-grabscher-git. |
If you could maintain a git verison in the AUR, I would like to install it! :) 👍 |
@lformella how about a new release? |
@Strubbl xbuild does not like the Wix (windows installer) project, but the rest builds fine. Need to figure out a way to exlude building this project, or ignore the xbuild error. What I've got so far.
|
@scottc Or maybe it is possible to wiki a manual how to build it with monodevelop or the like? Because I get the wix issues there, too. |
Thanks, I am going to give a try. |
Take a look at the new version v3.3.0.0 |
Yeah, fast as the wind |
When I start XG it need some minutes (2 to 3 min) before the web interface is ready. And even when this interface is ready, it needs some more time to get all my saved searches and downloads loaded.
Maybe my db files are too big? But how can I clean them up? E.g. I don't need the stuff older than a week or a couple of days.
File sizes are e.g.:
$ ll insgesamt 48M -rw-r--r-- 1 strubbl users 2,3K 4. Apr 18:44 xg.config -rw-r--r-- 1 strubbl users 48M 4. Apr 18:47 xgobjects.db -rw-r--r-- 1 strubbl users 200K 4. Apr 18:49 xgsnapshots.db
Any other suggestions to improve performance of XG?
The text was updated successfully, but these errors were encountered: