검색결과 리스트
Solaris에 해당되는 글 1건
글
IntroductionStreaming media technology emerged as the web evolved from static to dynamic content. Many companies, educational institutions, and service and content providers have been using the web to broadcast live presentations, movies, concerts, educational programs, news, sports, and advertisements. Streaming technology allows these types of content to be viewed as it is transmitted without having to download the entire content onto client's local storage. There are two types of streaming:
Multimedia files are usually compressed and encoded in certain formats on the server end and then decompressed and decoded by a media player on the client side. The formats that currently can be streamed include RealNetworks (*.rm), Windows Media (*.wmv, *.asf), QuickTime (*.mov), MPEG (*.mpg), audio files (*.mp3), and other video files (*.mp2). Either type of streaming or multimedia source requires a scalable and efficient server with a fast storage solution and good network bandwidth to address the needs of streaming media applications. This paper describes how to tune servers running on the Solaris Operating Environment to improve performance for streaming media applications. These suggestions are based on observations while working with ISVs (independent software vendors) developing streaming media applications. The things to consider when tuning a server for media applications include network, I/O, and local and remote file systems. Network TuningTo take advantage of high-speed networks and thus increase network throughput, the Solaris platform offers tunable parameters for UDP and TCP, which are the underlying protocols for RTSP, RTP, and HTTP. The UDP and TCP tunables that are beneficial to streaming media applications relate to window size, buffer size, and checksumming. Setting the TCP window size or UDP socket buffer size to the application read or write call size minimizes the fragmentation of the packets in the transport layer. For example, if the application server sends out or writes out 32 Kbyte, and the UDP socket buffer size is set to 8 Kbyte, then the server will break this 32-Kbyte request into 8-Kbyte packets before sending it over the network. By setting the UDP receive and send buffer size or TCP window size, you will reduce the overhead by reducing fragmentation and thus increase performance. The tunables for UDP that would modify the socket buffer size include:
The tunables for TCP that modify the window size include:
You can use ndd -set /dev/udp udp_xmit_hiwat <value_in_bytes> To maintain these settings across reboots, you should put a line for this in the file # # Set configurable parameters. # ndd -set /dev/tcp tcp_xmit_hiwat 65536 Another way you could achieve a performance boost is to turn OFF this
If your network card already has some sort of hardware checksumming, then this feature can be turned off to avoid double checks. Use It is important to note that currently UDP is the desired protocol for streaming media because it does not make acknowledgments of packets or retransmissions. Since the audio or video is being listened to or viewed as it is transmitted, retransmission of lost bytes is not necessary. Also, if the stream can be multicasted (sent to one or more clients), UDP is the only protocol that supports this mode. For Solaris servers that have Sun GigaSwift Ethernet adapter network cards (only supported in the line of servers that run on UltraSPARC III® processors), there are device driver parameters to consider for possible PCI interperformance improvements. The effects on performance vary among different applications, and it would be good to try out different values for these parameters. The device parameters include:
These tunables control the priority access to the PCI. For example, if the tx_dma_weight = 0 and the rx_dma_weight = 3, then the RX traffic will have 8 times greater priority over TX traffic. Another device driver parameter adjustment that may improve performance is to turn on
For large packets, turning this parameter ON could be beneficial. Use In addition, for good bus performance with Sun GigaSwift Ethernet adapters, use a 66-MHz, 64-bit PCI slot to take advantage of the faster, wider bus. Also, select a slot that does not share bus bandwidth with other slots. I/O TuningMultimedia files can be located local to the server, on a remote server, or on a SAN (storage area network). For streaming media applications, sequential read/write access is the most predominant I/O disk operation since the multimedia files are stored on disk before they are transmitted (except for live broadcast). Thus selection and configuration of the storage device are factors that can affect overall performance. Configuration of your I/O disk devices as stripe or utilizing hardware stripe (RAID 0, RAID 5) would be optimal for sequential access since the data can be spread across several disks and retrieved in parallel. If you choose to configure the disks as stripe, the stripe size should be a multiple of the read/write size to make the access more efficient. The numerous ways to optimize I/O are beyond the scope of this paper; however, these two books are good references for planning disk layout:
File System TuningThe types of file systems that are supported on the Solaris Operating Environment include UFS, VxFS, QFS, and NFS (for remote files). For each of these file system types, there are tuning considerations that relate to If your streaming media application accesses very large files and does not redistribute the same file often, mounting the file system with the Multimedia files consisting of high bit rate audio and video can be in the gigabyte file size range. Tuning the file system block size or extent size can definitely improve performance for larger files. Currently the maximum block size or extent size supported for UFS and VxFS, respectively, is 8 Kbyte. For larger files, there is an extra layer of indirection to access the rest of the data or an increase in the number of data blocks or extents used per file; this creates extra overhead when accessing large files. QFS, however, supports variable block sizes up to a maximum of 32 Mbyte. For a 64-Mbyte file, it requires only 2 data blocks to represent this file, however, in UFS or VXFS it would require 8000 data blocks or extents to represent this file, and it would require another level of indirection. Thus, consider using the largest possible block sizes when creating the file system. Use the Files on a remote server reside on a network file system (NFS). The overall performance of NFS is affected by the underlying file system type, I/O (disk layout), network bandwidth, and performance of the remote server. However, you can consider NFS (network file system) tunables to improve NFS throughput. One tunable is:
It would be best to tune the maximum transfer size to the size of the data being passed over the network, for example, the read/write I/O request size. However, depending on the configuration of the remote server and network bandwidth, you need to tune this value as closely as you can to the read/write I/O request size without degrading performance on the server. If you modify this parameter, you would also need to modify the parameter
These NFS tunables need to be applied to both the client and server. For UDP, there is a hard limit of 64 Kbyte per datagram (including headers and data) for the To modify these values, you would need to set them in the nfs:nfs3_max_transfer_size=65536 nfs:nfs3_bsize=65536 Also, increasing the number of NFS threads (
To set the NFS threads, you would need to modify the SummaryAs streaming media technology continues to expand and grow, different demands and needs will arise, and system tuning will change to address these needs. This paper focuses on parameters you can tune for streaming media applications on servers running on the Solaris platform. Other tunable parameters may exist for enhancing performance for these applications. However, so far, these are the tuning suggestions that we have found to produce the greatest improvement in performance for streaming media applications on these servers. References
About the AuthorsAgnes Jacob is a staff engineer in Sun Market Development Engineering, working with ISVs to improve performance of their applications on Sun servers by means of tuning and sizing studies. Her experience includes kernel development in the areas of file system, I/O, and network file system, as well as Java technology. Kelly Kishore has been working with streaming media technologies since 2000. At Sun, he is currently in Market Development Engineering, working with digital media customers. May 2002 |
RECENT COMMENT