eAccelerator

eAccelerator

by Brad Fisher -
Number of replies: 3

I've read some documentation and know some people have issues with eAccelerator after installing where the cached scripts is not updating. A lot of the suggestions I've read has stated that php's memory limit is too low or the memory size for eAccelerator is too low or you need to use fastcgi, etc. 

 

I've attached the phpinfo from my server. I recently switched to a VPS because I found that I couldn't handle 30 users online at once and the shared hosting account seemed to max out at about 15. In addition, the login average times on many pages were averaging 30+ seconds.  The new server seems to be handling much better doing a VPS but I am trying to sort out the kinks with eaccelerator.

 

My issue is that cached scripts always stays at 144 and never updates. Any ideas or suggestions? Also if you see anything I should change in my configuration please let me know. I've followed this sites guidelines as close as possible to make this Moodle work as efficiently as possible but am always open to new suggestions since it's a new server.

 

 

Core

PHP Version

5.3.3

 

Directive

Local Value

Master Value

allow_call_time_pass_reference

Off

Off

allow_url_fopen

On

On

allow_url_include

Off

Off

always_populate_raw_post_data

Off

Off

arg_separator.input

&

&

arg_separator.output

&

&

asp_tags

Off

Off

auto_append_file

no value

no value

auto_globals_jit

On

On

auto_prepend_file

no value

no value

browscap

no value

no value

default_charset

no value

no value

default_mimetype

text/html

text/html

define_syslog_variables

Off

Off

disable_classes

no value

no value

disable_functions

no value

no value

display_errors

Off

Off

display_startup_errors

Off

Off

doc_root

no value

no value

docref_ext

no value

no value

docref_root

no value

no value

enable_dl

Off

Off

error_append_string

no value

no value

error_log

no value

no value

error_prepend_string

no value

no value

error_reporting

0

22527

exit_on_timeout

Off

Off

expose_php

Off

Off

extension_dir

/usr/lib64/php/modules

/usr/lib64/php/modules

file_uploads

On

On

highlight.bg

#FFFFFF

#FFFFFF

highlight.comment

#FF8000

#FF8000

highlight.default

#0000BB

#0000BB

highlight.html

#000000

#000000

highlight.keyword

#007700

#007700

highlight.string

#DD0000

#DD0000

html_errors

Off

Off

ignore_repeated_errors

Off

Off

ignore_repeated_source

Off

Off

ignore_user_abort

Off

Off

implicit_flush

Off

Off

include_path

/var/www/vhosts/hughesacademysc.com/httpdocs/moodle/lib/zend:/var/www/vhosts/hughesacademysc.com/httpdocs/moodle/lib/pear:.:

.:

log_errors

On

On

log_errors_max_len

1024

1024

magic_quotes_gpc

Off

Off

magic_quotes_runtime

Off

Off

magic_quotes_sybase

Off

Off

mail.add_x_header

On

On

mail.force_extra_parameters

no value

no value

mail.log

no value

no value

max_execution_time

60

60

max_file_uploads

20

20

max_input_nesting_level

64

64

max_input_time

60

60

max_input_vars

1000

1000

memory_limit

128M

128M

open_basedir

/var/www/vhosts/hughesacademysc.com/:/tmp/

/var/www/vhosts/hughesacademysc.com/:/tmp/

output_buffering

4096

4096

output_handler

no value

no value

post_max_size

64M

64M

precision

14

14

realpath_cache_size

16K

16K

realpath_cache_ttl

120

120

register_argc_argv

Off

Off

register_globals

Off

Off

register_long_arrays

Off

Off

report_memleaks

On

On

report_zend_debug

On

On

request_order

GP

GP

safe_mode

Off

Off

safe_mode_exec_dir

no value

no value

safe_mode_gid

Off

Off

safe_mode_include_dir

no value

no value

sendmail_from

no value

no value

sendmail_path

/usr/sbin/sendmail -t -i

/usr/sbin/sendmail -t -i

serialize_precision

100

100

short_open_tag

On

On

SMTP

localhost

localhost

smtp_port

25

25

sql.safe_mode

Off

Off

track_errors

On

Off

unserialize_callback_func

no value

no value

upload_max_filesize

128M

128M

upload_tmp_dir

no value

no value

user_dir

no value

no value

user_ini.cache_ttl

300

300

user_ini.filename

.user.ini

.user.ini

variables_order

GPCS

GPCS

xmlrpc_error_number

0

0

xmlrpc_errors

Off

Off

y2k_compliance

On

On

zend.enable_gc

On

On

 

 

eAccelerator

eAccelerator support

enabled

Version

0.9.6.1

Caching Enabled

true

Optimizer Enabled

true

Check mtime Enabled

true

Memory Size

33,554,360 Bytes

Memory Available

96 Bytes

Memory Allocated

33,554,264 Bytes

Cached Scripts

144

Removed Scripts

31

 

Directive

Local Value

Master Value

eaccelerator.allowed_admin_path

no value

no value

eaccelerator.cache_dir

/var/cache/eaccelerator

/var/cache/eaccelerator

eaccelerator.check_mtime

1

1

eaccelerator.debug

0

0

eaccelerator.enable

1

1

eaccelerator.filter

no value

no value

eaccelerator.log_file

no value

no value

eaccelerator.optimizer

1

1

eaccelerator.shm_max

0

0

eaccelerator.shm_only

0

0

eaccelerator.shm_prune_period

0

0

eaccelerator.shm_size

0

0

eaccelerator.shm_ttl

0

0

 

 

Average of ratings: -
In reply to Brad Fisher

Re: eAccelerator

by Ron Meske -
Picture of Particularly helpful Moodlers

I haven't used eAccelerator but based on the symptoms it sounds like it is not clearing old scripts out.  

I would look at changing the value of eaccelerator.shm_ttl.  The definition of this setting is:

When eAccelerator doesn't have enough free shared memory to cache a new script it will remove all scripts from shared memory cache that haven't been accessed in at least shm_ttl seconds. By default this value is set to "0" which means that eAccelerator won't try to remove any old scripts from shared memory.

The next setting I would look at is your memory size, 32 MB seems small to me.  

In reply to Brad Fisher

Re: eAccelerator

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

I would struggle to recommend eAccelerator at all. We've have had problems with it throwing syntax errors on certain code constructs that it doesn't recognise. You'd be better with APC or OpCache (PHP 2.5 and newer)

In reply to Brad Fisher

Re: eAccelerator

by jason everling -

Within your eaccelerator.ini file or within php.ini you should specify a value for 

eaccelerator.shm_size = 

You are using the maximum amount of allocated memory,

If you want to set it higher than the default of 32mb or 32 to eaccelerator like below

eaccelerator.shm_size = 256

You will need to edit /proc/sys/kernal/shmmax with the below

kernel.shmmax = 268435456

You can use whichever limit you want, the example above sets it at 256mb but the value for kernel.shmmax needs to be in bytes

You can also do the following as root;

echo 268435456 > /proc/sys/kernel/shmmax

256 should be enough to cache all the scripts in Moodle.

 

Jason