DPDK Introduction Apr 24, 2016

DPDK Introduction

Intel DPDK全称Intel Data Plane Development Kit,是intel提供的数据平面开发工具集,为Intel architecture(IA)处理器架构下用户空间高效的数据包处理提供库函数和驱动的支持,它不同于Linux系统以通用性设计为目的,而是专注于网络应用中数据包的高性能处理。DPDK应用程序是运行在用户空间上利用自身提供的数据平面库来收发数据包,绕过了Linux内核协议栈对数据包处理过程。Linux内核将DPDK应用程序看作是一个普通的用户态进程,包括它的编译、连接和加载方式和普通程序没有什么两样。DPDK程序启动后只能有一个主线程,然后创建一些子线程并绑定到指定CPU核心上运行。

...
Tips for cgo Apr 24, 2016

cgo的一些tips

基本类型

The standard C numeric types are available under the names C.char, C.schar (signed char), C.uchar (unsigned char), C.short, C.ushort (unsigned short), C.int, C.uint (unsigned int), C.long, C.ulong (unsigned long), C.longlong (long long), C.ulonglong (unsigned long long), C.float, C.double, C.complexfloat (complex float), and C.complexdouble (complex double). The C type void* is represented by Go’s unsafe.Pointer. The C types __int128_t and __uint128_t are represented by [16]byte.

...
cgo in go 1.6 Apr 19, 2016

The major change is the definition of rules for sharing Go pointers with C code, to ensure that such C code can coexist with Go’s garbage collector. Briefly, Go and C may share memory allocated by Go when a pointer to that memory is passed to C as part of a cgo call, provided that the memory itself contains no pointers to Go-allocated memory, and provided that C does not retain the pointer after the call returns. These rules are checked by the runtime during program execution: if the runtime detects a violation, it prints a diagnosis and crashes the program. The checks can be disabled by setting the environment variable GODEBUG=cgocheck=0, but note that the vast majority of code identified by the checks is subtly incompatible with garbage collection in one way or another. Disabling the checks will typically only lead to more mysterious failure modes. Fixing the code in question should be strongly preferred over turning off the checks.

...
Upgrade CentOS kernel Mar 30, 2016

终于耐不住要升级下kernel了,目前epel提供两个版本: kernel-lt (4.4)和kernel-ml (4.5):

  • The kernel-ml packages are built from the sources available from the “mainline stable” branch of The Linux Kernel Archives (external link). The kernel configuration is based upon the default RHEL-7 configuration with added functionality enabled as appropriate. The packages are intentionally named kernel-ml so as not to conflict with the RHEL-7 kernels and, as such, they may be installed and updated alongside the regular kernel.
  • The kernel-lt packages are built from the sources available from The Linux Kernel Archives (external link), just like the kernel-ml packages. The difference is that kernel-lt is based on a “long term support” branch and kernel-ml is based on the “mainline stable” branch.

升级到lt的步骤很简单:

...
Borg, Omega, and Kubernetes (ACM Queue) Mar 04, 2016

Brendan Burns, Brian Grant等在Borg, Omega, and Kubernetes - Lessons learned from three container-management systems over a decade分享了Google在容器管理的经验教训。

在谷歌的历史上,开发了三种容器管理调度系统:

...
Docker overlay network dive Mar 04, 2016

DON MILLS写的Docker Multi-Host Networking: Overlays to the Rescue对Docker的overlay network做了细致的分析,值得看一看

Kubernetes sig-node (Asia) meeting notes Mar 02, 2016

Kubernetes 1.2 Status Update (@dchen)

  • Deployment object and HPA scale还有一些P0和P1的问题待解决
  • aws还有挺多的问题(应该要超过20个)
  • 整个v1.2还有超过100个issue,但大部分都不是block issue
  • v1.2推荐使用Docker v1.9.1,Docker v1.10 validation https://github.com/kubernetes/kubernetes/issues/19720
  • Docker v1.10最大的问题是镜像格式变化,需要某种转换镜像的管理机制

Huawei Conformance Test (@liangchenye)

关于Pod运行和删除的PR已经merge,但是image的test还在开发中。主要的问题是没有文档指导rkt环境的搭建。

...
10 things to avoid in docker containers Mar 01, 2016

Redhat发布的10 things to avoid in docker containers对于构建基于Container的服务非常有意义。摘录如下:

  1. Don’t store data in containers – A container can be stopped, destroyed, or replaced. An application version 1.0 running in container should be easily replaced by the version 1.1 without any impact or loss of data. For that reason, if you need to store data, store it in a volume, but take care if two containers write data on the same volume because it could cause corruption. Make sure your applications are designed to write to shared data stores.

需要持久化的数据存在volume中,这个是共识了。

...
Carina by Rackspace Feb 29, 2016

What is Carina?

Carina is a container runtime environment (currently in Beta) that offers performance, container-native tools, and portability without sacrificing ease of use. You can get started in minutes by using open-source software on managed infrastructure to run your containerized applications.

Your containers run in a bare-metal environment, which avoids the “hypervisor tax” on performance. Applications in this environment launch as much as 20 percent faster and run as much as 60 percent faster. This environment builds on the standard restrictions set out by libcontainer by using an AppArmor profile as an additional security layer to keep your resources isolated.

...
Notes about serverless Feb 26, 2016

“只需要关注数据和业务逻辑,无需维护服务器,也不需要关心系统的容量和扩容”, serverless将大家从server中解放了出来,只需要关注业务逻辑本身。serverless的概念跟PaaS很像,又比传统的PaaS有着更好的易用性。

...