What is ncache?
Upcoming SlideShare
Loading in...5
×
 

What is ncache?

on

  • 3,263 views

a web cache system base on nginx web server. faster and more efficient than squid. ...

a web cache system base on nginx web server. faster and more efficient than squid.

Features
The large storage can save over 30,000,000 caches
The self sort share memory hash index
Use linux epoll, sendfile and aio to improve the performance
Base on the fastest web server framework : nginx
The high throughput and high concurrent volume of the cache request
Without http headers cache
Low cpu cost and low iowait
Memory cache the hottest data use HAC
Aio queue with lio_listio function

http://www.ncache.org/

Statistics

Views

Total Views
3,263
Views on SlideShare
3,253
Embed Views
10

Actions

Likes
1
Downloads
44
Comments
0

1 Embed 10

http://www.slideshare.net 10

Accessibility

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

CC Attribution-NonCommercial-ShareAlike LicenseCC Attribution-NonCommercial-ShareAlike LicenseCC Attribution-NonCommercial-ShareAlike License

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

What is ncache? What is ncache? Presentation Transcript

  • NCACHE
    • The fast web cache server base on nginx
    • Use aio sendfile and epoll modules
    • The self sort share mem hash index
    • High performance and large storage
    • Low cpu cost and low iowait
    • Record lock instead of process lock
    • Without http headers cache
  • OVERVIEW F5 NGINX PROXY NCACHE BACKEND BACKEND BACKEND
  • STRUCTURE Be proxy hash index Init by Ngx master process when nginx is start on Ngx worker process Ngx worker process Disk Files Read / write by file system or raw dev Backend server Backend server Backend server Body filter Get the proxy content and save into the disk by aio
  • Logic Diagram Request Request Find cache in index found Not found Timeout? not yes Sendfile output Proxy backend Body filter Writev output Aiowrite fresh index
  • The self sort share mem hash index 2(5) 3(4) First floor of hash index List to solve the conflict of the hash Hash_malloc 1(6) Index[1]+2 = 7 1(6) 3(4) 2(7) Top:0 16777216 33554432 If arrived at the bottom of the share memory then ncache will return to the 16777216 point and find which can be reused
  • Record lock Mmap auto sync Mem index Sync file Worker process Worker process Read Write Worker process Do not need to lock any worker process or request cause wait not cause wait not cause wait
  • Performance between SQUID 1 First: cpu last: io Blue is ncache
  • Performance between SQUID 2 SQUID NCACHE
  • Future
    • The aio_sendfile function
    • Compress share memory hash index
    • Memory cache the hottest data
    • Raw device read and write
    • Distribute storage system
    • Aio queue with lio_listio function
  • The end
    • Google code:
      • http:// code.google.com/p/ncache /
    • Nginx wiki:
      • http://wiki.codemongers.com/
    • Our mail:
      • [email_address]
      • [email_address]