Moodle

APC: Server->Performance - create plugin to utilize APC shmem

Details

  • Type: Improvement Improvement
  • Status: Open Open
  • Priority: Minor Minor
  • Resolution: Unresolved
  • Affects Version/s: 1.8, 1.9.13, 2.0, 2.1
  • Fix Version/s: DEV backlog
  • Component/s: Performance
  • Labels:
  • Affected Branches:
    MOODLE_18_STABLE, MOODLE_19_STABLE, MOODLE_20_STABLE, MOODLE_21_STABLE

Description

With plans for APC to be included by default with PHP6, I would anticipate that more folks may start using it. Currently, under SERVER->PERFORMANCE we have plugin options to take utilize internal, eaccelerator, and memcached. It would be good to add APC to that list.

Martin Langhoff mentioned this as a possibility in: http://moodle.org/mod/forum/discuss.php?d=75689#p357136 .

APC uses shmem by default. I'm attaching my production servers apc.php page should it be helpful.

I'd be happy to help with testing. Peace - Anthony

Issue Links

Activity

Hide
Martín Langhoff added a comment -

I have an APC plugin implemented.

Show
Martín Langhoff added a comment - I have an APC plugin implemented.
Hide
Anthony Borrow added a comment -

Martin - That's great news. I've not used it and am not sure that I even need it but in theory it seems like a good idea. I use APC and have not had any issues, I'm assuming this would just provide more options and perhaps some performance gains. Is there anywhere that you suggest that I could read a little to get up to speed on this. I look forward to seeing your APC plugin. Peace - Anthony

Show
Anthony Borrow added a comment - Martin - That's great news. I've not used it and am not sure that I even need it but in theory it seems like a good idea. I use APC and have not had any issues, I'm assuming this would just provide more options and perhaps some performance gains. Is there anywhere that you suggest that I could read a little to get up to speed on this. I look forward to seeing your APC plugin. Peace - Anthony
Hide
Martín Langhoff added a comment -

You need these 3 patches, it is part of a larger patchseries that give Moodle a big perf boost. A few of them are in 1.9 already, others are delayed for 2.0.

Implement the class...
http://git.catalyst.net.nz/gitweb?p=moodle-r2.git;a=commitdiff_plain;h=69e82ff1ef2e58160f5be9a6d53352674a5077d4;hp=14b0c4d7ed217b3676a9ce5d0bb7a09e03433ac4

And this fix
http://git.catalyst.net.nz/gitweb?p=moodle-r2.git;a=commitdiff_plain;h=b292ee5f7b1be7bc5971a9abbff7540cd5accc17

This is not strictly needed, but will help catch problems...
http://git.catalyst.net.nz/gitweb?p=moodle-r2.git;a=commitdiff_plain;h=e44feeb3093ddb54450520b257e981dab9ab4af1

Show
Martín Langhoff added a comment - You need these 3 patches, it is part of a larger patchseries that give Moodle a big perf boost. A few of them are in 1.9 already, others are delayed for 2.0. Implement the class... http://git.catalyst.net.nz/gitweb?p=moodle-r2.git;a=commitdiff_plain;h=69e82ff1ef2e58160f5be9a6d53352674a5077d4;hp=14b0c4d7ed217b3676a9ce5d0bb7a09e03433ac4 And this fix http://git.catalyst.net.nz/gitweb?p=moodle-r2.git;a=commitdiff_plain;h=b292ee5f7b1be7bc5971a9abbff7540cd5accc17 This is not strictly needed, but will help catch problems... http://git.catalyst.net.nz/gitweb?p=moodle-r2.git;a=commitdiff_plain;h=e44feeb3093ddb54450520b257e981dab9ab4af1
Hide
Anthony Borrow added a comment -

Martin - Thanks for the patches. I'll give them a shot and see what happens. Peace - Anthony

Show
Anthony Borrow added a comment - Martin - Thanks for the patches. I'll give them a shot and see what happens. Peace - Anthony
Hide
Anthony Borrow added a comment -

