<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[林大虫子的专栏]]></title><description><![CDATA[Baby progress everyday...]]></description><link>https://blog.csdn.net/west_609</link><language>zh-cn</language><generator>https://blog.csdn.net/</generator><copyright><![CDATA[Copyright &copy; west_609]]></copyright><item><title><![CDATA[容器内获取CPU核数的坑]]></title><link>https://blog.csdn.net/west_609/article/details/108534197</link><guid>https://blog.csdn.net/west_609/article/details/108534197</guid><author>west_609</author><pubDate>Fri, 11 Sep 2020 15:13:13 +0800</pubDate><description><![CDATA[现在越来越多的公司将服务通过容器来部署，但这里其实对Java的应用有一个坑。很多超时敏感的应用其实对GC的要求还是比较高的，减少GC的时间变得很重要，比如你可以根据当前机器的CPU核数得到一个较好的并发GC线程数 -XX:ParallelGCThreads，从而减少STW的时长。
但在早期的JDK版本中，比如笔者使用的Jdk1.8u102，当你使用Java的Runtime获取CPU数量时，在容器里面会返回容器所在宿主机的核数，而不是容器自身的：
int cores = Runtime.getRuntime(]]></description><category></category></item><item><title><![CDATA[Zipkin实现分布式调用链监控实践]]></title><link>https://blog.csdn.net/west_609/article/details/108383651</link><guid>https://blog.csdn.net/west_609/article/details/108383651</guid><author>west_609</author><pubDate>Thu, 03 Sep 2020 18:20:49 +0800</pubDate><description><![CDATA[本人所在的产品线是公司统一的构建管理平台，该平台采用了微服务的构造，跟微服务自身的通病一样，服务数量多了之后，存在这样一些问题：

接口超时或者调用失败后，无法知道具体是那个下游接口超时
接口响应慢后，怎么去了解是那个服务的那个方法调用耗时较长
对前端暴露的接口，响应时间对用户的体验比较敏感，怎么监控到系统中存在的慢接口，进而优化

微服务发展到今天，业界对这类问题已经有很多通用的解决方案，最早的比较Google公司发表的Dapper应该算得上是始祖了吧。 我们也不想重复造轮子，比较了一些方案，综合对埋点语]]></description><category></category></item><item><title><![CDATA[Yaml的多行字符串格式]]></title><link>https://blog.csdn.net/west_609/article/details/105968315</link><guid>https://blog.csdn.net/west_609/article/details/105968315</guid><author>west_609</author><pubDate>Thu, 07 May 2020 11:42:07 +0800</pubDate><description><![CDATA[Yaml多行文本格式
Yaml支持多行的字符串格式，可以通过下面两种格式指定：

Block Scalars
Flow Scalars

Block Scalars
Block Scalars格式的字符串由两部分组成：Scalar header 和 字符串
下面就是一个Block scalar字符串的例子：
example: &gt;
 Several lines of text,
 with s...]]></description><category></category></item><item><title><![CDATA[Python3.7镜像制作]]></title><link>https://blog.csdn.net/west_609/article/details/105687320</link><guid>https://blog.csdn.net/west_609/article/details/105687320</guid><author>west_609</author><pubDate>Wed, 22 Apr 2020 17:25:32 +0800</pubDate><description><![CDATA[最近需要一个Python3.7的镜像，本来想直接用发行商的rpm直接安装，但由于要基于centos, 找了一下只有FreeBSD/Ubuntu有提供，没办法只要自己从源代码来编译。本来想着也是挺简易的，但过程却比较痛苦，折腾了好久，在这里整理一下。
