How big are the diffs being put up?

When viewing a diff, Review Board must take the uploaded diff file, grab
each file from SVN, run patch to apply it, perform a side-by-side diff
operation, and then render it (with syntax highlighting and everything
else).

We are at the mercy of libsvn (and pysvn), patch, and Pygments (the syntax
highlighting renderer), which can all be slow for very large files. If
you're putting up a diff that's, say, a megabyte in size, you'll hit some
issues.

Now, once things are properly fetched and rendered, they end up in
memcached. One thing to check is that reloading the diff viewer for a file
the second time is faster. If not, then it's possible that the caching is
incorrect, in which case I would recommend going into the Administration UI
and looking at the Server Cache information.

You also may want to edit the memcached configuration file
(/etc/memcached.conf) and bump up the amount of memory available to it (the
-m flag, I believe).

If it's really slow for reasonably-sized diffs, and it is indeed making use
of the cache, then there are a couple other things we can check.

Christian

-- 
Christian Hammond - [email protected]
Review Board - http://www.reviewboard.org
VMware, Inc. - http://www.vmware.com


On Thu, Oct 14, 2010 at 12:42 AM, Mohan <[email protected]> wrote:

>
>
> We are using SVN repository.  Apart from ReviewBoard nothing is
> running on this server.
> This is the Virtual Machine.
>
> When we hit on “View diff” CPU and memory usage goes very high .
>
> Here is the top command output:
>
> top - 07:53:45 up 1 day, 23:51,  4 users,  load average: 1.06, 0.40,
> 0.17
> Tasks:  90 total,   5 running,  85 sleeping,   0 stopped,   0 zombie
> Cpu(s): 49.4%us,  0.6%sy,  0.0%ni, 49.8%id,  0.2%wa,  0.0%hi,
> 0.0%si,  0.0%st
> Mem:   5760760k total,  1245068k used,  4515692k free,    56924k
> buffers
> Swap:  2096472k total,    44452k used,  2052020k free,   150628k
> cached
>
>  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
> 14071 apache    25   0  449m 116m 6124 R 89.0  2.1   0:34.34 httpd
>
>  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
> 14071 apache    25   0  423m  89m 6124 R 43.6  1.6   0:22.50 httpd
>
>  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
>  3079 apache    25   0 1501m 1.0g 6948 R 89.2 18.5   2:34.12 httpd
>
> -Mohan
>
> On Oct 14, 11:01 am, Christian Hammond <[email protected]> wrote:
> > You definitely shouldn't be seeing that level of performance problems.
> >
> > What type of repository are you using?
> >
> > is there anything else running on this server?
> >
> > What kind of load do you have, user-wise?
> >
> > Christian
> >
> > --
> > Christian Hammond - [email protected]
> > Review Board -http://www.reviewboard.org
> > VMware, Inc. -http://www.vmware.com
> >
> > On Wed, Oct 13, 2010 at 10:53 PM, Mohan <[email protected]> wrote:
> >
> > > Hi,
> >
> > > I have installed review Board 1.5 on Centos 5.5. As per the Review
> > > Board document installed all the recommended software and required
> > > dependencies.
> >
> > > 6GB RAM
> >
> > > *memcached is also installed.
> >
> > > when we are doing “View Diff” it’s taking more time to open the codes.
> > > And also sometimes throws the following error: “ Cannot allocate
> > > Memory”
> >
> > > I have noticed that high memory usage on this machine.
> >
> > > [r...@rboard ~]# free
> > >                   total        used               free     shared
> > > buffers     cached
> > > Mem:       5760760    5726016      34744          0        220
> > > 6680
> > > -/+ buffers/cache:    5719116      41644
> > > Swap:      2096472    2096472          0
> >
> > > Review Board performance is slow. Please let me know how can we
> > > increase the performance?
> >
> > >  [Errno 12] Cannot allocate memory
> > > Traceback (most recent call last):
> > >  File "/usr/lib/python2.4/site-packages/ReviewBoard-1.5-py2.4.egg/
> > > reviewboard/diffviewer/views.py", line 153, in view_diff
> > >    interdiffset, highlighting, True)
> > >  File "/usr/lib/python2.4/site-packages/ReviewBoard-1.5-py2.4.egg/
> > > reviewboard/diffviewer/diffutils.py", line 1063, in get_diff_files
> > >    large_data=True)
> > >  File "/usr/lib/python2.4/site-packages/Djblets-0.6.4-py2.4.egg/
> > > djblets/util/misc.py", line 166, in cache_memoize
> > >    data = lookup_callable()
> > >  File "/usr/lib/python2.4/site-packages/ReviewBoard-1.5-py2.4.egg/
> > > reviewboard/diffviewer/diffutils.py", line 1062, in <lambda>
> > >    enable_syntax_highlighting)),
> > >  File "/usr/lib/python2.4/site-packages/ReviewBoard-1.5-py2.4.egg/
> > > reviewboard/diffviewer/diffutils.py", line 549, in get_chunks
> > >    new = get_patched_file(old, filediff)
> > >  File "/usr/lib/python2.4/site-packages/ReviewBoard-1.5-py2.4.egg/
> > > reviewboard/diffviewer/diffutils.py", line 374, in get_patched_file
> > >    return patch(filediff.diff, buffer, filediff.dest_file)
> > >  File "/usr/lib/python2.4/site-packages/ReviewBoard-1.5-py2.4.egg/
> > > reviewboard/diffviewer/diffutils.py", line 222, in patch
> > >    stderr=subprocess.STDOUT)
> > >  File "/usr/lib64/python2.4/subprocess.py", line 550, in __init__
> > >    errread, errwrite)
> > >  File "/usr/lib64/python2.4/subprocess.py", line 919, in
> > > _execute_child
> > >    self.pid = os.fork()
> > > OSError: [Errno 12] Cannot allocate memory
> >
> > > --
> > > Want to help the Review Board project? Donate today at
> > >http://www.reviewboard.org/donate/
> > > Happy user? Let us know athttp://www.reviewboard.org/users/
> > > -~----------~----~----~----~------~----~------~--~---
> > > To unsubscribe from this group, send email to
> > > [email protected]<reviewboard%[email protected]>
> <reviewboard%[email protected]<reviewboard%[email protected]>
> >
> > > For more options, visit this group at
> > >http://groups.google.com/group/reviewboard?hl=en
>

-- 
Want to help the Review Board project? Donate today at 
http://www.reviewboard.org/donate/
Happy user? Let us know at http://www.reviewboard.org/users/
-~----------~----~----~----~------~----~------~--~---
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/reviewboard?hl=en

Reply via email to