I forgot to test this but hopefully next week I might have some time to play with the patch. Peace - Anthony

Show
Anthony Borrow added a comment - I forgot to test this but hopefully next week I might have some time to play with the patch. Peace - Anthony
Hide
Courtney Roes added a comment -

Martin - I'm trying to implement APC on my Moodle server (running 1.9). Could you let me know more about your Plugin or how to apply these patches to get Moodle to use my APC effectively?

Thanks,
Courtney

Show
Courtney Roes added a comment - Martin - I'm trying to implement APC on my Moodle server (running 1.9). Could you let me know more about your Plugin or how to apply these patches to get Moodle to use my APC effectively? Thanks, Courtney
Hide
Anthony Borrow added a comment -

Courtney - I'm having a look at the patch now and will try to simplify the instructions for you. Peace - Anthony

Show
Anthony Borrow added a comment - Courtney - I'm having a look at the patch now and will try to simplify the instructions for you. Peace - Anthony
Hide
Anthony Borrow added a comment -

Attached is a diff file of the changes suggested in this tracker issue applied to Moodle 1.9. In addition, I added an option for apc in the /admin/settings/server.php. I've not tested this thoroughly but hopefully it will be of some help. Might this patch be considered for inclusion into HEAD? Peace - Anthony

Show
Anthony Borrow added a comment - Attached is a diff file of the changes suggested in this tracker issue applied to Moodle 1.9. In addition, I added an option for apc in the /admin/settings/server.php. I've not tested this thoroughly but hopefully it will be of some help. Might this patch be considered for inclusion into HEAD? Peace - Anthony
Hide
Anthony Borrow added a comment -

Courtney - Assuming you are using the latest version of Moodle 1.9, here is a zip file with the files that are modified. You may be able to simply copy and paste them on to your test server's Moodle installation. Let me know if you have any troubles or need anything else. Peace - Anthony

Show
Anthony Borrow added a comment - Courtney - Assuming you are using the latest version of Moodle 1.9, here is a zip file with the files that are modified. You may be able to simply copy and paste them on to your test server's Moodle installation. Let me know if you have any troubles or need anything else. Peace - Anthony
Hide
Jesus Martin added a comment -

What about this patch for 1.9.5 version? It'd be great...
I have been using APC for two years and it works well...

My apc.ini (Debian 4 stable)

extension=apc.so
apc.enabled=1
apc.shm_size=30
apc.shm_segments=1
apc.stat=1
apc.include_once_override=1
apc.optimize=1
apc.mmap_file_mask=/tmp/apc.XXXXXX

Thanks

Show
Jesus Martin added a comment - What about this patch for 1.9.5 version? It'd be great... I have been using APC for two years and it works well... My apc.ini (Debian 4 stable) extension=apc.so apc.enabled=1 apc.shm_size=30 apc.shm_segments=1 apc.stat=1 apc.include_once_override=1 apc.optimize=1 apc.mmap_file_mask=/tmp/apc.XXXXXX Thanks
Hide
Anthony Borrow added a comment -

Martín - Are you still planning to work on this or should I re-assign it back to Moodle.com? Peace - Anthony

Show
Anthony Borrow added a comment - Martín - Are you still planning to work on this or should I re-assign it back to Moodle.com? Peace - Anthony
Hide
Anthony Borrow added a comment -

I'm adding this to dev backlog and updating the affected branches. There is a patch and this would help with servers running APC. Peace - Anthony

Show
Anthony Borrow added a comment - I'm adding this to dev backlog and updating the affected branches. There is a patch and this would help with servers running APC. Peace - Anthony
Hide
Anthony Borrow added a comment -

Re-assigning back to moodle.com for consideration in a sprint near you

Show
Anthony Borrow added a comment - Re-assigning back to moodle.com for consideration in a sprint near you

People

Vote (5)
Watch (8)

Dates

  • Created:
    Updated: