0
Answered

ubooquity for large traffic

Pavs m 9 years ago updated by Tom 9 years ago 9
I have setup ubooquity succesfully and I really love it. The problem is I have open it up for public and shared my link to 100s of users who are using it everyday and it seems to have put real stress on the server, it can be very slow during heavy traffic (I have checked on the network and disk io and the problem is not there). My question is is there anything I can do to make it faster to load?
Under review
Unfortunately, apart from adding CPUs and RAM, there is not much you can do. Ubooquity was not designed to support heavy loads (the initial use case is a small home server or a NAS).

The only thing you can try (if you did not already) is to give Ubooquity more RAM to work with.
This is done with the -Xmx Java option.
If you use the script I provide, just uncomment this line (remove the "#") and change the value if needed:

#MEM_OPT=-Xmx512m
Thanks I will try it as I have plenty of ram and cpu cycle laying around. Just out of curiousity, whats the default memory assigned to Ubooquity?
It depends on the total memory available on your system as well as the version of the JVM you use.
It's printed somewhere at the beginning of Ubooquity log file if you want to take a look.
Also for whatever reason the bash script is not working for me, will it be possible to call Ubooquity to use more memory from commandline? java -jar Ubooquity.jar -webadmin -Xmx (or something similar?)
You could also try running "nice" ( i am assuming you are running from linux, from your comment of bash ) you could give it a higher priority in addition to allocating more memory: Google "linux nice command"

http://askubuntu.com/questions/48708/change-niceness-priority-of-a-running-process
Yes, you can try that (for 500MB of memory, change it as you like):

nohup java -Xmx512m -jar Ubooquity.jar -webadmin </dev/null &>/dev/null &
I spotted an error in the script, probably the one that prevented you from using it, I'll fix it tonight. Done.
Thanks for the pointer. It doesn't look like its memory issue it was using:
Max heap size available: 3539 MB

Under normal circumstance. it looks like a case of not being built to handle this much load. A quick restart makes it faster again. I might use a script for now to restart it every few hours. Thanks for all the help.
+1
I have a task in my todo list to do some profiling, as there might be resource leaks.
But since it has not really been a problem so far, I kept postponing it (that and the fact that it's quite tedious a task).