Memcached provides methods to get statistics on individual servers or aggregated across all servers, flush all data, reset connection stats, and get the list of servers.
Given at zendcon 2007 unconference. My first "talk" ever given. Had a live demo. Note that although some of the information here is still pertinent, a lot is now outdated and most of the links no longer work. This is here for archival reasons
Given at zendcon 2007 unconference. My first "talk" ever given. Had a live demo. Note that although some of the information here is still pertinent, a lot is now outdated and most of the links no longer work. This is here for archival reasons
Video presentation: https://www.youtube.com/watch?v=jLAFXQ1Av50
Most applications written in Ruby are great, but also exists evil code applying WOP techniques. There are many workarounds in several programming languages, but in Ruby, when it happens, the proportion is bigger. It's very easy to write Ruby code with collateral damage.
You will see a collection of bad Ruby codes, with a description of how these codes affected negatively their applications and the solutions to fix and avoid them. Long classes, coupling, misapplication of OO, illegible code, tangled flows, naming issues and other things you can ever imagine are examples what you'll get.
Symfony is the greatest PHP Framework in the world. Until the framework met ReactPHP. Then, it became even better.
In this talk we will discover what a Promise is and what is designed for.
We will check how we can work with any Promise implementation in the regular Symfony distribution, either from the server perspective and inside our domain.
Finally, we will see how Symfony can easily turn Promises friendly by using ReactPHP, allowing us to work with them in our whole application, improving extremely our service performance.
All steps will be decorated with benchmarks, examples and deep analysis tips.
Always On, Multi-Site Design ConsiderationsJohn Martin
This slide deck covers some of the important considerations around building a Multi-Site Always On Availability Group or Failover Cluster Instance infrastructure.
Supercharging WordPress Development in 2018Adam Tomat
Slide links:
- PHP-FIG: https://www.php-fig.org/psr
- Timber: https://www.upstatement.com/timber/
- Bedrock: https://roots.io/bedrock/
- Lumberjack: https://github.com/Rareloop/lumberjack
- Lumberjack Core: https://github.com/Rareloop/lumberjack-core
- Collections: https://laravel.com/docs/5.6/collections
- PHP-DI: http://php-di.org/
- Lumberjack Validation: https://github.com/Rareloop/lumberjack-validation
- Sessions: https://github.com/Rareloop/lumberjack-core/tree/ft-session
- Lumberjack Example Repo: https://github.com/Rareloop/lumberjack-example
- Laravel Responsable: https://laravel-news.com/laravel-5-5-responsable
Towards the end of 2015 Rareloop launched their WordPress starter theme Lumberjack, which built on open source tools such as Bedrock and Timber. We wanted to move Lumberjack forward inline with everything we have learnt over the years of using it - which meant completely re-writing it from the ground up. The new Lumberjack is now stable and ready for use!
This talk is aimed at anyone involved in working with WordPress, regardless of how technical you are. The beauty of Lumberjack is that you can use as much or as little as you like, so whether you’re new to web development or a seasoned software engineer there will be something here for you.
PECL Picks - Extensions to make your life betterZendCon
One of the biggest strengths of PHP is its "glue" power. Take any C library and with a little magic and a compiler you have a fantastic extension. These extensions hide in PECL, but few people can tell the good from the unmaintained or just plain broken. Find the best extensions for your project, learn about PECL, and find out how to become a part of the PECL developer community.
Effective Doctrine2: Performance Tips for Symfony2 DevelopersMarcin Chwedziak
How to boost performance Doctrine2 with Symfony2. How to configure metadata caching? How to optimize DQL queries for caching. How to properly setup transaction demarcation with EntityManager. How to deal with EntityManager and Listeners with Symfony2 container.
In late december 2008 the Eclipse Foundation and the PDT developer team released the Eclipse PHP Development Platform version 2.0. This release comes with a number of enhancements and improvements to the prior version of PDT.
This talk is about these changes. It also gives you an introduction how to prepare your Eclipse PDT workspace to be an accessible and provding companion for your daily work by integrating xDebug, subversive and phpDocumentor using the external tools platform.
Video presentation: https://www.youtube.com/watch?v=jLAFXQ1Av50
Most applications written in Ruby are great, but also exists evil code applying WOP techniques. There are many workarounds in several programming languages, but in Ruby, when it happens, the proportion is bigger. It's very easy to write Ruby code with collateral damage.
You will see a collection of bad Ruby codes, with a description of how these codes affected negatively their applications and the solutions to fix and avoid them. Long classes, coupling, misapplication of OO, illegible code, tangled flows, naming issues and other things you can ever imagine are examples what you'll get.
Symfony is the greatest PHP Framework in the world. Until the framework met ReactPHP. Then, it became even better.
In this talk we will discover what a Promise is and what is designed for.
We will check how we can work with any Promise implementation in the regular Symfony distribution, either from the server perspective and inside our domain.
Finally, we will see how Symfony can easily turn Promises friendly by using ReactPHP, allowing us to work with them in our whole application, improving extremely our service performance.
All steps will be decorated with benchmarks, examples and deep analysis tips.
Always On, Multi-Site Design ConsiderationsJohn Martin
This slide deck covers some of the important considerations around building a Multi-Site Always On Availability Group or Failover Cluster Instance infrastructure.
Supercharging WordPress Development in 2018Adam Tomat
Slide links:
- PHP-FIG: https://www.php-fig.org/psr
- Timber: https://www.upstatement.com/timber/
- Bedrock: https://roots.io/bedrock/
- Lumberjack: https://github.com/Rareloop/lumberjack
- Lumberjack Core: https://github.com/Rareloop/lumberjack-core
- Collections: https://laravel.com/docs/5.6/collections
- PHP-DI: http://php-di.org/
- Lumberjack Validation: https://github.com/Rareloop/lumberjack-validation
- Sessions: https://github.com/Rareloop/lumberjack-core/tree/ft-session
- Lumberjack Example Repo: https://github.com/Rareloop/lumberjack-example
- Laravel Responsable: https://laravel-news.com/laravel-5-5-responsable
Towards the end of 2015 Rareloop launched their WordPress starter theme Lumberjack, which built on open source tools such as Bedrock and Timber. We wanted to move Lumberjack forward inline with everything we have learnt over the years of using it - which meant completely re-writing it from the ground up. The new Lumberjack is now stable and ready for use!
This talk is aimed at anyone involved in working with WordPress, regardless of how technical you are. The beauty of Lumberjack is that you can use as much or as little as you like, so whether you’re new to web development or a seasoned software engineer there will be something here for you.
PECL Picks - Extensions to make your life betterZendCon
One of the biggest strengths of PHP is its "glue" power. Take any C library and with a little magic and a compiler you have a fantastic extension. These extensions hide in PECL, but few people can tell the good from the unmaintained or just plain broken. Find the best extensions for your project, learn about PECL, and find out how to become a part of the PECL developer community.
Effective Doctrine2: Performance Tips for Symfony2 DevelopersMarcin Chwedziak
How to boost performance Doctrine2 with Symfony2. How to configure metadata caching? How to optimize DQL queries for caching. How to properly setup transaction demarcation with EntityManager. How to deal with EntityManager and Listeners with Symfony2 container.
In late december 2008 the Eclipse Foundation and the PDT developer team released the Eclipse PHP Development Platform version 2.0. This release comes with a number of enhancements and improvements to the prior version of PDT.
This talk is about these changes. It also gives you an introduction how to prepare your Eclipse PDT workspace to be an accessible and provding companion for your daily work by integrating xDebug, subversive and phpDocumentor using the external tools platform.
We are a Venezuelan Advertising agency that has subsidiaries in Houston and Miami.
We have been established for over 45 years and we have a dynamic and passionate
staff of over 50 employees.
We are a team of specialized bilingual and bicultural professionals with different areas of expertise, covering all of our Clients communications needs.
We have strong work values and integrity that builds strong partnerships.
We are Va Communications+, created to create, and yes we are going places!
Given at zendcon 2008 - my very first conference talk. And I did it way too fast. A lot of the information about these extensions is surprisingly relevant.
Caching and tuning fun for high scalabilityWim Godden
Caching has been a 'hot' topic for a few years. But caching takes more than merely taking data and putting it in a cache : the right caching techniques can improve performance and reduce load significantly. But we'll also look at some major pitfalls, showing that caching the wrong way can bring down your site. If you're looking for a clear explanation about various caching techniques and tools like Memcached, Nginx and Varnish, as well as ways to deploy them in an efficient way, this talk is for you.
Today's high-traffic web sites must implement performance-boosting measures that reduce data processing and reduce load on the database, while increasing the speed of content delivery. One such method is the use of a cache to temporarily store whole pages, database recordsets, large objects, and sessions. While many caching mechanisms exist, memcached provides one of the fastest and easiest-to-use caching servers. Coupling memcached with the alternative PHP cache (APC) can greatly improve performance by reducing data processing time. In this talk, Ben Ramsey covers memcached and the pecl/memcached and pecl/apc extensions for PHP, exploring caching strategies, a variety of configuration options to fine-tune your caching solution, and discusses when it may be appropriate to use memcached vs. APC to cache objects or data.
Caching and tuning fun for high scalability @ phpBenelux 2011Wim Godden
Slides for "Caching and Tuning fun for high scalability" talk, given @ phpBenelux Conference - Jan 28, 2011
Note that a lot of things were explained with each slide... that content is ofcourse not in the slides, so it might make some slides very unclear.
Caching and tuning fun for high scalabilityWim Godden
Caching has been a 'hot' topic for a few years. But caching takes more than merely taking data and putting it in a cache : the right caching techniques can improve performance and reduce load significantly. But we'll also look at some major pitfalls, showing that caching the wrong way can bring down your site.
If you're looking for a clear explanation about various caching techniques and tools like Memcached, Nginx and Varnish, as well as ways to deploy them in an efficient way, this talk is for you.
Today's high-traffic websites must implement performance-boosting measures that reduce data processing and reduce load on the database, while increasing the speed of content delivery. One such method is the use of a cache to temporarily store whole pages, database recordsets, large objects, and sessions. While many caching mechanisms exist, memcached provides one of the fastest and easiest-to-use caching servers. This talk will cover memcached and the memcache extension for PHP from setting up a memcached server to using it to provide a variety of caching solutions, including the use of memcached as a session data store.
Caching and tuning fun for high scalability @ FOSDEM 2012Wim Godden
Caching has been a 'hot' topic for a few years. But caching takes more than merely taking data and putting it in a cache : the right caching techniques can improve performance and reduce load significantly. But we'll also look at some major pitfalls, showing that caching the wrong way can bring down your site. If you're looking for a clear explanation about various caching techniques and tools like Memcached, Nginx and Varnish, as well as ways to deploy them in an efficient way, this talk is for you.
Caching and tuning fun for high scalabilityWim Godden
Caching has been a 'hot' topic for a few years. But caching takes more than merely taking data and putting it in a cache : the right caching techniques can improve performance and reduce load significantly. But we'll also look at some major pitfalls, showing that caching the wrong way can bring down your site. If you're looking for a clear explanation about various caching techniques and tools like Memcached, Nginx and Varnish, as well as ways to deploy them in an efficient way, this talk is for you.
Zend_Cache: how to improve the performance of PHP applicationsEnrico Zimuel
In this talk i showed some caching techniques in PHP using the Zend_Cache class of hte Zend Framework.
I presented the functions and the flexibility of the Zend_Cache with the use of the backends: File, APC, Memcached, Zend Server Community Edition.
Built-in query caching for all PHP MySQL extensions/APIsUlf Wendel
Query caching boosts the performance of PHP MySQL applications. Caching can be done on the database server or at the web clients. A new mysqlnd plugin adds query caching to all PHP MySQL extension: written in C, immediately usable with any PHP application because of no API changes, supports Memcache, APC, SQLite and main memory storage, integrates itself smoothless into existing PHP deployment infrastructure, helps you to scale by client, ... Enjoy!
GraphRAG is All You need? LLM & Knowledge GraphGuy Korland
Guy Korland, CEO and Co-founder of FalkorDB, will review two articles on the integration of language models with knowledge graphs.
1. Unifying Large Language Models and Knowledge Graphs: A Roadmap.
https://arxiv.org/abs/2306.08302
2. Microsoft Research's GraphRAG paper and a review paper on various uses of knowledge graphs:
https://www.microsoft.com/en-us/research/blog/graphrag-unlocking-llm-discovery-on-narrative-private-data/
UiPath Test Automation using UiPath Test Suite series, part 4DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 4. In this session, we will cover Test Manager overview along with SAP heatmap.
The UiPath Test Manager overview with SAP heatmap webinar offers a concise yet comprehensive exploration of the role of a Test Manager within SAP environments, coupled with the utilization of heatmaps for effective testing strategies.
Participants will gain insights into the responsibilities, challenges, and best practices associated with test management in SAP projects. Additionally, the webinar delves into the significance of heatmaps as a visual aid for identifying testing priorities, areas of risk, and resource allocation within SAP landscapes. Through this session, attendees can expect to enhance their understanding of test management principles while learning practical approaches to optimize testing processes in SAP environments using heatmap visualization techniques
What will you get from this session?
1. Insights into SAP testing best practices
2. Heatmap utilization for testing
3. Optimization of testing processes
4. Demo
Topics covered:
Execution from the test manager
Orchestrator execution result
Defect reporting
SAP heatmap example with demo
Speaker:
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...UiPathCommunity
💥 Speed, accuracy, and scaling – discover the superpowers of GenAI in action with UiPath Document Understanding and Communications Mining™:
See how to accelerate model training and optimize model performance with active learning
Learn about the latest enhancements to out-of-the-box document processing – with little to no training required
Get an exclusive demo of the new family of UiPath LLMs – GenAI models specialized for processing different types of documents and messages
This is a hands-on session specifically designed for automation developers and AI enthusiasts seeking to enhance their knowledge in leveraging the latest intelligent document processing capabilities offered by UiPath.
Speakers:
👨🏫 Andras Palfi, Senior Product Manager, UiPath
👩🏫 Lenka Dulovicova, Product Program Manager, UiPath
The Art of the Pitch: WordPress Relationships and SalesLaura Byrne
Clients don’t know what they don’t know. What web solutions are right for them? How does WordPress come into the picture? How do you make sure you understand scope and timeline? What do you do if sometime changes?
All these questions and more will be explored as we talk about matching clients’ needs with what your agency offers without pulling teeth or pulling your hair out. Practical tips, and strategies for successful relationship building that leads to closing the deal.
Search and Society: Reimagining Information Access for Radical FuturesBhaskar Mitra
The field of Information retrieval (IR) is currently undergoing a transformative shift, at least partly due to the emerging applications of generative AI to information access. In this talk, we will deliberate on the sociotechnical implications of generative AI for information access. We will argue that there is both a critical necessity and an exciting opportunity for the IR community to re-center our research agendas on societal needs while dismantling the artificial separation between the work on fairness, accountability, transparency, and ethics in IR and the rest of IR research. Instead of adopting a reactionary strategy of trying to mitigate potential social harms from emerging technologies, the community should aim to proactively set the research agenda for the kinds of systems we should build inspired by diverse explicitly stated sociotechnical imaginaries. The sociotechnical imaginaries that underpin the design and development of information access technologies needs to be explicitly articulated, and we need to develop theories of change in context of these diverse perspectives. Our guiding future imaginaries must be informed by other academic fields, such as democratic theory and critical theory, and should be co-developed with social science scholars, legal scholars, civil rights and social justice activists, and artists, among others.
Key Trends Shaping the Future of Infrastructure.pdfCheryl Hung
Keynote at DIGIT West Expo, Glasgow on 29 May 2024.
Cheryl Hung, ochery.com
Sr Director, Infrastructure Ecosystem, Arm.
The key trends across hardware, cloud and open-source; exploring how these areas are likely to mature and develop over the short and long-term, and then considering how organisations can position themselves to adapt and thrive.
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Tobias Schneck
As AI technology is pushing into IT I was wondering myself, as an “infrastructure container kubernetes guy”, how get this fancy AI technology get managed from an infrastructure operational view? Is it possible to apply our lovely cloud native principals as well? What benefit’s both technologies could bring to each other?
Let me take this questions and provide you a short journey through existing deployment models and use cases for AI software. On practical examples, we discuss what cloud/on-premise strategy we may need for applying it to our own infrastructure to get it to work from an enterprise perspective. I want to give an overview about infrastructure requirements and technologies, what could be beneficial or limiting your AI use cases in an enterprise environment. An interactive Demo will give you some insides, what approaches I got already working for real.
Neuro-symbolic is not enough, we need neuro-*semantic*Frank van Harmelen
Neuro-symbolic (NeSy) AI is on the rise. However, simply machine learning on just any symbolic structure is not sufficient to really harvest the gains of NeSy. These will only be gained when the symbolic structures have an actual semantics. I give an operational definition of semantics as “predictable inference”.
All of this illustrated with link prediction over knowledge graphs, but the argument is general.
JMeter webinar - integration with InfluxDB and GrafanaRTTS
Watch this recorded webinar about real-time monitoring of application performance. See how to integrate Apache JMeter, the open-source leader in performance testing, with InfluxDB, the open-source time-series database, and Grafana, the open-source analytics and visualization application.
In this webinar, we will review the benefits of leveraging InfluxDB and Grafana when executing load tests and demonstrate how these tools are used to visualize performance metrics.
Length: 30 minutes
Session Overview
-------------------------------------------
During this webinar, we will cover the following topics while demonstrating the integrations of JMeter, InfluxDB and Grafana:
- What out-of-the-box solutions are available for real-time monitoring JMeter tests?
- What are the benefits of integrating InfluxDB and Grafana into the load testing stack?
- Which features are provided by Grafana?
- Demonstration of InfluxDB and Grafana using a practice web application
To view the webinar recording, go to:
https://www.rttsweb.com/jmeter-integration-webinar
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf91mobiles
91mobiles recently conducted a Smart TV Buyer Insights Survey in which we asked over 3,000 respondents about the TV they own, aspects they look at on a new TV, and their TV buying preferences.
Epistemic Interaction - tuning interfaces to provide information for AI supportAlan Dix
Paper presented at SYNERGY workshop at AVI 2024, Genoa, Italy. 3rd June 2024
https://alandix.com/academic/papers/synergy2024-epistemic/
As machine learning integrates deeper into human-computer interactions, the concept of epistemic interaction emerges, aiming to refine these interactions to enhance system adaptability. This approach encourages minor, intentional adjustments in user behaviour to enrich the data available for system learning. This paper introduces epistemic interaction within the context of human-system communication, illustrating how deliberate interaction design can improve system understanding and adaptation. Through concrete examples, we demonstrate the potential of epistemic interaction to significantly advance human-computer interaction by leveraging intuitive human communication strategies to inform system design and functionality, offering a novel pathway for enriching user-system engagements.
UiPath Test Automation using UiPath Test Suite series, part 3DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 3. In this session, we will cover desktop automation along with UI automation.
Topics covered:
UI automation Introduction,
UI automation Sample
Desktop automation flow
Pradeep Chinnala, Senior Consultant Automation Developer @WonderBotz and UiPath MVP
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
Let's dive deeper into the world of ODC! Ricardo Alves (OutSystems) will join us to tell all about the new Data Fabric. After that, Sezen de Bruijn (OutSystems) will get into the details on how to best design a sturdy architecture within ODC.
Connector Corner: Automate dynamic content and events by pushing a buttonDianaGray10
Here is something new! In our next Connector Corner webinar, we will demonstrate how you can use a single workflow to:
Create a campaign using Mailchimp with merge tags/fields
Send an interactive Slack channel message (using buttons)
Have the message received by managers and peers along with a test email for review
But there’s more:
In a second workflow supporting the same use case, you’ll see:
Your campaign sent to target colleagues for approval
If the “Approve” button is clicked, a Jira/Zendesk ticket is created for the marketing design team
But—if the “Reject” button is pushed, colleagues will be alerted via Slack message
Join us to learn more about this new, human-in-the-loop capability, brought to you by Integration Service connectors.
And...
Speakers:
Akshay Agnihotri, Product Manager
Charlie Greenberg, Host
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
Dutch php conference_apc_mem2010
1. APC & Memcache the High
Performance Duo
Dutch PHP Conference 2010
Ilia Alshanetsky
http://ilia.ws/
1
2. What is APC?
• Alternative PHP Cache
• Primarily designed to accelerate script
performance via opcode caching
• Extends opcode caching to facilitate user-data
caching
• Actively maintained & well supported
2
4. APC User-Cache
• Allows you to apply the same caching logic to
your data as applied to PHP scripts.
Slide Motto:
Not everything has to be real-time!
4
6. Let’s be lazy
// create or update an array of values for 1 day
if (!apc_store("identifier", array(1,2,3), 86400)) {
// uh, oh, b0rkage
mail("gopal, brian, kalle", "you broke my code", "fix it!");
}
If you don’t care whether your are adding or updating
values you can just use apc_store() and keep your
code simpler
6
7. Don’t Delete
• Deleting from cache is expensive as it may need
to re-structure internal hash tables.
• Rely on auto-expiry functionality instead
• Or an off-stream cron job to clean up stale
cache entries
• In many cases it is simpler just to start from
scratch.
apc_clear_cache(“user”)
7
8. Installing APC
# Unix
sudo bash (open root shell)
pecl install apc (configure, compile & install APC)
# Windows
Copy the php_apc.dll file into your php’s ext/
directory
# Common
Enable APC from your php.ini file
8
9. Advantages of APC
• If you (or your ISP) uses opcode caching,
chances are it is already there.
• Really efficient at storing simple types (scalars
& arrays)
• Really simple to use, can’t get any easier…
• Fairly stable
9
10. APC Limitations
• PHP only, can’t talk to other “stuff ”
• Not distributed, local only
• Opcode + User cache == all eggs in one basket
• Could be volatile
10
11. Memcached
• Interface to Memcached - a distributed caching
system
• Provides Object Oriented interface to caching
system
• Offers a built-in session handler
• Can only be used for “user” caching
• Purpose built, so lots of nifty features
11
17. Multi-Server Environment
$mc = new MemCached();
// add multiple servers to the list
// as many servers as you like can be added
$mc->addServers(
array('localhost', 11211, 80), // high-priority 80%
array('192.168.1.90', 11211, 20)// low-priority 20%
);
// You can also do it one at a time, but this is not recommended
$mc->addServer('localhost', 11211, 80);
$mc->addServer('192.168.1.90', 11211, 20);
// Get a list of servers in the pool
$mc->
getServerList();
// array(array(‘host’ => … , ‘port’ => … ‘weight’ => …))
17
18. Data Segmentation
• Memcached interface allows you to store
certain types of data on specific servers
$mc = new MemCached();
$mc->addServers( … );
// Add data_key with a value of “value” for 10 mins to server
// identified by “server_key”
$mc->addByKey('server_key', 'data_key', 'value', 600);
// Fetch key from specific server
$mc->getByKey('server_key', 'data_key');
// Add/update key on specific server
$mc->setByKey('server_key', 'data_key', 'value', 600);
// Remove key from specific server
$mc->deleteByKey('server_key', 'data_key');
18
19. And there is more ...
• The specific-server interface also supports multi-(get|set)
$mc = new MemCached();
$mc->addServers( … );
$key_set = array('key1' => “foo”, 'key1' => array(1,2,3));
// store multiple keys at once for 1 hour
$mc->setMultiByKey('server_key', $key_set, 3600);
// get multiple keys at once
$data = $mc->getMultiByKey('server_key', array_keys($key_set));
19
20. Delayed Data Retrieval
• One of the really neat features of Memcached
extension is the ability to execute the “fetch”
command, but defer the actual data retrieval
until later.
• Particularly handy when retrieving many keys
that won’t be needed until later.
20
24. Data Compression
• In many cases performance can be gained by
compressing large blocks of data. Since in most cases
network IO is more expensive then CPU speed + RAM.
$mc = new MemCached();
$mc->addServer('localhost', 11211);
// enable compression
$mc->setOption(Memcached::OPT_COMPRESSION, TRUE);
Related INI settings (INI_ALL)
Other possible value is zlib
memcached.compression_type=fastlz
minimum compression rate
memcached.compression_factor=1.3
minimum data size to compress
memcached.compression_threshold=2000
24
25. PHP Serialization
If you are using memcached to store complex data type
(arrays & objects), they will need to be converted to
strings for the purposes of storage, via serialization.
Memcached can make use of igbinary serializer that
works faster (~30%) and produces more compact data set
(up-to 45% smaller) than native PHP serializer.
http://github.com/phadej/igbinary
25
26. Enabling Igbinary
Install Memcached extension with
--enable-memcached-igbinary
$mc = new MemCached();
$mc->addServer('localhost', 11211);
// use Igbinary serializer
$mc->setOption(
Memcached::OPT_SERIALIZER,
Memcached::SERIALIZER_IGBINARY
);
26
28. Installing Memcached
Download memcached from http://
www.memcached.org and compile it.
Download libmemcached from http://tangent.org/552/
libmemcached.html and compile it.
pecl install memcached (configure, make, make install)
Enable Memcached from your php.ini file
28
29. Memcached Session Handler
# Session settings
session.save_handler # set to “memcached
session.save_path # set to memcache host server:port
memcached.sess_prefix # Defaults to memc.sess.key.
# Locking Controls
# Whether to enable session lock, on by default
memcached.sess_locking
# Maximum number of microseconds to wait on a lock
memcached.sess_lock_wait
29
30. Advantages of Memcache
• Allows other languages to talk to it
• One instance can be shared by multiple servers
• Failover & redundancy
• Nifty Features
• Very stable
30
31. It is not perfect because?
• Slower then APC, especially for array storage
• Requires external daemon
• You can forget about it on
shared hosting
31
32. That’s all folks
Any Questions?
Slides at: http://ilia.ws
Comments: http://joind.in/1554
32
33. APC Configuration
apc.enable # enable APC
apc.enable_cli # enable for CLI sapi
apc.max_file_size # max PHP file to be cached
apc.stat # turn off ONLY if your files never change
apc.file_update_protection # good idea if you edit files on
live environment
apc.filters # posix (ereg) expressions to filter out files
from being cached
apc.mmap_file_mask # /tmp/apc.XXXXXX (use mmap IO, USE IT!)
apc.shm_segments # if not using mmap IO, otherwise 1
apc.shm_size # how much memory to use
33
34. Make PHBs Happy
✴ Pretty graphics require GD extension
• For raw data you can use the apc_cache_info()
and apc_sma_info() functions.
34