其实总结下来，都是日志惹的祸，有些关键的日志在make的过程被刷了导致没有发现问题。我的步骤是这样的：
官方安装指南
./configure --pr...]]></description><category></category></item><item><title><![CDATA[Docker容器网络实践]]></title><link>https://blog.csdn.net/west_609/article/details/105240188</link><guid>https://blog.csdn.net/west_609/article/details/105240188</guid><author>west_609</author><pubDate>Wed, 01 Apr 2020 12:22:01 +0800</pubDate><description><![CDATA[Docker容器网络实践Docker容器网络实践期望的结果操作步骤验证网络连接
Docker容器网络实践
文章的目的是了解容器网络是如何工作的。当我们用docker run启动一个容器的时候，通常可以通过–network参考来指定docker的网络模型，比如host, bridge， 这样docker runtime会自动为容器创建相应的网络。为了更加深刻地了解容器的网络工作原理，本文不使用doc...]]></description><category></category></item><item><title><![CDATA[Jenkins 一致性Hash节点调度]]></title><link>https://blog.csdn.net/west_609/article/details/103946448</link><guid>https://blog.csdn.net/west_609/article/details/103946448</guid><author>west_609</author><pubDate>Sun, 12 Jan 2020 15:46:58 +0800</pubDate><description><![CDATA[Jenkins 一致性Hash节点调度为什么需要一致性Hash一致性Hash
为什么需要一致性Hash
这个话题有点广，但在持续集成领域，使用Jenkins做CICD几乎已经成了一种标准。持续集成从使用者的角度来看有一个很重要的指标：关注快速的反馈，比如用户在提交代码后，开发或者测试能快速知道代码的质量，部署到测试环境。
如何才可以在Jenkins上提高用户的反馈速度呢？其实构建的速度一定程度上取...]]></description><category></category></item><item><title><![CDATA[优化Jenkins在云端构建性能]]></title><link>https://blog.csdn.net/west_609/article/details/103426364</link><guid>https://blog.csdn.net/west_609/article/details/103426364</guid><author>west_609</author><pubDate>Fri, 06 Dec 2019 17:01:46 +0800</pubDate><description><![CDATA[Jenkins在云端构建性能优化分析问题背景NodeProvisionerStragetegyJenkins Kubernates Plugin优化方案方案验证
问题背景
目前我们的PaaS平台使用了Jenkins对作为分布式构建调度平台，目前每天大概有5000左右的业务构建在上面运行，并且这些构建80%的执行是在高峰时段的几个小时内，执行包含单元测试，静态代码检查，打包，烘焙镜像，自动化测试以及...]]></description><category></category></item><item><title><![CDATA[StrngEntity中文编码问题]]></title><link>https://blog.csdn.net/west_609/article/details/83308242</link><guid>https://blog.csdn.net/west_609/article/details/83308242</guid><author>west_609</author><pubDate>Tue, 23 Oct 2018 15:56:39 +0800</pubDate><description><![CDATA[最近在调查系统中一个有关中文编码的问题，发现了一些坑，最终定位了是有着HTTP编码的问题。
最开始问题是这样的，我们有A/B/C三个系统，A系统发出的内容包含了中文，通过Tcpdump抓包发现B系统接收到的Http中的内容是正确的，但是B在转发给C系统之前，重新构建了一个HttpRequest，从这个新构建的Request发出来的内容就不正确了，表现为Content-Length少了。
构建新的H...]]></description><category></category></item><item><title><![CDATA[Go 学习杂谈 - Interface]]></title><link>https://blog.csdn.net/west_609/article/details/82962509</link><guid>https://blog.csdn.net/west_609/article/details/82962509</guid><author>west_609</author><pubDate>Sun, 07 Oct 2018 23:03:51 +0800</pubDate><description><![CDATA[上一遍文章中只简述Golang中的struct，这里想再总结一下另外一个所有高级语言中都有的特性：接口interface
说到其它的高级语言，在表述实现了某个接口里，需要显式地声明，比如Java通过implement关键字。但在Go中，一切变得简单。
首先，先定义一个接口类型，如下：
package intPkg
type Bird interface {
   Fly()
   Chirp()
...]]></description><category></category></item><item><title><![CDATA[Go学习杂谈]]></title><link>https://blog.csdn.net/west_609/article/details/82962312</link><guid>https://blog.csdn.net/west_609/article/details/82962312</guid><author>west_609</author><pubDate>Sun, 07 Oct 2018 22:37:19 +0800</pubDate><description><![CDATA[使用Go已经快有半年了，为了适应新公司的开发需要，半道入行，写了很多基于Go的应用（当然大部分是二次开发），也算是Golang的小用户了。一直没有太多的时间很系统地去看一些Golang的书籍，平时写代码也是凭借着对Java/C++的经验去猜测写Golang的代码，对常用的一些系统库也是在工作中学习。今天也是想总结回顾一下之前在使用过程中学习了一些东西，也借此巩固分享一下。
先说说总体对Golang...]]></description><category></category></item><item><title><![CDATA[Java Thread Dump]]></title><link>https://blog.csdn.net/west_609/article/details/79394610</link><guid>https://blog.csdn.net/west_609/article/details/79394610</guid><author>west_609</author><pubDate>Tue, 27 Feb 2018 23:44:29 +0800</pubDate><description><![CDATA[Thread dump是对于程序的诊断是非常有用的，它可以帮助我们分析诸如程序没有响应，响应慢，CPU抖动，死锁，内存问题以及其它的系统问题。今天主要想分享如果打印Thread Dump

假定我们现在怀疑某个java进程出现了问题，比如没有响应，首先可以尝试拿到这个java应用对应的process Id (ps or jps)。然后可以看一下这个应用启动了那一些线程，这个步骤可以top命令：

...]]></description><category></category></item><item><title><![CDATA[python 单元测试失败ModuleImportFailure]]></title><link>https://blog.csdn.net/west_609/article/details/79162935</link><guid>https://blog.csdn.net/west_609/article/details/79162935</guid><author>west_609</author><pubDate>Thu, 25 Jan 2018 15:53:59 +0800</pubDate><description><![CDATA[在用unittest跑python的单元测试的时候，碰到下面奇怪的错误：



E
======================================================================
ERROR: __main__ (unittest2.loader.LoadTestsFailure)
-----------------------------------]]></description><category></category></item><item><title><![CDATA[异步执行任务的方式]]></title><link>https://blog.csdn.net/west_609/article/details/79080244</link><guid>https://blog.csdn.net/west_609/article/details/79080244</guid><author>west_609</author><pubDate>Tue, 16 Jan 2018 22:57:57 +0800</pubDate><description><![CDATA[常用的异步的方式


创建异步线程 
这个是最原始的办法，每次创建一个新的线程来运行需要异步执行的任务，任务执行完毕就销毁这前线程。由于线程的创建的开销较大，不建议这种办法。
使用异步消息队列 
producer往queue里扔任务，然后多个consumer线程从queue里面取出任务并执行。
线程池 
对第一种方式的优化，由于线程的创建需要系统资源的开销，所以利用线程池来避免线程的频率创建与销毁]]></description><category></category></item><item><title><![CDATA[Tensorflow 学习笔记 - 常用 API]]></title><link>https://blog.csdn.net/west_609/article/details/78758309</link><guid>https://blog.csdn.net/west_609/article/details/78758309</guid><author>west_609</author><pubDate>Sat, 09 Dec 2017 22:14:48 +0800</pubDate><description><![CDATA[CNN API

Tensorflow 提供了一些内置的API实现了CNN网络结构中的卷积，池化，全连接网络等运算操作。


tf.nn.conv2d(input,filter, strides, padding, data_format=’NHWC’) 
完成CNN卷积运算，其中：

input: 4-D 的Tensor, 每个dimension的意思由data_format指定，默认是[bat]]></description><category></category></item><item><title><![CDATA[BP神经网络工作原理]]></title><link>https://blog.csdn.net/west_609/article/details/78720342</link><guid>https://blog.csdn.net/west_609/article/details/78720342</guid><author>west_609</author><pubDate>Tue, 05 Dec 2017 19:29:06 +0800</pubDate><description><![CDATA[The whole BP Neural Network computation repeat below procedures：
Forward Propagation 
Compute cost
Backward Propagation
Update Parameters
Today I want to do a summary for them per my understanding sinc]]></description><category></category></item><item><title><![CDATA[深度学习的Dimension检查]]></title><link>https://blog.csdn.net/west_609/article/details/78692600</link><guid>https://blog.csdn.net/west_609/article/details/78692600</guid><author>west_609</author><pubDate>Sat, 02 Dec 2017 18:48:10 +0800</pubDate><description><![CDATA[在构建深度学习神经网络结构的时候，由于网络的拓扑结构比较复杂，包括比较多的层次（hidden layer)，以及每一层又有许多activation(neuron)单元组成，因此在计算forward以及backward propagation时，为了减少不必要的错误，最好对其中的每一层的input/output matrix的dimension有个底。为了更好地表述，一般需要统一一下用到的一些符号，以]]></description><category></category></item><item><title><![CDATA[Tensorflow 学习笔记：Input Pipeline - Dataset]]></title><link>https://blog.csdn.net/west_609/article/details/78608541</link><guid>https://blog.csdn.net/west_609/article/details/78608541</guid><author>west_609</author><pubDate>Thu, 23 Nov 2017 13:29:47 +0800</pubDate><description><![CDATA[Dataset是Tensorflow里面一个比较重要的概念，我们知道机器学习算法需要大概的数据来训练data model. 所以Dataset就是用来做这么一件重要的事情：定义数据pipline，为学习算法提供训练数据。其实我们也可以Dataset定义了一个数据源，指向某些包含训练数据的文件列表，或者是内存里面已有的数据结构（比如Tensor objects)。Dataset 数据结构组成Datas]]></description><category></category></item><item><title><![CDATA[代码重构小结]]></title><link>https://blog.csdn.net/west_609/article/details/77098900</link><guid>https://blog.csdn.net/west_609/article/details/77098900</guid><author>west_609</author><pubDate>Fri, 11 Aug 2017 15:38:41 +0800</pubDate><description><![CDATA[关于代码重构的一些总结：
能用组合（composition）就不用继承（inheritance） 
HeadFirst 的设计模式这本书里面好像也提到这点。个人的感觉是当类的继承结构很深的时候，了解一个复杂的方法就会变得很痛苦，特别是一个类很庞大的时候。由于每个方法由于是多态的，在阅读代码的时候你还得搞清楚它到底是运行父类的方法还是子类的方法。而且如果这个类还跟其它的类有依赖的时候，trace这个调]]></description><category></category></item><item><title><![CDATA[用Aspectj拦截接口类中的所有方法]]></title><link>https://blog.csdn.net/west_609/article/details/76599988</link><guid>https://blog.csdn.net/west_609/article/details/76599988</guid><author>west_609</author><pubDate>Wed, 02 Aug 2017 23:35:38 +0800</pubDate><description><![CDATA[先来看一个问题，如果业务代码中有一个类，它实现了某个接口，如下：

接口类：



public interface Foo {

    public void hello(String say);

    public void goodBye();
}

实现类：



public class SimpleFoo implements Foo {

    public void hel]]></description><category></category></item><item><title><![CDATA[浅谈微服务与负载均衡LBS]]></title><link>https://blog.csdn.net/west_609/article/details/75808464</link><guid>https://blog.csdn.net/west_609/article/details/75808464</guid><author>west_609</author><pubDate>Sat, 22 Jul 2017 23:59:25 +0800</pubDate><description><![CDATA[微服务这几年应该是我听过最多的，很多公司的架构现在都在往这个方面迁移，包括很多的互联网公司，以及其它行业的软件公司。至于原因吗，很多人都出自己的理解，从业务需求上讲，可以scale-out，满足业务增长的需求，另外从软件开发者的角度，服务化的架构确实是降低了各个软件模块的偶合，更方便软件的开发，部署，测试。但这里为什么把微服务跟负载均衡服务器联系在一起呢？首先看一下当软件的架构从传统的单体应用切换到]]></description><category></category></item></channel></rss>